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