]> git.openstreetmap.org Git - rails.git/commitdiff
Show anonymous user warning in data browser note view
authorTom Hughes <tom@compton.nu>
Sat, 2 Feb 2013 16:34:49 +0000 (16:34 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 2 Feb 2013 16:34:49 +0000 (16:34 +0000)
app/assets/stylesheets/common.css.scss
app/views/browse/note.html.erb

index 8c339189caa38c5b6b1b2c68042ff4dae42c71dd..5eeab68a0c0d8c5d13c43f409bec098c5c896aff 100644 (file)
@@ -934,6 +934,10 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   &:first-child {
     margin-top: 0;
   }
   &:first-child {
     margin-top: 0;
   }
+  &.warning {
+    color: #ff7070;
+    font-weight: bold;
+  }
   h4, p {
     margin-bottom: 5px;
   }
   h4, p {
     margin-bottom: 5px;
   }
index a89ad07e5e543ee63af633c68bb5664b7b09848b..740646efb616fce53d14982c25d9239ff281e49c 100644 (file)
 
 <div class='column-1'>
 
 
 <div class='column-1'>
 
+  <% if @note.comments.find { |comment| comment.author.nil? } -%>
+  <div class='browse-section common warning'>
+    <%= t "javascripts.notes.show.anonymous_warning" %>
+  </div>
+  <% end -%>
+
   <div class='browse-section common'>
     <div>
       <h4><%= t "browse.note.opened" %></h4>
   <div class='browse-section common'>
     <div>
       <h4><%= t "browse.note.opened" %></h4>