Add anonymous comment warning to note popup

This commit is contained in:
Tom Hughes 2013-02-02 16:18:35 +00:00
parent 9d3b419aad
commit 5ad45549e1
3 changed files with 15 additions and 0 deletions

View file

@ -1,5 +1,8 @@
<div class="note"> <div class="note">
<h2><%- I18n.t('javascripts.notes.show.title', { id: note.id }) %></h2> <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) { %> <% note.comments.forEach(function (comment) { %>
<div> <div>
<small class="deemphasize"> <small class="deemphasize">

View file

@ -1661,6 +1661,17 @@ a.button.submit {
/* Rules for the notes interface */ /* Rules for the notes interface */
.note { .note {
h2 {
margin-bottom: 10px;
}
.warning {
display: block;
background-color: #ff7070;
padding: 4px 6px;
margin-bottom: 10px;
}
.comment_body { .comment_body {
margin-top: 4px; margin-top: 4px;
margin-bottom: 4px; margin-bottom: 4px;

View file

@ -2029,6 +2029,7 @@ en:
add: Add Note add: Add Note
show: show:
title: Note %{id} 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: "created by <a href='%{user_url}'>%{user}</a> at %{time}"
opened_by_anonymous: "created by anonymous at %{time}" opened_by_anonymous: "created by anonymous at %{time}"
commented_by: "comment from <a href='%{user_url}'>%{user}</a> at %{time}" commented_by: "comment from <a href='%{user_url}'>%{user}</a> at %{time}"