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 8c33918..5eeab68 100644 (file)
@@ -934,6 +934,10 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   &:first-child {
     margin-top: 0;
   }
+  &.warning {
+    color: #ff7070;
+    font-weight: bold;
+  }
   h4, p {
     margin-bottom: 5px;
   }
index a89ad07..740646e 100644 (file)
 
 <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>