Files
nairobi/app/views/admin/legislation/proposals/_proposals.html.erb
Javi Martín 02b6302f25 Focus the proposal selection switch after pressing it
Since this button is replaced by a new element in an AJAX call, nothing
was focused after pressing it.

So we're reusing the code we used to enable/disable budget phases, which
already dealt with this issue.
2024-10-25 17:15:40 +02:00

30 lines
1.0 KiB
Plaintext

<% if proposals.any? %>
<h3><%= page_entries_info proposals %></h3>
<%= render "shared/order_links", i18n_namespace: "admin.legislation.processes.proposals" %>
<table class="stack" id="legislation_proposals_list">
<thead>
<tr>
<th class="text-center"><%= t("admin.legislation.proposals.index.id") %></th>
<th><%= Legislation::Proposal.human_attribute_name(:title) %></th>
<th class="text-center"><%= t("admin.legislation.proposals.index.supports") %></th>
<th><%= t("admin.proposals.index.selected") %></th>
</tr>
</thead>
<tbody>
<% proposals.each do |proposal| %>
<tr id="<%= dom_id(proposal) %>" class="legislation_proposal">
<td class="text-center"><%= proposal.id %></td>
<td><%= proposal.title %></td>
<td class="text-center"><%= proposal.votes_score %></td>
<td><%= render Admin::Proposals::ToggleSelectionComponent.new(proposal) %></td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate proposals %>
<% end %>