Sha256: 681f36a737519f226b70f2f684623027a7734efbd199e40d66c38a969433d7e4

Contents?: true

Size: 1.58 KB

Versions: 1

Compression:

Stored size: 1.58 KB

Contents

.effective-datatables-filters{'aria-controls': datatable.to_param}
  = simple_form_for :filters, url: (datatable._form[:url] || '#'), method: datatable._form[:verb], html: { class: 'form-inline' } do |form|

    - if datatable._scopes.present?
      .effective-datatables-filters-scopes
        = form.input :scope, label: false, required: false, checked: datatable.state[:scope],
          as: (defined?(EffectiveFormInputs) ? :effective_radio_buttons : :radio_buttons),
          collection: datatable._scopes.map { |name, opts| [opts[:label], name] },
          buttons: true,
          wrapper_html: {class: 'btn-group-sm'}

    - if datatable._filters.present?
      .effective-datatables-filters-inputs
        - datatable._filters.each do |name, opts|
          = form.input name, label: opts[:label], required: false, value: datatable.state[:filter][name],
            as: opts[:as],
            collection: opts[:input_html].delete(:collection),
            multiple: opts[:input_html].delete(:multiple),
            input_html: (({name: ''} unless datatable._filters_form_required?) || {}).merge(opts[:input_html]),
            input_js: { placeholder: ''},
            wrapper_html: {class: 'form-group-sm'}

    - if datatable._scopes.present? || datatable._filters.present?
      .effective-datatables-filters-btn
        - if datatable._filters_form_required?
          = form.button :submit, 'Apply', 'data-disable-with': 'Applying...'
        - else
          = link_to 'Apply', '#', class: 'btn btn-primary btn-sm btn-effective-datatables-filters', 'data-apply-effective-datatables-filters': true

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
effective_datatables-3.3.2 app/views/effective/datatables/_filters.html.haml