This partial was going to get too complex since in some places we've got different texts, different URLs or different confirmation messages. While we should probably try to be more consistent and that would make the partial work in most cases, there'll always be some exceptions, and using a partial (with, perhaps, some helper methods) will become messy really quickly.
51 lines
1.9 KiB
Plaintext
51 lines
1.9 KiB
Plaintext
<% provide :title do %>
|
|
<%= t("admin.header.title") %> - <%= t("admin.menu.legislation") %> - <%= t("admin.legislation.processes.index.filters.#{@current_filter}") %>
|
|
<% end %>
|
|
|
|
<h2 class="inline-block"><%= t("admin.legislation.processes.index.title") %></h2>
|
|
|
|
<%= link_to t("admin.legislation.processes.index.create"), new_admin_legislation_process_path,
|
|
class: "button float-right" %>
|
|
|
|
<%= render "shared/filter_subnav", i18n_namespace: "admin.legislation.processes.index" %>
|
|
|
|
<% if @processes.any? %>
|
|
<h3><%= page_entries_info @processes %></h3>
|
|
|
|
<table class="stack">
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.legislation.processes.process.title") %></th>
|
|
<th><%= t("admin.legislation.processes.process.status") %></th>
|
|
<th class="text-center"><%= t("admin.legislation.processes.process.start_date") %></th>
|
|
<th class="text-center"><%= t("admin.legislation.processes.process.end_date") %></th>
|
|
<th class="text-center"><%= t("admin.legislation.processes.process.comments") %></th>
|
|
<th><%= t("admin.actions.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @processes.each do |process| %>
|
|
<tr id="<%= dom_id(process) %>">
|
|
<td class="small-12 medium-6 large-4">
|
|
<%= link_to process.title, edit_admin_legislation_process_path(process) %>
|
|
</td>
|
|
<td><%= t("admin.legislation.processes.process.status_#{process.status}") %></td>
|
|
<td class="text-center"><%= I18n.l process.start_date %></td>
|
|
<td class="text-center"><%= I18n.l process.end_date %></td>
|
|
<td class="text-center"><%= process.total_comments %></td>
|
|
<td>
|
|
<%= render Admin::TableActionsComponent.new(process, actions: [:destroy]) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= paginate @processes %>
|
|
<% else %>
|
|
<div class="callout primary">
|
|
<%= page_entries_info @processes %>
|
|
</div>
|
|
<% end %>
|