Sha256: f255cfb396f43a5b83b508e7f0772d313b6b451a3661857a427ea8c20603f3d8

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

.row
  .col-sm-12.effective-datatable-scopes
    = simple_form_for :scopes, url: request.path, method: :get, html: { class: 'form-inline' } do |form|

      - if datatable.klass_scopes.present?
        = form.input :current_scope, label: false, as: (defined?(EffectiveFormInputs) ? :effective_radio_buttons : :radio_buttons),
          collection: datatable.klass_scopes.keys.map { |key| [key.to_s.titleize, key] },
          checked: datatable.current_scope,
          buttons: true

      - datatable.scopes.except(*datatable.klass_scopes.keys).each do |name, options|
        - if options[:block].present?
          = form.instance_exec(form, &options[:block])
        - elsif options[:partial].present?
          = render partial: options[:partial], locals: { form: form, f: form, datatable: datatable }
        - else
          = form.input name, options[:filter]

      .btn-group
        = form.submit 'Filter', class: 'btn btn-primary', 'data-disable-with' => 'Submitting...'
        = link_to 'Clear', '#', class: 'btn btn-default', 'data-clear-form' => true

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
effective_datatables-2.12.2 app/views/effective/datatables/_scopes.html.haml
effective_datatables-2.12.1 app/views/effective/datatables/_scopes.html.haml
effective_datatables-2.12.0 app/views/effective/datatables/_scopes.html.haml