Sha256: b7a4bc7f365ba02695968c49105217affc56156ffbd7f40d951755613bffa8dd

Contents?: true

Size: 1.07 KB

Versions: 4

Compression:

Stored size: 1.07 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_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

4 entries across 4 versions & 1 rubygems

Version Path
effective_mentorships-0.2.4 app/datatables/admin/effective_mentorship_registrations_datatable.rb
effective_mentorships-0.2.3 app/datatables/admin/effective_mentorship_registrations_datatable.rb
effective_mentorships-0.2.2 app/datatables/admin/effective_mentorship_registrations_datatable.rb
effective_mentorships-0.2.1 app/datatables/admin/effective_mentorship_registrations_datatable.rb