From 457e3bde7078a7fe71823464ecdb8ab0c0476af2 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 2 Mar 2023 11:39:37 +0100 Subject: version complete de config.yaml --- static/admin/config.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'static/admin') 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 -- cgit v1.2.3