Sha256: 8dbcb5ce54a3da082d5fa96922889f8f56ec8385f4e54c6bc7d59d75e0a222e7

Contents?: true

Size: 704 Bytes

Versions: 30

Compression:

Stored size: 704 Bytes

Contents

module Dorsale
  module FiltersHelper
    def filter_submit_button(options = {})
      options[:class] ||= "btn submit filter-submit"
      options[:type]  ||= "submit"

      text = options.delete(:text) || t("actions.filter")
      icon = options.delete(:icon) || "filter"

      content_tag(:button, options) do
        icon(icon) + " " + text
      end
    end

    def filter_reset_button(options = {})
      options[:class] ||= "btn reset filter-reset"
      options[:type]  ||= "submit"

      text = options.delete(:text) || t("actions.reset")
      icon = options.delete(:icon) || "rotate-left"

      content_tag(:button, options) do
        icon(icon) + " " + text
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
dorsale-2.2.6 app/helpers/dorsale/filters_helper.rb
dorsale-2.2.5 app/helpers/dorsale/filters_helper.rb
dorsale-2.2.4 app/helpers/dorsale/filters_helper.rb
dorsale-2.2.3 app/helpers/dorsale/filters_helper.rb
dorsale-2.2.2 app/helpers/dorsale/filters_helper.rb
dorsale-2.2.1 app/helpers/dorsale/filters_helper.rb
dorsale-2.2.0 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.15 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.14 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.13 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.12 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.11 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.10 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.9 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.8 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.7 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.6 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.5 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.4 app/helpers/dorsale/filters_helper.rb
dorsale-2.1.3 app/helpers/dorsale/filters_helper.rb