]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/note.html.erb
Show anonymous user warning in data browser note view
[rails.git] / app / views / browse / note.html.erb
1 <% content_for :head do %>
2 <%= stylesheet_link_tag 'browse' %>
3 <% end %>
4
5 <% content_for :heading do %>
6   <h2>
7     <%= image_tag "#{@note.status}_note_marker.png", :alt => @note.status %>
8     <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
9   </h2>
10 <% end %>
11
12 <%= render :partial => "navigation" %>
13
14 <%= render :partial => "map", :object => @note %>
15
16 <div class='column-1'>
17
18   <% if @note.comments.find { |comment| comment.author.nil? } -%>
19   <div class='browse-section common warning'>
20     <%= t "javascripts.notes.show.anonymous_warning" %>
21   </div>
22   <% end -%>
23
24   <div class='browse-section common'>
25     <div>
26       <h4><%= t "browse.note.opened" %></h4>
27       <p><%= note_event(@note.created_at, @note.author) %></p>
28     </div>
29
30     <% if @note.status == "closed" %>
31       <div>
32         <h4><%= t "browse.note.closed" %></h4>
33         <p><%= note_event(@note.closed_at, @note.comments.last.author) %></p>
34       </div>  
35     <% elsif @note.comments.length > 1 %>
36       <div>
37         <h4><%= t "browse.note.last_modified" %></h4>
38         <p><%= note_event(@note.updated_at, @note.comments.last.author) %></p>
39       </div>  
40     <% end %>
41
42     <div>
43       <h4><%= t "browse.note.description" %></h4>
44       <p><%= h(@note.comments.first.body) %></p>
45     </div>
46
47     <div>
48       <h4><%= t "browse.node_details.coordinates" %></h4>
49       <p><div 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"} %></div></p>
50     </div>
51   </div>
52
53   <% if @note.comments.length > 1 %>
54     <div class='browse-section clearfix'>
55       <h4><%= t "browse.note.comments" %></h4>
56       <ul>
57         <% @note.comments[1..-1].each do |comment| %>
58           <li>
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 %>
66
67 </div>