Sha256: 7406d8650eb76993146c4680f90c6635d6ea9236cffaf985cdc9a3ed667ad43e
Contents?: true
Size: 1.07 KB
Versions: 173
Compression:
Stored size: 1.07 KB
Contents
%table{effective_datatable_params} %thead - if datatable.columns.any? { |_, opts| opts[:th].present? } == false %tr - datatable.columns.each do |name, opts| %th{title: opts[:label].presence}= opts[:label] - else - max_depth = datatable.columns.map { |_, opts| opts[:th].try(:[], :depth) || 0 }.max - [*0..max_depth].each do |depth| %tr - columns = datatable.columns.select { |_, opts| (opts[:th].try(:[], :depth) || 0) == depth } - columns.each do |name, opts| %th{(opts[:th] || {}).merge(title: opts[:label].presence)}= opts[:label] - (opts[:th_append] || []).each do |faux_col| %th{(faux_col[:th] || {}).merge(title: faux_col[:label].presence)}= faux_col[:label] %tbody - datatable.to_json[:data].each do |row| %tr - row.each do |col| %td= col.to_s.html_safe - if datatable.to_json[:aggregates].present? %tfoot - datatable.to_json[:aggregates].each do |row| %tr - row.each do |col| %td= col.to_s.html_safe
Version data entries
173 entries across 173 versions & 1 rubygems