static/admin/config/collections/index-pages.js aktualisiert
All checks were successful
website-main / prod-build (push) Successful in 1m19s
website-main / test-build (push) Successful in 32s

This commit is contained in:
Denys Konovalov 2023-10-07 15:06:23 +02:00
parent 7a40193ea2
commit 3377d917ad

@ -1,348 +1,348 @@
import { import {
DataObject, DataObject,
DateFormat, DateFormat,
MarkdownProps, MarkdownProps,
PatternEmail, PatternEmail,
} from "../props.js"; } from "../props.js";
import { DescriptionText, EnableBoolean, Title } from "./widgets.js"; import { DescriptionText, EnableBoolean, Title } from "./widgets.js";
const IndexPagesCollection = { const IndexPagesCollection = {
name: "index-pages", name: "index-pages",
label: "Hauptseiten", label: "Hauptseiten",
label_singular: "Hauptseite", label_singular: "Hauptseite",
description: description:
"Hauptseiten können nur manuell durch den Administrator angelegt und in die Website eingebunden werden. Über diesen Bereich ist die Änderung der Inhalte möglich.", "Hauptseiten können nur manuell durch den Administrator angelegt und in die Website eingebunden werden. Über diesen Bereich ist die Änderung der Inhalte möglich.",
icon: "page", icon: "page",
editor: { editor: {
preview: true, preview: true,
frame: true, frame: true,
size: "half", size: "half",
}, },
summary_fields: ["title", "description"], summary_fields: ["title", "description"],
files: [ files: [
{ {
name: "blog-index", name: "blog-index",
label: "Aktuelles", label: "Aktuelles",
file: "content/blog/_index.md", file: "content/blog/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "about-index", name: "about-index",
label: "Über die Schule", label: "Über die Schule",
file: "content/about/_index.md", file: "content/about/_index.md",
fields: [ fields: [
Title(false), Title(false),
DescriptionText, DescriptionText,
{ {
name: "image", name: "image",
label: "Bild", label: "Bild",
widget: "image", widget: "image",
required: false, required: false,
}, },
{ {
name: "stats", name: "stats",
label: "Statistik", label: "Statistik",
...DataObject, ...DataObject,
fields: [ fields: [
EnableBoolean, EnableBoolean,
{ {
name: "zahlen", name: "zahlen",
label: "Elemente", label: "Elemente",
label_singular: "Element", label_singular: "Element",
widget: "list", widget: "list",
required: false, required: false,
collapsed: false, collapsed: false,
fields: [ fields: [
{ {
name: "name", name: "name",
label: "Bezeichnung", label: "Bezeichnung",
widget: "string", widget: "string",
required: true, required: true,
}, },
{ {
name: "count", name: "count",
label: "Zahl", label: "Zahl",
widget: "number", widget: "number",
value_type: "int", value_type: "int",
min: 0, min: 0,
step: 1, step: 1,
required: true, required: true,
}, },
], ],
}, },
], ],
}, },
{ {
name: "body", name: "body",
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps, ...MarkdownProps,
}, },
], ],
}, },
{ {
name: "anmeldung-index", name: "anmeldung-index",
label: "Aufnahmeverfahren", label: "Aufnahmeverfahren",
file: "content/anmeldung/_index.md", file: "content/anmeldung/_index.md",
fields: [ fields: [
Title(false), Title(false),
DescriptionText, DescriptionText,
{ {
name: "body", name: "body",
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps, ...MarkdownProps,
}, },
{ {
name: "elements", name: "elements",
label: "Abschnitte", label: "Abschnitte",
label_singular: "Abschnitt", label_singular: "Abschnitt",
widget: "list", widget: "list",
required: false, required: false,
collapsed: true, collapsed: true,
fields: [ fields: [
Title(false), Title(false),
{ {
name: "content", name: "content",
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: true, required: true,
...MarkdownProps, ...MarkdownProps,
}, },
], ],
}, },
], ],
}, },
{ {
name: "author-index", name: "author-index",
label: "Autoren", label: "Autoren",
file: "content/author/_index.md", file: "content/author/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "anmeldeformular", name: "anmeldeformular",
label: "Anmeldeformular", label: "Anmeldeformular",
file: "content/anmeldeformular/_index.md", file: "content/anmeldeformular/_index.md",
fields: [ fields: [
Title(false), Title(false),
DescriptionText, DescriptionText,
{ {
name: "body", name: "body",
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps, ...MarkdownProps,
}, },
], ],
}, },
{ {
name: "cantorpreis-index", name: "cantorpreis-index",
label: "Cantorpreis", label: "Cantorpreis",
file: "content/cantorpreis/_index.md", file: "content/cantorpreis/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "kontakt", name: "kontakt",
label: "Kontakt", label: "Kontakt",
file: "content/kontakt/_index.md", file: "content/kontakt/_index.md",
fields: [ fields: [
Title(false), Title(false),
DescriptionText, DescriptionText,
{ {
name: "kontaktdaten", name: "kontaktdaten",
label: "Kontaktdaten", label: "Kontaktdaten",
widget: "list", widget: "list",
required: true, required: true,
collapsed: true, collapsed: true,
fields: [ fields: [
{ {
name: "name", name: "name",
label: "Name", label: "Name",
widget: "string", widget: "string",
required: true, required: true,
}, },
{ {
name: "position", name: "position",
label: "Berufsbezeichnung", label: "Berufsbezeichnung",
widget: "string", widget: "string",
required: true, required: true,
}, },
{ {
name: "email", name: "email",
label: "E-Mail-Adresse", label: "E-Mail-Adresse",
widget: "string", widget: "string",
required: true, required: true,
...PatternEmail, ...PatternEmail,
}, },
], ],
}, },
], ],
}, },
{ {
name: "termine", name: "termine",
label: "Termine", label: "Termine",
file: "content/termine/_index.md", file: "content/termine/_index.md",
fields: [ fields: [
Title(false), Title(false),
DescriptionText, DescriptionText,
{ {
name: "events", name: "events",
label: "Termine", label: "Termine",
label_singular: "Termin", label_singular: "Termin",
widget: "list", widget: "list",
required: true, required: false,
collapsed: true, collapsed: true,
fields: [ fields: [
{ {
name: "title", name: "title",
label: "Bezeichnung", label: "Bezeichnung",
widget: "string", widget: "string",
required: true, required: false,
}, },
{ {
name: "date", name: "date",
label: "Datum/Startdatum", label: "Datum/Startdatum",
widget: "datetime", widget: "datetime",
required: true, required: false,
...DateFormat, ...DateFormat,
}, },
{ {
name: "enddate", name: "enddate",
label: "Enddatum", label: "Enddatum",
hint: "Für mehrtägige Veanstaltungen, nur sichtbar wenn eingestellt", hint: "Für mehrtägige Veanstaltungen, nur sichtbar wenn eingestellt",
widget: "datetime", widget: "datetime",
required: false, required: false,
default: "", default: "",
...DateFormat, ...DateFormat,
}, },
{ {
name: "location", name: "location",
label: "Ort", label: "Ort",
widget: "string", widget: "string",
required: false, required: false,
}, },
], ],
}, },
], ],
}, },
{ {
name: "forms-index", name: "forms-index",
label: "Dokumente und Formulare", label: "Dokumente und Formulare",
file: "content/forms/_index.md", file: "content/forms/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "ganztagsangebote-index", name: "ganztagsangebote-index",
label: "Unser Ganztagsbereich", label: "Unser Ganztagsbereich",
file: "content/ganztagsangebote/_index.md", file: "content/ganztagsangebote/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "projektwoche-index", name: "projektwoche-index",
label: "Projektwoche", label: "Projektwoche",
file: "content/projektwoche/_index.md", file: "content/projektwoche/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "wettbewerbe-index", name: "wettbewerbe-index",
label: "Wettbewerbe", label: "Wettbewerbe",
file: "content/wettbewerbe/_index.md", file: "content/wettbewerbe/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "begabte-index", name: "begabte-index",
label: "Begabtenförderung", label: "Begabtenförderung",
file: "content/begabte/_index.md", file: "content/begabte/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "abiturienten-index", name: "abiturienten-index",
label: "Abiturienten", label: "Abiturienten",
file: "content/abiturienten/_index.md", file: "content/abiturienten/_index.md",
fields: [Title(false), DescriptionText], fields: [Title(false), DescriptionText],
}, },
{ {
name: "cantorfora-index", name: "cantorfora-index",
label: "Cantorfora", label: "Cantorfora",
file: "content/cantorfora/_index.md", file: "content/cantorfora/_index.md",
fields: [ fields: [
Title(false), Title(false),
DescriptionText, DescriptionText,
{ {
name: "body", name: "body",
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps, ...MarkdownProps,
}, },
], ],
}, },
{ {
name: "schulchronik-index", name: "schulchronik-index",
label: "Schulchronik", label: "Schulchronik",
file: "content/schulchronik/_index.md", file: "content/schulchronik/_index.md",
fields: [ fields: [
Title(false), Title(false),
DescriptionText, DescriptionText,
{ {
name: "body", name: "body",
label: "Inhalt", label: "Inhalt",
widget: "markdown", widget: "markdown",
required: false, required: false,
...MarkdownProps, ...MarkdownProps,
}, },
{ {
name: "infocard", name: "infocard",
label: "Zitatkarte", label: "Zitatkarte",
...DataObject, ...DataObject,
fields: [ fields: [
EnableBoolean, EnableBoolean,
{ {
name: "image", name: "image",
label: "Bild", label: "Bild",
widget: "image", widget: "image",
required: false, required: false,
}, },
{ {
name: "quote", name: "quote",
label: "Zitat", label: "Zitat",
widget: "text", widget: "text",
required: false, required: false,
}, },
{ {
name: "author", name: "author",
label: "Autor", label: "Autor",
widget: "string", widget: "string",
required: false, required: false,
}, },
], ],
}, },
{ {
name: "links", name: "links",
label: "Informationsseiten", label: "Informationsseiten",
widget: "list", widget: "list",
required: false, required: false,
collapsed: true, collapsed: true,
fields: [ fields: [
{ {
name: "title", name: "title",
label: "Bezeichnung", label: "Bezeichnung",
widget: "string", widget: "string",
required: true, required: true,
}, },
{ {
name: "link", name: "link",
label: "Link", label: "Link",
widget: "string", widget: "string",
required: true, required: true,
}, },
], ],
}, },
], ],
}, },
], ],
}; };
export default IndexPagesCollection; export default IndexPagesCollection;