Files
grecia/app/views/admin/budgets/index.html.erb
Javi Martín 435747764c Group links to create budgets with the heading
We're going to add help content here and having a floating button would
make the button disappear when creating content for mobile phones.

I'm not sure having the link in the <header> tag is semantically
correct, but is consistent to what we did to create local targets in the
SDG content section.

Note we're changing the style of the link to create local targets so
it's consistent with the link to create budgets/groups/headings.
2021-02-18 23:40:40 +01:00

42 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 "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 %>