gcg-website/static/admin/config/collections/cantorpreis.js
Denys Konovalov 79f32dab67
Revert "revert 65260f63c67562ea2821c31d37a0ac3caa755fd8"
This reverts commit f0a4bac2bd6eb33a82a22eeade2a4968b6095daf.
2023-12-12 17:25:51 +01:00

67 lines
1.3 KiB
JavaScript

import { MarkdownProps, ImageProps } from "../props.js";
import { DescriptionText, DraftBoolean } from "./widgets.js";
const CantorpreisCollection = {
name: "cantorpreis",
label: "Cantorpreisträger",
description:
"Hier sind alle Cantorpreisträger aufgelistet. Dieser Bereich wird von der Schulchronik verwaltet.",
icon: "award",
folder: "content/cantorpreis",
filter: {
field: "type",
value: "cantorpreis",
},
sortable_fields: {
fields: ["title", "name"],
default: {
field: "title",
direction: "Descending",
},
},
summary: "{{title}} - {{name}}",
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
summary_fields: ["title", "name", "draft", "body"],
fields: [
{
name: "title",
label: "Jahr",
widget: "string",
required: true,
},
{
name: "name",
label: "Name",
widget: "string",
required: true,
},
DraftBoolean,
DescriptionText,
{
name: "image",
label: "Bild",
default: "/media/image.webp",
...ImageProps,
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "cantorpreis",
},
{
name: "body",
label: "Text",
required: false,
...MarkdownProps,
},
],
};
export default CantorpreisCollection;