X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/f498a9287a25fc284ef0e1fd90ea8ca91e661183..c04e9ccf954737f9a3bb475100e2234e7ac5c17d:/app/views/diary_entry/new.rhtml?ds=sidebyside diff --git a/app/views/diary_entry/new.rhtml b/app/views/diary_entry/new.rhtml index ead58944c..8daf769c4 100644 --- a/app/views/diary_entry/new.rhtml +++ b/app/views/diary_entry/new.rhtml @@ -1,7 +1,71 @@ <%= error_messages_for 'diary_entry' %> -<%= start_form_tag :controller => 'diary_entry', :action => 'new' %> -subject<%= text_field 'diary_entry', 'title' %>
-body<%= text_area 'diary_entry', 'body' %>
- <%= submit_tag 'Save' %> -<% end_form_tag %> +<% form_for :diary_entry do |f| %> + + + + + + + + + + + + + + + + + +
Subject<%= f.text_field :title, :size => 60 %>
Body<%= f.text_area :body, :cols => 80, :rows => 10 %>
Location

+ Latitude: <%= f.text_field :latitude, :size => 20, :id => "latitude" %> Longitude <%= f.text_field :longitude, :size => 20, :id => "longitude" %>
<%= 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