Sha256: ef7a85853beae78669252769f72b1b6fc1d6c4be2cbb6fb3440e954d97fe0bd1
Contents?: true
Size: 1.06 KB
Versions: 2
Compression:
Stored size: 1.06 KB
Contents
:ruby effective_datatable_params = { :id => "#{datatable.to_param}-table", :class => ('table ' + table_class.to_s), :cellpadding => 0, :cellspacing => 0, :border => 0, :width => '100%', :data => { 'effective-datatables-table' => style, 'effective-form-inputs' => defined?(EffectiveFormInputs), 'columns' => datatable_columns(datatable), '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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
effective_datatables-2.2.1 | app/views/effective/datatables/_datatable.html.haml |
effective_datatables-2.2.0 | app/views/effective/datatables/_datatable.html.haml |