Sha256: e5d5417011ab2fd831d7687becf7e701d3da6a16db19d05057fa35842f4877a2

Contents?: true

Size: 933 Bytes

Versions: 6

Compression:

Stored size: 933 Bytes

Contents

module Admin
  class EffectiveMentorshipGroupsDatatable < Effective::Datatable
    filters do
      scope :all
      scope :archived
    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 :title
      col :rich_text_admin_notes, label: "Admin notes"

      col :mentorship_group_users, search: :string do |mentorship_group|
        mentorship_group.mentorship_group_users.map do |mentorship_group_user| 
          content_tag(:div, class: 'col-resource_item') do
            mentorship_role_badge(mentorship_group_user.mentorship_role) + ' ' + mentorship_group_user.name
          end
        end.join.html_safe
      end

      col :archived

      actions_col
    end

    collection do
      EffectiveMentorships.MentorshipGroup.deep.all
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
effective_mentorships-0.2.4 app/datatables/admin/effective_mentorship_groups_datatable.rb
effective_mentorships-0.2.3 app/datatables/admin/effective_mentorship_groups_datatable.rb
effective_mentorships-0.2.2 app/datatables/admin/effective_mentorship_groups_datatable.rb
effective_mentorships-0.2.1 app/datatables/admin/effective_mentorship_groups_datatable.rb
effective_mentorships-0.2.0 app/datatables/admin/effective_mentorship_groups_datatable.rb
effective_mentorships-0.1.0 app/datatables/admin/effective_mentorship_groups_datatable.rb