Files
nairobi/app/views/moderation/proposal_notifications/index.html.erb
Javi Martín d2f38fd276 Reduce duplication in moderation sections
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.
2021-06-28 00:15:08 +02:00

33 lines
1.2 KiB
Plaintext

<%= render Moderation::Shared::IndexComponent.new(@proposal_notifications) do %>
<table class="clear">
<thead>
<tr>
<th><%= t("moderation.proposal_notifications.index.headers.proposal_notification") %></th>
<th><%= t("moderation.proposal_notifications.index.headers.moderate") %></th>
</tr>
</thead>
<tbody>
<% @proposal_notifications.each do |proposal_notification| %>
<tr id="proposal_notification_<%= proposal_notification.id %>">
<td>
<%= link_to proposal_notification.title, proposal_notification, target: "_blank" %>
<br>
<span class="date"><%= l proposal_notification.updated_at.to_date %></span>
<br>
<div class="moderation-description">
<%= proposal_notification.body %>
</div>
</td>
<td class="text-center">
<%= check_box_tag "proposal_notification_ids[]",
proposal_notification.id,
nil,
id: "#{dom_id(proposal_notification)}_check" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>