We had five almost-identical views. Now we've removed most of the duplication, although the tables are still similar. We might refactor them in the future.
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
<%= render Moderation::Shared::IndexComponent.new(@debates) do %>
|
|
<table class="clear">
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("moderation.debates.index.headers.debate") %></th>
|
|
<th><%= t("moderation.debates.index.headers.moderate") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @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>
|
|
<span class="bullet"> • </span>
|
|
<%= debate.flags_count %><span class="icon-flag flag-disable"></span>
|
|
<span class="bullet"> • </span>
|
|
<%= debate.author.username %>
|
|
<br>
|
|
<div class="moderation-description">
|
|
<%= wysiwyg(debate.description) %>
|
|
</div>
|
|
</td>
|
|
<td class="text-center">
|
|
<%= check_box_tag "debate_ids[]", debate.id, nil, id: "#{dom_id(debate)}_check" %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|