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

102 lines
2.3 KiB
JavaScript
Raw Normal View History

2023-05-11 06:44:30 +02:00
import { MarkdownProps } from "../props.js";
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",
},
create: true,
editor: {
preview: true,
frame: true,
size: "half",
},
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;