1 <% content_for :head do %>
2 <%= javascript_include_tag "diary_entry" %>
5 <% content_for :heading do %>
9 <%= error_messages_for 'diary_entry' %>
11 <%= form_for :diary_entry do |f| %>
12 <div class="diary_entry standard-form">
14 <label><%= t 'diary_entry.edit.subject' -%></label>
15 <%= f.text_field :title, :size => 60 %>
18 <label><%= t 'diary_entry.edit.body' -%></label>
19 <%= richtext_area :diary_entry, :body, :cols => 80, :format => @diary_entry.body_format %>
22 <label><%= t 'diary_entry.edit.language' -%></label>
23 <%= f.collection_select :language_code, Language.order(:english_name), :code, :name %>
25 <div class="location">
26 <p class="form-help"><%= t 'diary_entry.edit.location' -%></p>
27 <%= content_tag "div", "", :id => "map", :data => {:lat => @lat, :lon => @lon, :zoom => @zoom} %>
29 <label><%= t 'diary_entry.edit.latitude' -%></label>
30 <%= f.text_field :latitude, :size => 20, :id => "latitude" %>
33 <label><%= t 'diary_entry.edit.longitude' -%></label>
34 <%= f.text_field :longitude, :size => 20, :id => "longitude" %>
36 <p class="form-help"><a href="#" id="usemap"><%= t 'diary_entry.edit.use_map_link' -%></a></p>
38 <%= submit_tag t('diary_entry.edit.save_button') %>
39 <%# TODO: button should say 'publish' or 'save changes' depending on new/edit state %>