X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/361906af9e5a7209af3f7006acbd117ed7b85e24..9f025130fddd7b9c7314cfec36dbe160c41e6698:/app/assets/javascripts/templates/notes/show.jst.ejs diff --git a/app/assets/javascripts/templates/notes/show.jst.ejs b/app/assets/javascripts/templates/notes/show.jst.ejs index 038ff5ebd..aa98220f4 100644 --- a/app/assets/javascripts/templates/notes/show.jst.ejs +++ b/app/assets/javascripts/templates/notes/show.jst.ejs @@ -1,12 +1,33 @@ -

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

-<% note.comments.forEach(function (comment) { %> -

- - <%- I18n.t('javascripts.notes.show.comment', { - action: comment.action, user: comment.user, time: comment.date - }) %> - -
- <%- comment.text %> -

-<% }) %> +
+

<%- 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) { %> +
+ + <% if (comment.user) { %> + <%= I18n.t('javascripts.notes.show.' + comment.action + '_by', { + user: comment.user, user_url: comment.user_url, + time: I18n.l("time.formats.long", comment.date) + }) %> + <% } else { %> + <%- I18n.t('javascripts.notes.show.' + comment.action + '_by_anonymous', { + time: I18n.l("time.formats.long", comment.date) + }) %> + <% } %> + +
<%= comment.html %>
+
+ <% }) %> + <% if (note.status == "open") { %> +
+ +
+
+ + +
+
+ <% } %> +