Order headings by name and group

Note that we are relying on the existing `sort_by_name`[1] method in the `Budget::Heading` class.

This method sorts by DESC group name first and then ASC heading name.

[1] https://github.com/AyuntamientoMadrid/consul/pull/1875
This commit is contained in:
voodoorai2000
2019-03-07 15:10:51 +01:00
committed by Javi Martín
parent 7b2495845d
commit abb6eb18b0
4 changed files with 6 additions and 6 deletions

View File

@@ -199,8 +199,8 @@
<th scope="col" class="tiny"><%= t("budgets.stats.percent_heading_census_html") %></th>
</tr>
</thead>
<tbody>
<% @budget.headings.order("id ASC").each do |heading| %>
<tbody id="headings">
<% @headings.each do |heading| %>
<tr id="<%= heading.name.parameterize %>">
<td class="border-left">
<strong><%= heading.name %></strong>