Sha256: 1835c727c5f62f311f217a74cc114ab87eca82020a9dce9300ebfd32e79289ca

Contents?: true

Size: 1.44 KB

Versions: 9

Compression:

Stored size: 1.44 KB

Contents

%table.effective-datatable{:id => "#{datatable.to_param}-table", :class => ('table ' + table_class.to_s), :data => {'effective-datatables-table' => style, 'source' => effective_datatables.datatable_path(datatable, {:format => 'json'}.merge(:attributes => datatable.attributes)), 'filter' => datatable_filter(datatable, filterable), 'non-sortable' => datatable_non_sortable(datatable, sortable), 'non-visible' => datatable_non_visible(datatable), 'widths' => datatable_widths(datatable), 'default-order' => datatable_default_order(datatable), 'default-entries' => datatable.default_entries, 'display-records' => (datatable.to_json[:iTotalDisplayRecords] || 0), 'total-records' => (datatable.to_json[:iTotalRecords] || 0), 'column-classes' => datatable_column_classes(datatable)}}
  %thead
    - max_depth = datatable.table_columns.map { |_, opts| opts[:th][:depth].to_i rescue 0 }.max
    - [*0..max_depth].each do |depth|
      %tr
        - table_columns = datatable.table_columns.select { |_, opts| (opts[:th][:depth] || 0 rescue 0) == depth }
        - table_columns.each do |name, opts|
          %th{(opts[:th] || {}).merge({:title => opts[:label] || name})}= opts[:label] || name
          - (opts[:append_th] || []).each do |faux_col|
            %th{(faux_col[:th] || {}).merge({:title => faux_col[:label]})}= faux_col[:label]
  %tbody
    - (datatable.to_json[:aaData] || []).each do |row|
      %tr
        - row.each do |col|
          %td= col.to_s.html_safe

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
effective_datatables-1.4.3 app/views/effective/datatables/_datatable.html.haml
effective_datatables-1.4.2 app/views/effective/datatables/_datatable.html.haml
effective_datatables-1.4.1 app/views/effective/datatables/_datatable.html.haml
effective_datatables-1.4.0 app/views/effective/datatables/_datatable.html.haml
effective_datatables-1.3.8 app/views/effective/datatables/_datatable.html.haml
effective_datatables-1.3.7 app/views/effective/datatables/_datatable.html.haml
effective_datatables-1.3.6 app/views/effective/datatables/_datatable.html.haml
effective_datatables-1.3.5 app/views/effective/datatables/_datatable.html.haml
effective_datatables-1.3.4 app/views/effective/datatables/_datatable.html.haml