Sha256: 935610a58b3245c2c1939fa15c499e0e54f8430af2deb8c2f0a842a1a0d1c7cd

Contents?: true

Size: 1.02 KB

Versions: 10

Compression:

Stored size: 1.02 KB

Contents

:ruby
  effective_datatable_params = {
    id: "#{datatable.to_param}-table",
    class: "#{datatable.table_html_class}",
    data: {
      'effective-form-inputs' => defined?(EffectiveFormInputs),
      '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

10 entries across 10 versions & 1 rubygems

Version Path
effective_datatables-2.2.11 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.10 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.9 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.8 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.7 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.6 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.5 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.4 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.3 app/views/effective/datatables/_datatable.html.haml
effective_datatables-2.2.2 app/views/effective/datatables/_datatable.html.haml