From: Jean-Philippe Lang Date: Wed, 1 May 2013 12:15:49 +0000 (+0000) Subject: Merged r11696 from trunk (#13618). X-Git-Tag: 2.3.1~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=aa4fc1b58af2e35ef17fe60d714bb2d52e5431a2;p=redmine.git Merged r11696 from trunk (#13618). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11745 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 592bba42a..2de6b0c90 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -29,6 +29,30 @@ module QueriesHelper end end + def query_filters_hidden_tags(query) + tags = ''.html_safe + query.filters.each do |field, options| + tags << hidden_field_tag("f[]", field, :id => nil) + tags << hidden_field_tag("op[#{field}]", options[:operator], :id => nil) + options[:values].each do |value| + tags << hidden_field_tag("v[#{field}][]", value, :id => nil) + end + end + tags + end + + def query_columns_hidden_tags(query) + tags = ''.html_safe + query.columns.each do |column| + tags << hidden_field_tag("c[]", column.name, :id => nil) + end + tags + end + + def query_hidden_tags(query) + query_filters_hidden_tags(query) + query_columns_hidden_tags(query) + end + def available_block_columns_tags(query) tags = ''.html_safe query.available_block_columns.each do |column| diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb index 35ddf8121..fa0c20ff3 100644 --- a/app/views/timelog/index.html.erb +++ b/app/views/timelog/index.html.erb @@ -27,7 +27,8 @@