Sha256: 4a191e154cc316d2a437716c2b88467e1b6af1668fecec56f359c89778d319ac

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

module Admin
  class EffectiveMentorshipRegistrationsDatatable < Effective::Datatable
    filters do
      scope :all
      scope :opt_in
      scope :opt_out
    end

    datatable do
      order :updated_at

      col :updated_at, visible: false
      col :created_at, visible: false
      col :id, visible: false
      col :token, visible: false

      col :mentorship_cycle
      col :user

      col :opt_in

      col :mentorship_role, search: mentorship_roles_collection() do |registration|
        mentorship_role_label(registration.mentorship_role)
      end

      col :category, search: EffectiveMentorships.MentorshipRegistration.categories
      col :venue, search: EffectiveMentorships.MentorshipRegistration.venues
      col :location, search: EffectiveMentorships.MentorshipRegistration.locations
      col :mentor_multiple_mentees, visible: false
      col :mentor_multiple_mentees_limit, visible: false

      col :parent, visible: false
      col :rich_text_comments, label: "Comments", visible: false

      actions_col
    end

    collection do
      EffectiveMentorships.MentorshipRegistration.deep.all
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
effective_mentorships-0.2.0 app/datatables/admin/effective_mentorship_registrations_datatable.rb
effective_mentorships-0.1.0 app/datatables/admin/effective_mentorship_registrations_datatable.rb