hides legislation empty tables, improves table styles

This commit is contained in:
decabeza
2017-05-24 13:34:37 +02:00
parent 5aa8017aa8
commit 02055bd09a
4 changed files with 106 additions and 83 deletions

View File

@@ -14,37 +14,43 @@
<%= render 'shared/filter_subnav', i18n_namespace: "admin.legislation.processes.index" %>
<h3><%= page_entries_info @processes %></h3>
<% 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><%= t("admin.legislation.processes.process.creation_date") %></th>
<th><%= t("admin.legislation.processes.process.comments") %></th>
<th></th>
</tr>
</thead>
<tbody>
<% @processes.each do |process| %>
<tr id="<%= dom_id(process) %>">
<td class="small-12 medium-8">
<%= link_to process.title, edit_admin_legislation_process_path(process) %>
</td>
<td><%= t("admin.legislation.processes.process.status_#{process.status}") %></td>
<td><%= I18n.l process.created_at.to_date %></td>
<td><%= process.total_comments %></td>
<td>
<%= link_to t("admin.legislation.processes.index.delete"), admin_legislation_process_path(process),
method: :delete,
class: 'button hollow alert' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<table class="stack">
<thead>
<tr>
<th><%= t("admin.legislation.processes.process.title") %></th>
<th><%= t("admin.legislation.processes.process.status") %></th>
<th><%= t("admin.legislation.processes.process.creation_date") %></th>
<th><%= t("admin.legislation.processes.process.comments") %></th>
<th></th>
</tr>
</thead>
<tbody>
<% @processes.each do |process| %>
<tr id="<%= dom_id(process) %>">
<td class="small-12 medium-8">
<%= link_to process.title, edit_admin_legislation_process_path(process) %>
</td>
<td><%= t("admin.legislation.processes.process.status_#{process.status}") %></td>
<td><%= I18n.l process.created_at.to_date %></td>
<td><%= process.total_comments %></td>
<td>
<%= link_to t("admin.legislation.processes.index.delete"), admin_legislation_process_path(process),
method: :delete,
class: 'button hollow alert' %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @processes %>
<%= paginate @processes %>
<% else %>
<div class="callout primary">
<%= page_entries_info @processes %>
</div>
<% end %>
</div>