Note that in the budgets wizard test we now create district with no associated geozone, so the text "all city" will appear in the districts table too, meaning we can't use `within "section", text: "All city" do` anymore since it would result in an ambiguous match. Co-Authored-By: Julian Herrero <microweb10@gmail.com> Co-Authored-By: Javi Martín <javim@elretirao.net>
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
<% if headings.any? %>
|
|
<table>
|
|
<caption><%= t("admin.budgets.show.headings_caption", group: group.name) %></caption>
|
|
<thead>
|
|
<tr>
|
|
<th><%= Budget::Heading.human_attribute_name(:name) %></th>
|
|
<% if budget.show_money? %>
|
|
<th><%= Budget::Heading.human_attribute_name(:price) %></th>
|
|
<% end %>
|
|
<% if budget.approval_voting? %>
|
|
<th><%= Budget::Heading.human_attribute_name(:max_ballot_lines) %></th>
|
|
<% end %>
|
|
<th><%= Budget::Heading.human_attribute_name(:geozone_id) %></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>
|
|
<% if budget.show_money? %>
|
|
<td><%= budget.formatted_heading_price(heading) %></td>
|
|
<% end %>
|
|
<% if budget.approval_voting? %>
|
|
<td><%= heading.max_ballot_lines %></td>
|
|
<% end %>
|
|
<td>
|
|
<%= geozone_for(heading) %>
|
|
</td>
|
|
<td>
|
|
<%= render Admin::TableActionsComponent.new(heading) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
<% else %>
|
|
<div class="callout primary clear">
|
|
<%= sanitize(t("admin.budget_headings.no_headings", group: group.name)) %>
|
|
</div>
|
|
<% end %>
|