- render_region :main do |main| - main.edit_header do %h1 New Location - main.edit_form do - form_tag admin_locations_path do = hidden_field 'location', 'lock_version' = render_region :form_top %table.fieldset{:cellpadding=>0, :cellspacing=>0, :border=>0} - render_region :form do |form| - form.edit_title do %tr %th.label %label{:for=>"location_name"} Name %td.field = text_field "location", "name", :class => 'textbox', :maxlength => 100 %td.help Required. - form.edit_full_address do %tr %th.label %label{:for=>"location_full_address"} Full Address %td.field = text_field "location", "full_address", :class => 'textbox', :maxlength => 100 %td.help Required. The address is used for determining the latitude and longitude for searching and showing on the map. the preferred format is: "123 1 Ave, MyCity, AB, Canada, T0M 0R0" - form.edit_group do - if config['locations.use_groups?'] %tr %th.label %label.optional{:for=>"location_group"} Group %td.field = text_field "location", "group", :class => 'textbox', :maxlength => 100 %td.help Optional. Assigning a group allows you to show and search locations within a specific group. - form.edit_website_url do - if config['locations.use_website_urls?'] %tr %th.label %label.optional{:for=>"location_website_url"} Website URL %td.field = text_field "location", "website_url", :class => 'textbox', :maxlength => 100 %td.help Optional. - form.edit_page_path do - if config['locations.use_page_paths?'] %tr %th.label %label.optional{:for=>"location_page_path"} Page path %td.field = text_field "location", "page_path", :class => 'textbox', :maxlength => 100 %td.help Optional. Associate a page on your site with this location. Example: /locations/office - form.edit_geocode do - if config['locations.allow_manual_geocoding?'] %tr %th.label %label{:for=>"location_latitude"} Latitude %td.field = text_field "location", "lat", :class => 'textbox', :maxlength => 100 %td.help{:rowspan => 3} Auto-generated. Required if 'Manually Geocode this Location' is selected. The latitude and longitude are typically geocoded automatically. However some locations (particularly rural locations) cannot be easily geocoded. If you choose "manual geocoding" you will be able to set the latitude and longitude manually. %tr %th.label %label{:for=>"location_longitude"} Longitude %td.field = text_field "location", "lng", :class => 'textbox', :maxlength => 100 %tr %th.label   %td.field %label{:style=>"display:block;text-align:left;"} = check_box "location", "manual_geocode" Manually Geocode this Location - render_region :form_bottom do |form_bottom| - form_bottom.edit_timestamp do = updated_stamp @location - form_bottom.edit_buttons do %p.buttons = save_model_button(@location) = save_model_and_continue_editing_button(@location) or = link_to "Cancel", admin_locations_url