improves table of admin budgets index

This commit is contained in:
Alberto Garcia Cabeza
2017-01-04 13:52:04 +01:00
parent 68d598a43d
commit e1367d4463
3 changed files with 47 additions and 17 deletions

View File

@@ -6,23 +6,39 @@
<%= render 'shared/filter_subnav', i18n_namespace: "admin.budgets.index" %>
<h3><%= page_entries_info @budgets %></h3>
<table>
<% @budgets.each do |budget| %>
<tr id="<%= dom_id(budget) %>" class="budget">
<td>
<%= link_to budget.name, admin_budget_budget_investments_path(budget_id: budget.id) %>
</td>
<td class="small">
<%= t("budget.phase.#{budget.phase}") %>
</td>
<td class="small">
<%= link_to t("admin.budgets.index.info_link"), admin_budget_path(budget) %>
</td>
<thead>
<tr>
<th><%= t("admin.budgets.index.table_name") %></th>
<th><%= t("admin.budgets.index.table_phase") %></th>
<th><%= t("admin.budgets.index.table_investments") %></th>
<th><%= t("admin.budgets.index.table_edit_groups") %></th>
<th><%= t("admin.budgets.index.table_edit_budget") %></th>
</tr>
<% end %>
</thead>
<tbody>
<% @budgets.each do |budget| %>
<tr id="<%= dom_id(budget) %>" class="budget">
<td>
<%= budget.name %>
</td>
<td class="small">
<%= t("budget.phase.#{budget.phase}") %>
</td>
<td class="small">
<%= link_to t("admin.budgets.index.budget_investments"), admin_budget_budget_investments_path(budget_id: budget.id) %>
</td>
<td class="small">
<%= link_to t("admin.budgets.index.edit_groups"), admin_budget_path(budget) %>
</td>
<td class="small">
<%= link_to t("admin.budgets.index.edit_budget"), edit_admin_budget_path(budget) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @budgets %>