Files
grecia/app/views/moderation/debates/index.html.erb

56 lines
1.9 KiB
Plaintext

<h2><%= t("moderation.debates.index.title") %></h2>
<dl class="sub-nav">
<dt><%= t("moderation.debates.index.filter") %>:</dt>
<% @valid_filters.each do |filter| %>
<% if @filter == filter %>
<dd class="active"><%= t("moderation.debates.index.filters.#{filter}") %></dd>
<% else %>
<dd><%= link_to t("moderation.debates.index.filters.#{filter}"),
moderation_debates_path(filter: filter) %></dd>
<% end %>
<% end %>
</dl>
<h3><%= page_entries_info @debates %></h3>
<table>
<tr>
<th>
<%= t("moderation.debates.index.headers.title") %>&nbsp;|&nbsp;
<%= t("moderation.debates.index.headers.updated_at") %>&nbsp;|&nbsp;
<%= t("moderation.debates.index.headers.description") %>
</th>
<th class="text-center"><%= t("moderation.debates.index.headers.flags") %></th>
<th class="text-center" colspan="2"><%= t("moderation.debates.index.headers.actions") %></th>
</tr>
<% @debates.each do |debate| %>
<tr id="debate_<%= debate.id %>">
<td>
<%= link_to debate.title, debate, target: "_blank" %>
<br>
<span class="date"><%= l debate.updated_at.to_date %></span>
<br>
<%= debate.description %>
</td>
<td class="text-center"><%= debate.inappropiate_flags_count %></td>
<td>
<%= link_to t("moderation.debates.index.hide"), hide_in_moderation_screen_moderation_debate_path(debate, request.query_parameters), method: :put, class: "delete" %>
</td>
<% if can? :archive, debate %>
<td>
<%= link_to t("moderation.debates.index.archive"), archive_moderation_debate_path(debate, request.query_parameters), method: :put, class: "button radius tiny warning" %>
</td>
<% end %>
<% if debate.archived? %>
<td class="archived">
<%= t("moderation.debates.index.archived") %>
</td>
<% end %>
</tr>
<% end %>
</table>
<%= paginate @debates %>