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 @@