Sha256: 352d0757627310832c5e0661b42702550b7c2cb2ac7714d6eb7d011df35451a0

Contents?: true

Size: 1.08 KB

Versions: 13

Compression:

Stored size: 1.08 KB

Contents

:ruby
  effective_datatable_params = {
    id: "#{datatable.to_param}-table",
    class: "#{datatable.table_html_class}",
    data: {
      'effective-form-inputs' => defined?(EffectiveFormInputs),
      'bulk-actions' => datatable_bulk_actions(datatable),
      'columns' => datatable_columns(datatable),
      'input-js-options' => local_assigns[:input_js_options],
      'simple' => datatable.simple?.to_s,
      'source' => effective_datatables.datatable_path(datatable, {format: 'json'}.merge(attributes: datatable.attributes)).chomp('?'),
      'default-order' => datatable_default_order(datatable),
      'display-entries' => datatable.display_entries,
      'display-records' => (datatable.to_json[:recordsFiltered] || 0),
      'total-records' => (datatable.to_json[:recordsTotal] || 0)
    }
  }

%table.effective-datatable{effective_datatable_params}
  %thead
    %tr
      - datatable.table_columns.each do |name, opts|
        %th= opts[:label] || name

  %tbody
    - (datatable.to_json[:data] || []).each do |row|
      %tr
        - row.each do |col|
          %td= col.to_s.html_safe

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
effective_datatables-2.4.3 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.4.2 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.4.1 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.4.0 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.8 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.7 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.6 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.5 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.4 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.3 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.2 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.1 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.3.0 app/views/effective/datatables/_datatable.html.haml