]> git.openstreetmap.org Git - rails.git/blob - app/views/users/diary_comments/_page.html.erb
Merge remote-tracking branch 'upstream/pull/6303'
[rails.git] / app / views / users / diary_comments / _page.html.erb
1 <turbo-frame id="pagination" target="_top" data-turbo="false">
2   <%= render "shared/pagination",
3              :newer_id => @newer_comments_id,
4              :older_id => @older_comments_id %>
5
6   <table class="table table-striped" width="100%">
7     <thead>
8       <tr>
9         <th width="25%"><%= t ".post" %></th>
10         <th width="25%"><%= t ".when" %></th>
11         <th width="50%"><%= t ".comment" %></th>
12       </tr>
13     </thead>
14     <% @comments.each do |comment| -%>
15     <tr>
16       <td width="25%" class="<%= "text-body-secondary" unless comment.visible? %>"><%= link_to comment.diary_entry.title, diary_entry_path(comment.diary_entry.user, comment.diary_entry) %></td>
17       <td width="25%" class="<%= "text-body-secondary" unless comment.visible? %>">
18         <%= friendly_date_ago(comment.created_at) %>
19       </td>
20       <td width="50%" class="richtext text-break<%= " text-body-secondary" unless comment.visible? %>"><%= comment.body.to_html %></td>
21     </tr>
22     <% end -%>
23   </table>
24
25   <%= render "shared/pagination",
26              :newer_id => @newer_comments_id,
27              :older_id => @older_comments_id %>
28 </turbo-frame>