Files
grecia/app/views/admin/budgets/index.html.erb
Julian Herrero b1cb981980 Add help text in budgets admin index
Co-authored-by: decabeza <alberto@decabeza.es>
2021-02-18 23:40:40 +01:00

43 lines
1.1 KiB
Plaintext

<header>
<h2><%= t("admin.budgets.index.title") %></h2>
<%= link_to t("admin.budgets.index.new_link"), new_admin_budget_path %>
</header>
<%= render Admin::Budgets::HelpComponent.new %>
<%= render "shared/filter_subnav", i18n_namespace: "admin.budgets.index" %>
<% if @budgets.any? %>
<h3><%= page_entries_info @budgets %></h3>
<table>
<thead>
<tr>
<th><%= t("admin.budgets.index.table_name") %></th>
<th><%= t("admin.budgets.index.table_phase") %></th>
<th><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>
<% @budgets.each do |budget| %>
<tr id="<%= dom_id(budget) %>" class="budget">
<td>
<%= budget.name %>
</td>
<td class="small">
<%= t("budgets.phase.#{budget.phase}") %>
</td>
<td>
<%= render Admin::Budgets::TableActionsComponent.new(budget) %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @budgets %>
<% else %>
<div class="callout primary">
<%= t("admin.budgets.index.no_budgets") %>
</div>
<% end %>