2023-05-11 06:44:30 +02:00
|
|
|
import { MarkdownProps } from "../props.js";
|
|
|
|
import { DraftBoolean, EnableBoolean } from "./widgets.js";
|
|
|
|
|
|
|
|
const ChronikjahreCollection = {
|
2023-05-29 16:22:34 +02:00
|
|
|
name: "chronikjahre",
|
|
|
|
description:
|
|
|
|
"Hier können die Chronikjahre bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
|
|
|
|
icon: "schulchronik",
|
|
|
|
label: "Chronikjahre",
|
|
|
|
label_singular: "Chronikjahr",
|
2023-06-21 17:58:49 +02:00
|
|
|
folder: "content/schulchronik",
|
2023-05-29 16:22:34 +02:00
|
|
|
filter: {
|
|
|
|
field: "type",
|
|
|
|
value: "schulchronik",
|
|
|
|
},
|
|
|
|
create: true,
|
|
|
|
editor: {
|
|
|
|
preview: false,
|
|
|
|
size: "half",
|
|
|
|
},
|
|
|
|
summary_fields: ["title", "draft", "cantorpreisträger", "topics"],
|
|
|
|
sortable_fields: {
|
|
|
|
fields: ["title"],
|
|
|
|
default: {
|
|
|
|
field: "title",
|
|
|
|
direction: "Descending",
|
2023-05-11 06:44:30 +02:00
|
|
|
},
|
2023-05-29 16:22:34 +02:00
|
|
|
},
|
|
|
|
fields: [
|
|
|
|
{
|
|
|
|
name: "title",
|
|
|
|
label: "Jahr",
|
|
|
|
widget: "string",
|
2023-05-11 06:44:30 +02:00
|
|
|
},
|
2023-05-29 16:22:34 +02:00
|
|
|
DraftBoolean,
|
|
|
|
{
|
|
|
|
name: "type",
|
|
|
|
label: "Typ",
|
|
|
|
widget: "hidden",
|
|
|
|
default: "schulchronik",
|
2023-05-11 06:44:30 +02:00
|
|
|
},
|
2023-05-29 16:22:34 +02:00
|
|
|
{
|
|
|
|
name: "pretext",
|
|
|
|
label: "Einleitung",
|
|
|
|
hint: "Text für die Jahreszahl",
|
|
|
|
widget: "markdown",
|
|
|
|
required: false,
|
|
|
|
...MarkdownProps,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "topics",
|
|
|
|
label: "Kreative Haufen",
|
|
|
|
label_singular: "Haufen",
|
|
|
|
widget: "list",
|
|
|
|
required: false,
|
|
|
|
collapsed: true,
|
|
|
|
fields: [
|
2023-05-11 06:44:30 +02:00
|
|
|
{
|
2023-05-29 16:22:34 +02:00
|
|
|
name: "title",
|
|
|
|
label: "Titel",
|
|
|
|
widget: "string",
|
|
|
|
required: true,
|
2023-05-11 06:44:30 +02:00
|
|
|
},
|
|
|
|
{
|
2023-05-29 16:22:34 +02:00
|
|
|
name: "content",
|
|
|
|
label: "Inhalt",
|
|
|
|
widget: "markdown",
|
|
|
|
required: false,
|
|
|
|
...MarkdownProps,
|
2023-05-11 06:44:30 +02:00
|
|
|
},
|
|
|
|
{
|
2023-05-29 16:22:34 +02:00
|
|
|
name: "superhaufen",
|
|
|
|
label: "Superhaufen",
|
|
|
|
widget: "object",
|
|
|
|
required: false,
|
|
|
|
fields: [
|
|
|
|
EnableBoolean,
|
|
|
|
{
|
|
|
|
name: "link",
|
|
|
|
label: "Superhaufen",
|
|
|
|
widget: "relation",
|
|
|
|
collection: "superhaufen",
|
|
|
|
search_fields: ["title"],
|
|
|
|
value_field: "title",
|
|
|
|
required: false,
|
|
|
|
collapsed: true,
|
|
|
|
},
|
|
|
|
],
|
2023-05-11 06:44:30 +02:00
|
|
|
},
|
2023-05-29 16:22:34 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "cantorpreisträger",
|
|
|
|
label: "Cantorpreisträger",
|
|
|
|
widget: "relation",
|
|
|
|
collection: "cantorpreis",
|
|
|
|
search_fields: ["jahr", "name"],
|
|
|
|
value_field: "name",
|
|
|
|
required: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "body",
|
|
|
|
label: "Text",
|
|
|
|
hint: "Erscheint zusätzlich zu den Kreativen Haufen",
|
|
|
|
widget: "markdown",
|
|
|
|
required: false,
|
|
|
|
...MarkdownProps,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|
2023-05-11 06:44:30 +02:00
|
|
|
|
2023-05-29 16:22:34 +02:00
|
|
|
export default ChronikjahreCollection;
|