From 47f731bcf2b98a10c5a7539756218327bb908449 Mon Sep 17 00:00:00 2001 From: "p.tessenow" Date: Wed, 30 Jun 2010 08:46:06 +0000 Subject: [PATCH] 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 --- app/views/cost_reports/_filters.rhtml | 35 ++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/app/views/cost_reports/_filters.rhtml b/app/views/cost_reports/_filters.rhtml index 8a15434c60..3947cac547 100644 --- a/app/views/cost_reports/_filters.rhtml +++ b/app/views/cost_reports/_filters.rhtml @@ -5,15 +5,28 @@ <%= javascript_include_tag "reporting", :plugin => "redmine_reporting" %> - -<% CostQuery::Filter.all.each do |filter| %> - - <% html_elements(filter).each do |element| %> - <%= - partial_prefix = File.join(File.basename(File.dirname(__FILE__)), 'filters') - render :partial => File.join(partial_prefix, element[:name].to_s), :locals => {:element => element, :f => f} - %> - <% end %> - -<% end %> +
+ + + +
+ + <% CostQuery::Filter.all.each do |filter| %> + + <% html_elements(filter).each do |element| %> + <%= + partial_prefix = File.join(File.basename(File.dirname(__FILE__)), 'filters') + render :partial => File.join(partial_prefix, element[:name].to_s), :locals => {:element => element, :f => f} + %> + <% end %> + + <% end %> +
+
+ <%= 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 %> +
\ No newline at end of file