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