Module: QueryReportFilterHelper

Defined in:
app/helpers/query_report_filter_helper.rb

Instance Method Summary collapse

Instance Method Details



19
20
21
# File 'app/helpers/query_report_filter_helper.rb', line 19

def link_to_download_report_csv
  link_to t('views.links.csv'), export_report_url_with_format('csv'), :target => "_blank"
end


15
16
17
# File 'app/helpers/query_report_filter_helper.rb', line 15

def link_to_download_report_pdf
  link_to t('views.links.pdf'), export_report_url_with_format('pdf'), :target => "_blank"
end

#query_report_boolean_filter(name, value, options = {}) ⇒ Object



10
11
12
13
# File 'app/helpers/query_report_filter_helper.rb', line 10

def query_report_boolean_filter(name, value, options={})
  concat(label_tag options[:placeholder])
  select_tag name, options_for_select([['', ''], ['true', 'true'], ['false', 'false']], value)
end

#query_report_date_filter(name, value, options = {}) ⇒ Object



6
7
8
# File 'app/helpers/query_report_filter_helper.rb', line 6

def query_report_date_filter(name, value, options={})
  text_field_tag name, value, options.merge(type: :date)
end

#query_report_text_filter(name, value, options = {}) ⇒ Object



2
3
4
# File 'app/helpers/query_report_filter_helper.rb', line 2

def query_report_text_filter(name, value, options={})
  text_field_tag name, value, options
end