]> git.openstreetmap.org Git - rails.git/blob - app/views/browse/note.html.erb
ec4f8d3ae60667e5cf837a522d9d290ec4520b71
[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   <div class='browse-section common'>
19     <div>
20       <h4><%= t "browse.note.opened" %></h4>
21       <p><%= t "browse.note.at_by_html", :when => friendly_date(@note.created_at), :user => note_author(@note) %></p>
22     </div>
23
24     <% if @note.status == "closed" %>
25       <div>
26         <h4><%= t "browse.note.closed" %></h4>
27         <p><%= t "browse.note.at_by_html", :when => friendly_date(@note.closed_at), :user => note_author(@note.comments.last) %></p>
28       </div>  
29     <% elsif @note.comments.length > 1 %>
30       <div>
31         <h4><%= t "browse.note.last_modified" %></h4>
32         <p><%= t "browse.note.at_by_html", :when => friendly_date(@note.updated_at), :user => note_author(@note.comments.last) %></p>
33       </div>  
34     <% end %>
35
36     <div>
37       <h4><%= t "browse.note.description" %></h4>
38       <p><%= h(@note.comments.first.body) %></p>
39     </div>
40
41     <div>
42       <h4><%= t "browse.node_details.coordinates" %></h4>
43       <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>
44     </div>
45   </div>
46
47   <% if @note.comments.length > 1 %>
48     <div class='browse-section clearfix'>
49       <h4><%= t "browse.note.comments" %></h4>
50       <ul>
51         <% @note.comments[1..-1].each do |comment| %>
52           <li>
53             <%= comment.body.to_html %>
54             <small class="deemphasize"><%= t "browse.note.at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment) %></small>
55           </li>
56         <% end %>
57       </ul>
58     </div>
59   <% end %>
60
61 </div>