Module: QueryReportFilterHelper
- Defined in:
- app/helpers/query_report_filter_helper.rb
Instance Method Summary collapse
- #link_to_download_report_csv ⇒ Object
- #link_to_download_report_pdf ⇒ Object
- #query_report_boolean_filter(name, value, options = {}) ⇒ Object
- #query_report_date_filter(name, value, options = {}) ⇒ Object
- #query_report_text_filter(name, value, options = {}) ⇒ Object
Instance Method Details
#link_to_download_report_csv ⇒ Object
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 |
#link_to_download_report_pdf ⇒ Object
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, ={}) concat(label_tag [:placeholder]) select_tag name, ([['', ''], ['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, ={}) text_field_tag name, value, .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, ={}) text_field_tag name, value, end |