Selection box for adding filters moved from the upper right corner to below the filters.

git-svn-id: https://dev.finn.de/svn/cockpit/branches/deployment_merge@1999 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
w.lindenthal 14 years ago
parent 2e619b40a3
commit 50255d2674
  1. 54
      app/views/cost_reports/_filters.rhtml
  2. 4
      assets/stylesheets/reporting.css

@ -8,38 +8,32 @@
<% grouped_filters = CostQuery::Filter.all_grouped.sort_by { |label, group_by_ary| l(label) } %>
<% partial_prefix = File.join(File.basename(File.dirname(__FILE__)), 'filters') %>
<table width="100%">
<tr>
<td>
<table id="filter_table">
<table id="filter_table">
<% grouped_filters.each do |label, filter_ary| %>
<tr id="tr_<%= label.to_s %>" style="display:none"><td><h3><%= l(label) %></h3></td></tr>
<% filter_ary.sort_by { |f| l(f.label)}.each do |filter| %>
<% next unless filter.display? %>
<tr id="tr_<%= filter.underscore_name %>" class="filter" style="display:none" data-label="tr_<%= label.to_s %>">
<% html_elements(filter).each do |element| %>
<%= render :partial => File.join(partial_prefix, element[:name].to_s),
:locals => {:element => element, :f => f, :filter => filter} %>
<% end %>
</tr>
<% end %>
<% end %>
</table>
<div id="add_filter_block">
<select onchange="add_filter(this);" id="add_filter_select" class="select-small">
<option value="">-- <%= l(:label_filter_add) %> --</option>
<% grouped_filters.each do |label, filter_ary| %>
<tr id="tr_<%= label.to_s %>" style="display:none"><td><h3><%= l(label) %></h3></td></tr>
<optgroup label="<%= l(label) %>">
<% filter_ary.sort_by { |f| l(f.label)}.each do |filter| %>
<% next unless filter.display? %>
<tr id="tr_<%= filter.underscore_name %>" class="filter" style="display:none" data-label="tr_<%= label.to_s %>">
<% html_elements(filter).each do |element| %>
<%= render :partial => File.join(partial_prefix, element[:name].to_s),
:locals => {:element => element, :f => f, :filter => filter} %>
<% end %>
</tr>
<% next unless filter.selectable? %>
<option value="<%= filter.underscore_name %>"><%= l(filter.label) %></option>
<% end %>
</optgroup>
<% end %>
</table>
</td>
<td class="add-filter">
<%= l(:label_filter_add) %>:
<select onchange="add_filter(this);" id="add_filter_select" class="select-small">
<option value=""></option>
<% grouped_filters.each do |label, filter_ary| %>
<optgroup label="<%= l(label) %>">
<% filter_ary.sort_by { |f| l(f.label)}.each do |filter| %>
<% next unless filter.selectable? %>
<option value="<%= filter.underscore_name %>"><%= l(filter.label) %></option>
<% end %>
</optgroup>
<% end %>
</select>
</td>
</tr>
</table>
</select>
</div>

@ -204,6 +204,10 @@
border-radius: 5px;
}
#add_filter_block {
margin-top: 6px;
}
.new_cost_query fieldset#filters table tr.filter:hover {
background: #aaa;
}

Loading…
Cancel
Save