Skip to content
Browse files

Add anonymous comment warning to note popup

  • Loading branch information...
1 parent 9d3b419 commit 5ad45549e1f871d98ff12f3d80d5d065f19a219e @tomhughes committed Feb 2, 2013
View
3 app/assets/javascripts/templates/notes/show.jst.ejs
@@ -1,5 +1,8 @@
<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">
View
11 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;
View
1 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 <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}"

0 comments on commit 5ad4554

Please sign in to comment.
Something went wrong with that request. Please try again.