-
Notifications
You must be signed in to change notification settings - Fork 31
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
base: master
Are you sure you want to change the base?
Conversation
…bject attributes. With the option of autosearch when editing an object.
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 :) |
It seems like @xmak brought the updates asked for, is it more ripe to be merged now ? |
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
I have corrected the "strange" indeting now it should be OK. |
Looks good now. Cheers guys |
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. [GeolocationSettings] 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] Additionally the autosearch feature can be enabled by setting: [GeolocationSettings] which will, upon opening the object edit page, automatically search for the generated address on the presented google map. |
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.