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