Files
sm-bm-plugin/models/materials/fields.yaml
Jakub Zych 3346cb6ff6 feat: manage material visibility and shares
The management save/update body takes is_private, author_user_id and
share_user_ids (absent keeps each; a new material gets the caller as
author), and the managed material shows them. New routes PATCH
/materials/{id}/visibility, PUT /materials/{id}/shares and GET /users,
with the MCP tools bm_manage_set_material_visibility,
bm_manage_set_material_shares and bm_manage_list_users. The /bmadmin
form gets the private switch, the author picker and shared_with.
2026-11-08 11:56:14 +01:00

79 lines
2.2 KiB
YAML

fields:
title:
label: jz.bm::lang.common.title
type: text
span: left
required: true
type:
label: jz.bm::lang.materials.type
type: dropdown
span: right
required: true
options:
pdf: jz.bm::lang.material_types.pdf
notatka: jz.bm::lang.material_types.notatka
link: jz.bm::lang.material_types.link
inne: jz.bm::lang.material_types.inne
course:
label: jz.bm::lang.common.course
type: relation
nameFrom: name
span: left
emptyOption: jz.bm::lang.common.none
published_at:
label: jz.bm::lang.materials.published_at
type: datepicker
mode: datetime
format: d.m.Y H:i
firstDay: 1
span: right
comment: jz.bm::lang.materials.published_at_comment
is_private:
label: jz.bm::lang.materials.is_private
type: switch
span: left
comment: jz.bm::lang.materials.is_private_comment
author:
label: jz.bm::lang.materials.author
type: relation
nameFrom: email
span: right
emptyOption: jz.bm::lang.common.none
comment: jz.bm::lang.materials.author_comment
source:
label: jz.bm::lang.common.source
type: text
span: left
url:
label: jz.bm::lang.common.url
type: text
span: right
meeting:
label: jz.bm::lang.common.meeting
type: relation
nameFrom: number
span: left
emptyOption: jz.bm::lang.common.none
comment: jz.bm::lang.common.meeting_comment
tags:
label: jz.bm::lang.materials.tags
type: relation
nameFrom: name
shared_with:
label: jz.bm::lang.materials.shared_with
type: relation
nameFrom: email
comment: jz.bm::lang.materials.shared_with_comment
files:
label: jz.bm::lang.materials.files
type: fileupload
mode: file
maxFilesize: 50
maxFiles: 20
useCaption: true
body:
label: jz.bm::lang.materials.body
type: textarea
size: giant
comment: jz.bm::lang.materials.body_comment