aboutsummaryrefslogtreecommitdiff
path: root/static/admin/config.yml
diff options
context:
space:
mode:
Diffstat (limited to 'static/admin/config.yml')
-rw-r--r--static/admin/config.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/static/admin/config.yml b/static/admin/config.yml
index 3d3b69d..92ffbe9 100644
--- a/static/admin/config.yml
+++ b/static/admin/config.yml
@@ -229,3 +229,52 @@ collections:
- label: Corps
name: body
widget: markdown
+
+ - name: 'operations'
+ label: 'Opérations'
+ description: "Base de connaissance technique à destination des operateur-ices"
+ folder: 'content/operations'
+ editor:
+ preview: false
+ create: true
+ view_filters:
+ - label: 'Brouillons'
+ field: draft
+ pattern: true
+ view_groups:
+ - label: 'Section'
+ field: 'extra.parent'
+ pattern: '.*'
+ fields:
+ - label: Titre
+ name: title
+ widget: string
+ - label: Poids
+ default: 50
+ name: weight
+ widget: number
+ - label: Brouillon (ne pas publier encore)
+ name: draft
+ widget: boolean
+ default: false
+ - label: Date
+ name: date
+ widget: datetime
+ date_format: 'dd/MM/yyyy' # e.g. 24/12/2022
+ time_format: false
+ format: 'yyyy-MM-dd' # e.g. 2022-12-24
+ - label: Extra
+ name: extra
+ widget: object
+ fields:
+ - name: parent
+ label: Parent
+ widget: relation
+ collection: 'operations'
+ value_field: 'operations/{{filename}}.{{extension}}'
+ search_fields: [ 'title', 'filename', 'slug' ]
+ default: 'operations/_index.md'
+ display_fields: ['{{title}} ({{filename}})', 'filename']
+ - label: Corps
+ name: body
+ widget: markdown