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:
Jakub Zych
2026-10-27 01:44:38 +01:00
parent 3241cc9894
commit ff2f97eb2b
9 changed files with 58 additions and 16 deletions

View File

@@ -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",