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 <div class='form-row'>
15 <label class="standard-label"><%= t 'diary_entry.edit.subject' -%></label>
16 <%= f.text_field :title %>
18 <div class='form-row'>
19 <label class="standard-label"><%= t 'diary_entry.edit.body' -%></label>
20 <%= richtext_area :diary_entry, :body, :cols => 80, :rows => 20, :format => @diary_entry.body_format %>
23 <label class="standard-label"><%= t 'diary_entry.edit.language' -%></label>
24 <%= f.collection_select :language_code, Language.order(:english_name), :code, :name %>
27 <fieldset class='location'>
28 <label class="standard-label"><%= t 'diary_entry.edit.location' -%></label>
29 <%= content_tag "div", "", :id => "map", :data => {:lat => @lat, :lon => @lon, :zoom => @zoom} %>
30 <div class='form-row clearfix'>
31 <div class='form-column'>
32 <label class="secondary standard-label"><%= t 'diary_entry.edit.latitude' -%></label>
33 <%= f.text_field :latitude, :size => 20, :id => "latitude" %>
35 <div class='form-column'>
36 <label class="secondary standard-label"><%= t 'diary_entry.edit.longitude' -%></label>
37 <%= f.text_field :longitude, :size => 20, :id => "longitude" %>
39 <div class='form-column'>
40 <a href="#" id="usemap"><%= t 'diary_entry.edit.use_map_link' -%></a>
45 <%= submit_tag t('diary_entry.edit.save_button') %>
46 <%# TODO: button should say 'publish' or 'save changes' depending on new/edit state %>