40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
<% if headings.any? %>
|
|
<h3><%= t("admin.budget_headings.amount", count: headings.count) %></h3>
|
|
<table>
|
|
<thead>
|
|
<tr id="<%= dom_id(group) %>">
|
|
<th><%= Budget::Heading.human_attribute_name(:name) %></th>
|
|
<th><%= Budget::Heading.human_attribute_name(:price) %></th>
|
|
<% if budget.approval_voting? %>
|
|
<th><%= Budget::Heading.human_attribute_name(:max_ballot_lines) %></th>
|
|
<% end %>
|
|
<th><%= Budget::Heading.human_attribute_name(:population) %></th>
|
|
<th><%= Budget::Heading.human_attribute_name(:allow_custom_content) %></th>
|
|
<th><%= t("admin.actions.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% headings.each do |heading| %>
|
|
<tr id="<%= dom_id(heading) %>" class="heading">
|
|
<td><%= heading.name %></td>
|
|
<td><%= budget.formatted_heading_price(heading) %></td>
|
|
<% if budget.approval_voting? %>
|
|
<td><%= heading.max_ballot_lines %></td>
|
|
<% end %>
|
|
<td><%= heading.population %></td>
|
|
<td>
|
|
<%= heading.allow_custom_content ? t("admin.shared.true_value") : t("admin.shared.false_value") %>
|
|
</td>
|
|
<td>
|
|
<%= render Admin::TableActionsComponent.new(heading) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<div class="callout primary clear">
|
|
<%= t("admin.budget_headings.no_headings") %>
|
|
</div>
|
|
<% end %>
|