]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/note.html.erb
c18fd40b3efddcd8435d97899a4fe9aa7492477e
[rails.git] / app / views / browse / note.html.erb
1 <% content_for :head do %>
2   <%= stylesheet_link_tag 'browse' %>
3 <% end %>
4
5 <h2><%= t "browse.note.#{@note.status}_title", :note_name => @note.id %></h2>
6
7 <% if @note.comments.find { |comment| comment.author.nil? } -%>
8 <div class='browse-section common'>
9   <p class="warning"><%= t "javascripts.notes.show.anonymous_warning" %></p>
10 </div>
11 <% end -%>
12
13 <div class='browse-section common'>
14   <div class='browse-field'>
15     <h4><%= t "browse.note.opened" %></h4>
16     <p><%= note_event(@note.created_at, @note.author) %></p>
17   </div>
18
19   <% if @note.status == "closed" %>
20     <div class='browse-field'>
21       <h4><%= t "browse.note.closed" %></h4>
22       <p><%= note_event(@note.closed_at, @note.comments.last.author) %></p>
23     </div>
24   <% elsif @note.comments.length > 1 %>
25     <div class='browse-field'>
26       <h4><%= t "browse.note.last_modified" %></h4>
27       <p><%= note_event(@note.updated_at, @note.comments.last.author) %></p>
28     </div>
29   <% end %>
30
31   <div class='browse-field' id="c<%= @note.comments.first.id %>">
32     <h4><%= t "browse.note.description" %></h4>
33     <p><%= h(@note.comments.first.body.to_html) %></p>
34   </div>
35
36   <div class='browse-field'>
37     <h4><%= t "browse.node_details.coordinates" %></h4>
38     <p class="geo"><%= link_to ("<span class='latitude'>#{number_with_delimiter(@note.lat)}</span>, <span class='longitude'>#{number_with_delimiter(@note.lon)}</span>".html_safe), {:controller => 'site', :action => 'index', :lat => h(@note.lat), :lon => h(@note.lon), :zoom => "18"} %></p>
39   </div>
40 </div>
41
42 <% if @note.comments.length > 1 %>
43   <div class='browse-section clearfix'>
44     <h4><%= t "browse.note.comments" %></h4>
45     <ul>
46       <% @note.comments[1..-1].each do |comment| %>
47         <li id="c<%= comment.id %>">
48           <%= comment.body.to_html %>
49           <small class="deemphasize"><%= note_event(comment.created_at, comment.author) %></small>
50         </li>
51       <% end %>
52     </ul>
53   </div>
54 <% end %>