diff --git a/static/admin/config.yml b/static/admin/config.yml index 8f66c6b..a5abf62 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -18,14 +18,14 @@ collections: widget: "string" folder: "content/activite" preview_path: "activite/{{slug}}" - slug: "{{year}}-{{month}}-{{day}}-{{slug}}" + slug: "{{fields.expiryDate}}-{{slug}}" summary: "{{expiryDate}} {{title}} ({{type}})" sortable_fields: ["expiryDate", "type", "title"] create: true fields: - { label: "Titre", name: "title", widget: "string" } - { label: "Date", name: "expiryDate", widget: "datetime", date_format: "YYYY-MM-DD" } - - { label: "Date publication", name: "publishDate", widget: "hidden", default: "{{now}}" } + - { label: "Date publication", name: "publishDate", widget: "datetime", default: "{{now}}" } - { label: "Type", name: "type", widget: "select", default: "autre", options: [ski, camp, AG, autre] } - { label: "Contenu", name: "body", widget: "markdown", modes: [rich_text] } @@ -38,7 +38,7 @@ collections: create: true fields: - { label: "Titre", name: "title", widget: "string" } - - { label: "Date", name: "date", widget: "datetime", date_format: "YYYY-MM-DD" } + - { label: "Date", name: "date", widget: "datetime", date_format: "YYYY-MM-DD", default: "{{now}}" } - { label: "Date expiration", name: "expiryDate", widget: "datetime", date_format: "YYYY-MM-DD", required: false } - { label: "Contenu", name: "body", widget: "markdown", modes: [rich_text] }