There were places where we had two links pointing to the same place; one link would be the name/title of a record, and one link would be under the "actions" column. This is confusing, since users would probably expect these links to point to different places (which is what happens in other tables in the admin section) and might try to click one of them and then the other one and be surprised when they found out both of them go to the same page.
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
<%= back_link_to admin_budgets_path, t("admin.budget_groups.index.back") %>
|
|
|
|
<div class="clear"></div>
|
|
|
|
<h2 class="inline-block"><%= @budget.name %></h2>
|
|
|
|
<%= link_to t("admin.budget_groups.form.create"),
|
|
new_admin_budget_group_path,
|
|
class: "button float-right" %>
|
|
|
|
<% if @groups.any? %>
|
|
<h3><%= t("admin.budget_groups.amount", count: @groups.count) %></h3>
|
|
<table>
|
|
<thead>
|
|
<tr id="<%= dom_id(@budget) %>">
|
|
<th><%= t("admin.budget_groups.name") %></th>
|
|
<th><%= Budget::Group.human_attribute_name(:max_votable_headings) %></th>
|
|
<th><%= t("admin.budget_groups.headings_name") %></th>
|
|
<th><%= t("admin.actions.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @groups.each do |group| %>
|
|
<tr id="<%= dom_id(group) %>">
|
|
<td><%= group.name %></td>
|
|
<td><%= group.max_votable_headings %></td>
|
|
<td><%= group.headings.count %></td>
|
|
<td>
|
|
<%= render Admin::TableActionsComponent.new(group) do |actions| %>
|
|
<%= actions.link_to t("admin.budget_groups.headings_manage"),
|
|
admin_budget_group_headings_path(@budget, group) %>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<div class="callout primary clear">
|
|
<%= t("admin.budget_groups.no_groups") %>
|
|
</div>
|
|
<% end %>
|