From: Tom Hughes Date: Sat, 2 Feb 2013 16:18:35 +0000 (+0000) Subject: Add anonymous comment warning to note popup X-Git-Tag: live~5068^2~42 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/5ad45549e1f871d98ff12f3d80d5d065f19a219e Add anonymous comment warning to note popup --- diff --git a/app/assets/javascripts/templates/notes/show.jst.ejs b/app/assets/javascripts/templates/notes/show.jst.ejs index abcecc66c..8c37118f1 100644 --- a/app/assets/javascripts/templates/notes/show.jst.ejs +++ b/app/assets/javascripts/templates/notes/show.jst.ejs @@ -1,5 +1,8 @@

<%- I18n.t('javascripts.notes.show.title', { id: note.id }) %>

+ <% if (note.comments.some(function (comment) { return !comment.user })) { %> + <%- I18n.t('javascripts.notes.show.anonymous_warning') %> + <% } %> <% note.comments.forEach(function (comment) { %>
diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 0d12b758f..8c339189c 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1661,6 +1661,17 @@ a.button.submit { /* 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; diff --git a/config/locales/en.yml b/config/locales/en.yml index 217c43306..67f1aa909 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2029,6 +2029,7 @@ en: 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 %{user} at %{time}" opened_by_anonymous: "created by anonymous at %{time}" commented_by: "comment from %{user} at %{time}"