As mentioned in the previous commits, a `<select>` field which submits its form on change causes many accessibility and usability issues, so we're replacing it with the order links we use everywhere else. Since the links "Id" and "Title" by themselves don't have enough information to let users know they're used to sort by ID or title, we have to update them somehow. We could add a "Sort by:" prefix before the list of links (and associate it with the `aria-labelledby` attribute); however, we don't do this anywhere else and might look weird depending on the screen size. So we're simply adding "Sort by" before each link. Now that we don't use the `wide_order_selector` partial anymore, we can remove it alongside the styles for the `select-order` class.
30 lines
1.0 KiB
Plaintext
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><%= t("admin.legislation.proposals.index.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 class="select"><%= render "select_proposal", proposal: proposal %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= paginate proposals %>
|
|
<% end %>
|