Sha256: 008ce3e80e04c4833ca4cca67520790054f029af2f1b1a041dee05ccc33dc003
Contents?: true
Size: 1008 Bytes
Versions: 18
Compression:
Stored size: 1008 Bytes
Contents
class <%= resource.namespaced_class_name.pluralize %>Datatable < Effective::Datatable bulk_actions do bulk_action 'Delete selected', <%= [resource.namespaces, resource, 'path'].flatten.compact.join('_') %>(:ids), data: { method: :delete, confirm: 'Really delete selected?' } end datatable do order :updated_at bulk_actions_col col :updated_at, visible: false col :created_at, visible: false col :id, visible: false <% if resource.belong_tos.present? || resource.has_anys.present? -%> <% resource.belong_tos.each do |reference| -%> col :<%= reference.name %> <% end -%> <% resource.has_anys.each do |reference| -%> col :<%= reference.name %> <% end -%> <% end -%> <% attributes.except(:created_at, :updated_at, :id, :archived).each do |name, _| -%> col :<%= name %> <% end -%> <% if attributes.key?(:archived) -%> col :archived, search: { value: false } <% end -%> actions_col end collection do <%= resource.class_name %>.deep.all end end
Version data entries
18 entries across 18 versions & 1 rubygems