Sha256: 8716b5f018a44d5561a4e392a463f21f81afa62e6aa416b4d3b5511399b3ab78

Contents?: true

Size: 975 Bytes

Versions: 7

Compression:

Stored size: 975 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 :page_banner

    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

7 entries across 7 versions & 1 rubygems

Version Path
effective_pages-3.4.6 app/datatables/effective_pages_datatable.rb
effective_pages-3.4.5 app/datatables/effective_pages_datatable.rb
effective_pages-3.4.4 app/datatables/effective_pages_datatable.rb
effective_pages-3.4.3 app/datatables/effective_pages_datatable.rb
effective_pages-3.4.2 app/datatables/effective_pages_datatable.rb
effective_pages-3.4.1 app/datatables/effective_pages_datatable.rb
effective_pages-3.4.0 app/datatables/effective_pages_datatable.rb