Sha256: c198763f5417840a68a33dbff72ef6d4228a724da08e02a364c395730e6f1281

Contents?: true

Size: 953 Bytes

Versions: 4

Compression:

Stored size: 953 Bytes

Contents

class EffectivePagesDatatable < Effective::Datatable

  filters do
    scope :all
    scope :published
    scope :draft
    scope :on_menu
  end

  datatable do
    order :title, :asc
    length :all

    col :id, visible: false
    col :updated_at, visible: false

    col :title

    col :slug do |page|
      link_to(page.slug, effective_pages.page_path(page), target: '_blank')
    end

    col :draft

    col :layout, visible: false
    col :tempate, visible: false

    col :menu_name
    col :menu_title
    col :menu_group

    col :menu_url, visible: false
    col :menu_parent, search: { collection: admin_menu_parent_collection(), grouped: true }
    col :menu_position, visible: false

    col :authenticate_user, visible: false
    col :roles, visible: false

    actions_col do |page|
      dropdown_link_to('View', effective_pages.page_path(page), target: '_blank')
    end
  end

  collection do
    Effective::Page.deep.all
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
effective_pages-3.3.2 app/datatables/effective_pages_datatable.rb
effective_pages-3.3.1 app/datatables/effective_pages_datatable.rb
effective_pages-3.3.0 app/datatables/effective_pages_datatable.rb
effective_pages-3.2.0 app/datatables/effective_pages_datatable.rb