feat: materials by zjazd in the student API and admin
The material admin form gets the "Na zjazd" picker, every student material JSON carries meeting_id, and GET /materials accepts meeting= inside the published-only scope, so the Pulpit hero can list the zjazd's materials next to its readings.
This commit is contained in:
@@ -29,11 +29,12 @@ func (materialsAdmin) RequiredPermissions() []string {
|
||||
return []string{PermMaterials}
|
||||
}
|
||||
|
||||
// AdminFieldRelations binds the course picker and the tags. The files field
|
||||
// AdminFieldRelations binds the course and meeting pickers and the tags. The files field
|
||||
// is bound by models.Material.AttachRelations.
|
||||
func (materialsAdmin) AdminFieldRelations() []cabana.FieldRelationContract {
|
||||
return []cabana.FieldRelationContract{
|
||||
courseRelation("course_id"),
|
||||
meetingRelation(),
|
||||
{
|
||||
Field: "tags",
|
||||
Kind: "belongsToMany",
|
||||
|
||||
Reference in New Issue
Block a user