Sha256: cdc188afc749794392496df86e9e9084cce1933cf5ce4e59caec9235162fbf37

Contents?: true

Size: 731 Bytes

Versions: 2

Compression:

Stored size: 731 Bytes

Contents

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

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

  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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
query_report-1.0.1 app/helpers/query_report_filter_helper.rb
query_report-1.0.0 app/helpers/query_report_filter_helper.rb