Sha256: f6af8e52f0b935adc3236904a31117cd7fa87f989c9188120f2ce6bc6b805165

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

.effective-datatable-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?
      .btn-toolbar
        = 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

      - 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])

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

Version data entries

1 entries across 1 versions & 1 rubygems

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