]> git.openstreetmap.org Git - rails.git/commitdiff
Add anonymous comment warning to note popup
authorTom Hughes <tom@compton.nu>
Sat, 2 Feb 2013 16:18:35 +0000 (16:18 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 2 Feb 2013 16:18:35 +0000 (16:18 +0000)
app/assets/javascripts/templates/notes/show.jst.ejs
app/assets/stylesheets/common.css.scss
config/locales/en.yml

index abcecc66cbd627ebc1437c46a0718e0decbdb288..8c37118f189cdf04246ca27c364d2fd2e1e40a97 100644 (file)
@@ -1,5 +1,8 @@
 <div class="note">
   <h2><%- I18n.t('javascripts.notes.show.title', { id: note.id }) %></h2>
 <div class="note">
   <h2><%- I18n.t('javascripts.notes.show.title', { id: note.id }) %></h2>
+  <% if (note.comments.some(function (comment) { return !comment.user })) { %>
+  <small class="warning"><%- I18n.t('javascripts.notes.show.anonymous_warning') %></small>
+  <% } %>
   <% note.comments.forEach(function (comment) { %>
   <div>
     <small class="deemphasize">
   <% note.comments.forEach(function (comment) { %>
   <div>
     <small class="deemphasize">
index 0d12b758f5c2e304d6c735e05e59c14b6d6eca69..8c339189caa38c5b6b1b2c68042ff4dae42c71dd 100644 (file)
@@ -1661,6 +1661,17 @@ a.button.submit {
 /* Rules for the notes interface */
 
 .note {
 /* Rules for the notes interface */
 
 .note {
+  h2 {
+    margin-bottom: 10px;
+  }
+
+  .warning {
+    display: block;
+    background-color: #ff7070;
+    padding: 4px 6px;
+    margin-bottom: 10px;
+  }
+
   .comment_body {
     margin-top: 4px;
     margin-bottom: 4px;
   .comment_body {
     margin-top: 4px;
     margin-bottom: 4px;
index 217c43306c14ed680b5921bb4ab7a9502d26600e..67f1aa909fddc40d4b97e83779eadcd29256901f 100644 (file)
@@ -2029,6 +2029,7 @@ en:
         add: Add Note
       show:
         title: Note %{id}
         add: Add Note
       show:
         title: Note %{id}
+        anonymous_warning: This note includes comments from anonymous users which should be independently verified.
         opened_by: "created by <a href='%{user_url}'>%{user}</a> at %{time}"
         opened_by_anonymous: "created by anonymous at %{time}"
         commented_by: "comment from <a href='%{user_url}'>%{user}</a> at %{time}"
         opened_by: "created by <a href='%{user_url}'>%{user}</a> at %{time}"
         opened_by_anonymous: "created by anonymous at %{time}"
         commented_by: "comment from <a href='%{user_url}'>%{user}</a> at %{time}"