|
|
|
@ -4,23 +4,33 @@ |
|
|
|
|
query A CostQuery object |
|
|
|
|
%> |
|
|
|
|
|
|
|
|
|
<% grouped_gbs = CostQuery::GroupBy.all_grouped %> |
|
|
|
|
|
|
|
|
|
<div id="group_by_area"> |
|
|
|
|
<%= l(:label_columns) %>: |
|
|
|
|
<div id="group_columns" class="drag_target drag_container"> |
|
|
|
|
<select id="group_by_columns" name="groups[columns][]" class="select-small" onchange="add_group_by(this);"> |
|
|
|
|
<option value=""></option> |
|
|
|
|
<% CostQuery::GroupBy.all.each do |group_by| %> |
|
|
|
|
<% grouped_gbs.each do |label , group_by_ary| %> |
|
|
|
|
<optgroup label="<%= l(label) %>"> |
|
|
|
|
<% group_by_ary.select(&:display?).sort_by {|gb| l(gb.label)}.each do |group_by| %> |
|
|
|
|
<option value="<%= group_by.underscore_name %>"><%= l(group_by.label)%></option> |
|
|
|
|
<% end %> |
|
|
|
|
</optgroup> |
|
|
|
|
<% end %> |
|
|
|
|
</select> |
|
|
|
|
</div> |
|
|
|
|
<%= l(:label_rows) %>: |
|
|
|
|
<div id="group_rows" class="drag_target drag_container"> |
|
|
|
|
<select id="group_by_rows" name="groups[rows][]" class="select-small" onchange="add_group_by(this);"> |
|
|
|
|
<option value=""></option> |
|
|
|
|
<% CostQuery::GroupBy.all.each do |group_by| %> |
|
|
|
|
<% grouped_gbs.each do |label , group_by_ary| %> |
|
|
|
|
<optgroup label="<%= l(label) %>"> |
|
|
|
|
<% group_by_ary.select(&:display?).sort_by {|gb| l(gb.label)}.each do |group_by| %> |
|
|
|
|
<option value="<%= group_by.underscore_name %>"><%= l(group_by.label)%></option> |
|
|
|
|
<% end %> |
|
|
|
|
</optgroup> |
|
|
|
|
<% end %> |
|
|
|
|
</select> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|