group_bys are now sorted by their name in the reporting view

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1548 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
p.tessenow 14 years ago
parent 81dfd08b4b
commit 909ff51a65
  1. 4
      app/views/cost_reports/_group_by.rhtml

@ -10,9 +10,9 @@
<tbody><tr> <tbody><tr>
<td> <td>
<select size="9" multiple="multiple" id="group_by_container"> <select size="9" multiple="multiple" id="group_by_container">
<% CostQuery::GroupBy.all_grouped.each do |label, group_by_ary| %> <% CostQuery::GroupBy.all_grouped.sort_by { |label, group_by_ary| l(label) }.each do |label, group_by_ary| %>
<optgroup label="<%= l(label) %>" data-category="<%= label.to_s %>"> <optgroup label="<%= l(label) %>" data-category="<%= label.to_s %>">
<% group_by_ary.each do |group_by| %> <% group_by_ary.sort_by { |g| l(g.label)}.each do |group_by| %>
<option value="<%= group_by.underscore_name %>" data-category="<%= label.to_s %>"><%= l(group_by.label) %></option> <option value="<%= group_by.underscore_name %>" data-category="<%= label.to_s %>"><%= l(group_by.label) %></option>
<% end %> <% end %>
</optgroup> </optgroup>

Loading…
Cancel
Save