2023-12-13 12:36:15 +01:00
|
|
|
import { EditorProps, MarkdownProps, ImageProps } from "../props.js";
|
2023-05-29 16:22:34 +02:00
|
|
|
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
|
|
|
|
|
|
|
|
const WettbewerbeCollection = {
|
|
|
|
name: "wettbewerbe",
|
|
|
|
label: "Wettbewerbe",
|
|
|
|
label_singular: "Wettbewerb",
|
|
|
|
description: "Hier kann die Übersicht der Wettbewerbe bearbeitet werden.",
|
|
|
|
icon: "trophy",
|
2023-06-21 17:58:49 +02:00
|
|
|
folder: "content/wettbewerbe",
|
2023-12-13 12:36:15 +01:00
|
|
|
...EditorProps,
|
2023-05-29 16:22:34 +02:00
|
|
|
filter: {
|
|
|
|
field: "type",
|
|
|
|
value: "wettbewerbe",
|
|
|
|
},
|
|
|
|
summary_fields: ["title", "draft", "category"],
|
|
|
|
fields: [
|
|
|
|
Title(false),
|
|
|
|
DraftBoolean,
|
|
|
|
DescriptionText,
|
|
|
|
{
|
|
|
|
name: "image",
|
|
|
|
label: "Titelbild",
|
2023-12-12 17:25:51 +01:00
|
|
|
...ImageProps,
|
2023-05-29 16:22:34 +02:00
|
|
|
required: true,
|
|
|
|
default: "/media/image.webp",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "category",
|
|
|
|
label: "Fach",
|
|
|
|
hint: "Verwaltet in den Einstellungen",
|
|
|
|
widget: "relation",
|
|
|
|
collection: "settings",
|
|
|
|
file: "data-categories",
|
|
|
|
value_field: "contests.*",
|
|
|
|
search_fields: ["contests.*"],
|
|
|
|
display_fields: ["contests.*"],
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "class",
|
|
|
|
label: "Klassenstufe(n)",
|
|
|
|
widget: "string",
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "web_url",
|
|
|
|
label: "Website",
|
|
|
|
widget: "string",
|
|
|
|
required: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "type",
|
|
|
|
label: "Typ",
|
|
|
|
widget: "hidden",
|
|
|
|
default: "wettbewerbe",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "body",
|
|
|
|
label: "Inhalt",
|
|
|
|
required: true,
|
|
|
|
...MarkdownProps,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
export default WettbewerbeCollection;
|