feat: add admin screens, permissions and navigation
Seven admin controllers in a "Studia BM" navigation group, guarded by jz.bm.access_courses, jz.bm.access_schedule and jz.bm.access_materials, with Polish and English labels. Date and time fields are checked by the models before a save and answered as 422 on the field.
This commit is contained in:
15
models/materials/columns.yaml
Normal file
15
models/materials/columns.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
columns:
|
||||
title:
|
||||
label: jz.bm::lang.common.title
|
||||
searchable: true
|
||||
type:
|
||||
label: jz.bm::lang.materials.type
|
||||
course:
|
||||
label: jz.bm::lang.common.course
|
||||
relation: course
|
||||
select: name
|
||||
published_at:
|
||||
label: jz.bm::lang.materials.published_at
|
||||
created_at:
|
||||
label: jz.bm::lang.common.created_at
|
||||
type: datetime
|
||||
46
models/materials/fields.yaml
Normal file
46
models/materials/fields.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
# Attached files (system_files, field "files") have no form widget yet; see
|
||||
# the TODO on materialsAdmin.AdminFieldRelations.
|
||||
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: text
|
||||
span: right
|
||||
comment: jz.bm::lang.materials.published_at_comment
|
||||
source:
|
||||
label: jz.bm::lang.common.source
|
||||
type: text
|
||||
span: left
|
||||
url:
|
||||
label: jz.bm::lang.common.url
|
||||
type: text
|
||||
span: right
|
||||
tags:
|
||||
label: jz.bm::lang.materials.tags
|
||||
type: relation
|
||||
nameFrom: name
|
||||
body:
|
||||
label: jz.bm::lang.materials.body
|
||||
type: textarea
|
||||
size: giant
|
||||
comment: jz.bm::lang.materials.body_comment
|
||||
Reference in New Issue
Block a user