X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/169aac77d87744b72f43dd6bf8c806fd9aba0b48..d29a319ab0c9d692eb8a24f2d243282386d41346:/app/views/diary_entry/new.rhtml diff --git a/app/views/diary_entry/new.rhtml b/app/views/diary_entry/new.rhtml index c0ddaef23..69995d00e 100644 --- a/app/views/diary_entry/new.rhtml +++ b/app/views/diary_entry/new.rhtml @@ -1,6 +1,6 @@ <%= error_messages_for 'diary_entry' %> -<% form_for :controller => 'diary_entry', :action => 'new' do |f| %> +<% form_for :diary_entry do |f| %> @@ -10,9 +10,62 @@ + + + +
SubjectBody <%= f.text_area :body, :cols => 80 %>
Location + Latitude: <%= f.text_field :latitude, :size => 20, :id => "latitude" %> Longitude: <%= f.text_field :longitude, :size => 20, :id => "longitude" %> use map
<%= submit_tag 'Save' %>
<% end %> + +<% if @user.home_lat.nil? or @user.home_lon.nil? %> + <% lon = params['lon'] || '-0.1' %> + <% lat = params['lat'] || '51.5' %> + <% zoom = params['zoom'] || '4' %> +<% else %> + <% lon = @user.home_lon %> + <% lat = @user.home_lat %> + <% zoom = '12' %> +<% end %> + + +<%= javascript_include_tag 'map.js' %> + + \ No newline at end of file