first part of the ad-hoc filter adding ability in view

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1256 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
p.tessenow 15 years ago
parent 6861ca1be0
commit 47f731bcf2
  1. 15
      app/views/cost_reports/_filters.rhtml

@ -5,9 +5,12 @@
<%= javascript_include_tag "reporting", :plugin => "redmine_reporting" %> <%= javascript_include_tag "reporting", :plugin => "redmine_reporting" %>
<table width="100%">
<tr>
<td>
<table> <table>
<% CostQuery::Filter.all.each do |filter| %> <% CostQuery::Filter.all.each do |filter| %>
<tr style="display:block;" id="tr_<%= filter.short_name %>" class="filter"> <tr id="tr_<%= filter.underscore_name %>" class="filter">
<% html_elements(filter).each do |element| %> <% html_elements(filter).each do |element| %>
<%= <%=
partial_prefix = File.join(File.basename(File.dirname(__FILE__)), 'filters') partial_prefix = File.join(File.basename(File.dirname(__FILE__)), 'filters')
@ -17,3 +20,13 @@
</tr> </tr>
<% end %> <% end %>
</table> </table>
</td>
<td class="add-filter">
<%= l(:label_filter_add) %>:
<%#= select_tag 'add_filter_select', options_for_select([["",""]] + query.available_filters.sort{|a,b| a[1][:order]<=>b[1][:order]}.collect{|field| [ field[1][:name] || l(("field_"+field[0].to_s.gsub(/_id$/, "")).to_sym), field[0]] unless query.has_filter?(field[0])}.compact),
:onchange => "add_filter();",
:class => "select-small",
:name => nil %>
</td>
</tr>
</table>
Loading…
Cancel
Save