28 lines
999 B
ERB
28 lines
999 B
ERB
<h1><%= t('account.moderation_heading') %></h1>
|
|
|
|
<% if comments.none? %>
|
|
<p><%= t('account.moderation_empty') %></p>
|
|
<% else %>
|
|
<ul class="comments moderation">
|
|
<% comments.each do |comment| %>
|
|
<li class="comment" id="comment-<%= comment.id %>">
|
|
<p>
|
|
<% if comment_post_linkable?(comment) %>
|
|
<%== link_to(comment_post_label(comment), url_for(:post, slug: comment_post_slug(comment))) %>
|
|
<% else %>
|
|
<%= comment_post_label(comment) %>
|
|
<% end %>
|
|
</p>
|
|
<p><strong><%= comment.author %></strong></p>
|
|
<p><%= comment.body %></p>
|
|
<%== button_to(t('comments.approve'), "/posts/#{comment_post_slug(comment)}/comments/#{comment.id}/approve", method: :patch) %>
|
|
<%== button_to(t('comments.reject'), "/posts/#{comment_post_slug(comment)}/comments/#{comment.id}/reject", method: :patch) %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|
|
|
|
<%== paginate(comments, path: ->(page) { "#{url_for(:account_moderation)}?page=#{page}" }) %>
|
|
|
|
<p><%== link_to(t('posts.back_to_list'), url_for(:posts)) %></p>
|