]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/browse/note.html.erb
Changed report button + Added disclaimer on report page + Added search filter
[rails.git] / app / views / browse / note.html.erb
index fa6f75ff9e01f40e5aaee8b93691a6e3269589e6..2c7de033199e2efe2c72e2dc277029b7461ae35b 100644 (file)
@@ -3,30 +3,35 @@
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
   <%= t "browse.note.#{@note.status}_title", :note_name => @note.id %>
+  <% if @user and @user.id!=@note.author.id %>
+    <%= link_to new_issue_url(reportable_id: @note.id, reportable_type: @note.class.name, reported_user_id: @note.author.id), :title => t('browse.note.report') do %>
+        &nbsp;&#9872;
+    <% end %>
+  <% end %>
 </h2>
 
 <div class="browse-section">
   <h4><%= t('browse.note.description') %></h4>
   <div class="note-description">
-    <%= h(@note.comments.first.body.to_html) %>
+    <%= h(@note_comments.first.body.to_html) %>
   </div>
 
   <div class="details" data-coordinates="<%= @note.lat %>,<%= @note.lon %>" data-status="<%= @note.status %>">
     <%= note_event('open', @note.created_at, @note.author) %>
     <% if @note.status == "closed" %>
       <br/>
-      <%= note_event(@note.status, @note.closed_at, @note.comments.last.author) %>
+      <%= note_event(@note.status, @note.closed_at, @note_comments.last.author) %>
     <% end %>
   </div>
 
-  <% if @note.comments.find { |comment| comment.author.nil? } -%>
+  <% if @note_comments.find { |comment| comment.author.nil? } -%>
     <p class='warning'><%= t "javascripts.notes.show.anonymous_warning" %></p>
   <% end -%>
 
-  <% if @note.comments.length > 1 %>
+  <% if @note_comments.length > 1 %>
     <div class='note-comments'>
       <ul>
-        <% @note.comments[1..-1].each do |comment| %>
+        <% @note_comments[1..-1].each do |comment| %>
           <li id="c<%= comment.id %>">
             <small class='deemphasize'><%= note_event(comment.event, comment.created_at, comment.author) %></small>
             <%= comment.body.to_html %>