Add lecture kinds
This commit is contained in:
@@ -10,12 +10,13 @@ class LectureDashboard < Administrate::BaseDashboard
|
||||
ATTRIBUTE_TYPES = {
|
||||
id: Field::Number,
|
||||
attendance: Field::HasOne,
|
||||
course: Field::BelongsTo,
|
||||
event_uuid: Field::String,
|
||||
course: Field::BelongsTo.with_options(searchable: true, searchable_field: 'title'),
|
||||
event_uuid: Field::String.with_options(searchable: false),
|
||||
recording: Field::HasOne,
|
||||
start_time: Field::DateTime,
|
||||
title: Field::String,
|
||||
cancelled: Field::Boolean,
|
||||
kind: Field::Select.with_options(searchable: false, collection: ->(field) { field.resource.class.send(field.attribute.to_s.pluralize).keys }),
|
||||
created_at: Field::DateTime,
|
||||
updated_at: Field::DateTime,
|
||||
}.freeze
|
||||
@@ -37,6 +38,8 @@ class LectureDashboard < Administrate::BaseDashboard
|
||||
# an array of attributes that will be displayed on the model's show page.
|
||||
SHOW_PAGE_ATTRIBUTES = %i[
|
||||
id
|
||||
title
|
||||
kind
|
||||
attendance
|
||||
course
|
||||
cancelled
|
||||
@@ -53,6 +56,7 @@ class LectureDashboard < Administrate::BaseDashboard
|
||||
# on the model's form (`new` and `edit`) pages.
|
||||
FORM_ATTRIBUTES = %i[
|
||||
attendance
|
||||
kind
|
||||
course
|
||||
cancelled
|
||||
event_uuid
|
||||
|
||||
Reference in New Issue
Block a user