]> git.openstreetmap.org Git - rails.git/blob - app/views/diary_entry/comments.html.erb
Add a view to show diary comments left by a user
[rails.git] / app / views / diary_entry / comments.html.erb
1 <h1><%= @title%>
2  <%= t('diary_entry.comments.has_commented_on',:display_name => @this_user.display_name) %>
3 </h1>
4 <p>
5 <br>
6 <table id="comment-list-container">
7 <tr><th>Title</th><th>Date</th><th>Comment</th></tr>
8 <% for comment in @comments %>
9 <tr id="comment-row">
10 <td><a href="/user/<%= comment.diary_entry.user.display_name %>/diary/<%= comment.diary_entry.id %>"><%= comment.diary_entry.title %></a> 
11 </td>
12 <td>
13 <span class="date"><%= comment.created_at %></span>
14 </td>
15 <td>
16 <%= htmlize(comment.body) %></td></tr>
17 <% end %>
18 </table>
19 <%= link_to t('diary_entry.comments.older_comments') , { :page => @comment_pages.current.next} if @comment_pages.current.next %>
20 <% if @comment_pages.current.next and @comment_pages.current.previous %>
21 |
22 <% end %>
23 <%= link_to t('diary_entry.comments.newer_comments'), { :page => @comment_pages.current.previous } if @comment_pages.current.previous %>