Sha256: f875702b7ed6a7c0a01932cfe9151082172f77de88d5bf36481834d1acce2a0c

Contents?: true

Size: 1022 Bytes

Versions: 3

Compression:

Stored size: 1022 Bytes

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]

      = form.submit 'Submit', class: 'btn btn-primary', 'data-disable-with' => 'Submitting...'
      = link_to 'Reset', '#', 'data-reset-form' => true

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
effective_datatables-2.11.2 app/views/effective/datatables/_scopes.html.haml
effective_datatables-2.11.1 app/views/effective/datatables/_scopes.html.haml
effective_datatables-2.11.0 app/views/effective/datatables/_scopes.html.haml