Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the posibility to compose and suggest a search address from object attributes #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

xmak
Copy link

@xmak xmak commented Aug 7, 2011

I have added the posibility to compose and suggest a search address from object attributes when editing an object. It also has the option of searching automatically when you open the object edit page.

Very usefull when you have a lot of object that already have the address entered and you want to define the gmap location from this address.

…bject attributes. With the option of autosearch when editing an object.
@andrerom
Copy link
Contributor

andrerom commented Aug 7, 2011

Kind of like the idea. Even though I assumed autosearch ment it looked up ezgmaplocation table and gave you a dropp down of existing addresses before I looked at the patch.

Code wise I would maybe def $attribute.object.data_map to not possibly cause lookups on every occurrence of it's use in the else condition, |compare(true) also looks like it is comparing a string with a boolean while most code tends to use |eq('true') or 'enabled'. cs: There should be whitespace around "=" and inside parentheses, and you seem to use 2 spaces for indenting instead of 4. Other then that it looks good :)

@nfrp
Copy link
Contributor

nfrp commented Nov 2, 2011

It seems like @xmak brought the updates asked for, is it more ripe to be merged now ?
Thanks to both.

@andrerom
Copy link
Contributor

andrerom commented Nov 2, 2011

Just had a super quick look, and if you click on diff tab over here you'll see that the indenting is still "strange".

…esign/standard/templates/content/datatype/edit/ezgmaplocation.tpl
@xmak
Copy link
Author

xmak commented Nov 3, 2011

I have corrected the "strange" indeting now it should be OK.

@nfrp
Copy link
Contributor

nfrp commented Nov 3, 2011

Looks good now.
@andrerom : wanna give a whirl to merging ?
@xmak : Would you mind writing-up a small piece of doc, that we would add to the README file (you can paste this as markdown in this thread)
@bdunogier : extensions master : do we need to update CHANGELOG.txt for such a change ? Also, should the doc part warrant a dedicated 'doc' folder ?

Cheers guys

@xmak
Copy link
Author

xmak commented Nov 3, 2011

Here it is. Feel free to modify it as needed...

Use (auto suggestion)

When editing an object with Gmap attribute, the address can be automatically generated from existing object attributes (e.g. address, city), and suggested in the Gmap attribute's search box.
This is enabled by setting this setting:

[GeolocationSettings]
AddressAttributes[]=

to the attributes from which the address will be generated. The AddressAttributes[] setting must contain attribute identifiers and currently only ezstring, ezinteger and ezobjectrelation datatypes are supported. Example:

[GeolocationSettings]
AddressAttributes[]=address
AddressAttributes[]=post_number
AddressAttributes[]=city

Additionally the autosearch feature can be enabled by setting:

[GeolocationSettings]
...
AutoSearch=true

which will, upon opening the object edit page, automatically search for the generated address on the presented google map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants