aboutsummaryrefslogtreecommitdiff
path: root/static/admin
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-03-02 11:39:37 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-03-02 11:39:37 +0100
commit457e3bde7078a7fe71823464ecdb8ab0c0476af2 (patch)
tree2153a8272711edea9539f7ab6973280e90f35ce5 /static/admin
parent8ddc3807a559759343c2de10063e2f8faf0f9250 (diff)
downloadguide.deuxfleurs.fr-457e3bde7078a7fe71823464ecdb8ab0c0476af2.tar.gz
guide.deuxfleurs.fr-457e3bde7078a7fe71823464ecdb8ab0c0476af2.zip
version complete de config.yaml
Diffstat (limited to 'static/admin')
-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