]> git.openstreetmap.org Git - rails.git/blob - app/assets/javascripts/templates/notes/show.jst.ejs
Improve comment descriptions in note popups
[rails.git] / app / assets / javascripts / templates / notes / show.jst.ejs
1 <div class="note">
2   <h2><%- I18n.t('javascripts.notes.show.title', { id: note.id }) %></h2>
3   <% note.comments.forEach(function (comment) { %>
4   <div>
5     <small class="deemphasize">
6       <% if (comment.user) { %>
7         <%= I18n.t('javascripts.notes.show.' + comment.action + '_by', {
8            user: comment.user, user_url: comment.user_url, time: comment.date
9         }) %>
10       <% } else { %>
11         <%- I18n.t('javascripts.notes.show.' + comment.action + '_by_anonymous', {
12            time: comment.date
13         }) %>
14       <% } %>
15     </small>
16     <div class="comment_body"><%= comment.html %></div>
17   </div>
18   <% }) %>
19   <% if (note.status == "open") { %>
20   <form action="#">
21     <textarea class="comment" name="text" cols="40" rows="5"></textarea>
22     <br/>
23     <div class="buttons">
24       <input type="submit" name="close" value="<%- I18n.t('javascripts.notes.show.close') %>" data-url="<%- note.close_url %>">
25       <input type="submit" name="comment" value="<%- I18n.t('javascripts.notes.show.comment') %>" data-url="<%- note.comment_url %>" disabled="1">
26     </div>
27   </form>
28   <% } %>
29 </div>