gcg-website/static/admin/config/collections/superhaufen.js

97 lines
2.2 KiB
JavaScript
Raw Normal View History

import { EditorProps, MarkdownProps } from "../props.js";
2023-05-11 06:44:30 +02:00
import { DraftBoolean, EnableBoolean, Title } from "./widgets.js";
const SuperhaufenCollection = {
2023-05-29 16:22:34 +02:00
name: "superhaufen",
label: "Superhaufen",
description:
'"Superhaufen" sind ein besonderer Bereich der Schulchronik, um besonders ausführliche Ereignisse darzustellen. Dieser Bereich wird von der Schulchronik verwaltet.',
icon: "superhaufen",
2023-06-21 17:58:49 +02:00
folder: "content/superhaufen",
2023-05-29 16:22:34 +02:00
filter: {
field: "type",
value: "superhaufen",
},
...EditorProps,
2023-05-29 16:22:34 +02:00
summary_fields: ["title", "draft", "tiles"],
fields: [
Title(false),
DraftBoolean,
{
name: "type",
label: "Typ",
widget: "hidden",
default: "superhaufen",
2023-05-11 06:44:30 +02:00
},
2023-05-29 16:22:34 +02:00
{
name: "previous",
label: "Rückverlinkung",
widget: "object",
collapsed: true,
fields: [
EnableBoolean,
Title(false),
{
name: "link",
label: "Link",
widget: "string",
required: true,
},
],
2023-05-11 06:44:30 +02:00
},
2023-05-29 16:22:34 +02:00
{
name: "tiles",
label: "Kacheln",
hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte.",
widget: "list",
required: false,
collapsed: true,
fields: [
2023-05-11 06:44:30 +02:00
Title(false),
{
2023-05-29 16:22:34 +02:00
name: "bg_color",
label: "Hintergrundfarbe",
widget: "color",
required: true,
},
{
name: "icon",
label: "Symbol",
widget: "string",
required: true,
2023-05-11 06:44:30 +02:00
},
{
2023-05-29 16:22:34 +02:00
name: "font_color",
label: "Symbolfarbe",
widget: "color",
required: true,
2023-05-11 06:44:30 +02:00
},
{
2023-05-29 16:22:34 +02:00
name: "content",
label: "Inhalt",
required: false,
2023-05-29 16:22:34 +02:00
...MarkdownProps,
},
{
name: "unterhaufen",
label: "Unterhaufen",
widget: "list",
required: false,
collapsed: true,
fields: [
Title(false),
{
name: "content",
label: "Inhalt",
required: false,
2023-05-29 16:22:34 +02:00
...MarkdownProps,
},
],
},
],
},
],
};
2023-05-11 06:44:30 +02:00
2023-05-29 16:22:34 +02:00
export default SuperhaufenCollection;