Sha256: 90fb500bb6af5560d074c7d0d55d874ac89e1a56e5e11fbec035f12095835fbd

Contents?: true

Size: 873 Bytes

Versions: 8

Compression:

Stored size: 873 Bytes

Contents

module ExpressAdmin
  module Components
    module Controls
      class CollectionFilter < ExpressTemplates::Components::Configurable
        include ExpressTemplates::Components::Capabilities::Resourceful

          tag :span

          before_build {
            add_class 'filter-criteria'
          }

          contains -> {
            if _filter_column
              text_node "Filter: "
              span(class: 'label filter-tag') { 
                icon_link(:'android-cancel', text: helpers.params[:filter][_filter_column],
                                             href: log_entries_path(filter: {}),
                                             right: true)
              }
            end
          }

          private
            def _filter_column
              helpers.params[:filter].try(:keys).try(:first)
            end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
express_admin-2.0.0.b app/components/express_admin/collection_filter.rb
express_admin-2.0.0.a app/components/express_admin/collection_filter.rb
express_admin-1.8.1 app/components/express_admin/collection_filter.rb
express_admin-1.8.0 app/components/express_admin/collection_filter.rb
express_admin-1.7.32 app/components/express_admin/collection_filter.rb
express_admin-1.7.31 app/components/express_admin/collection_filter.rb
express_admin-1.7.30 app/components/express_admin/collection_filter.rb
express_admin-1.7.29 app/components/express_admin/collection_filter.rb