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