- {{ range first 6 (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
+ {{ range first (int $data.homepage.ganztagsangebote.number) (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
{{ .Render "ganztag" }}
@@ -258,7 +259,7 @@
{{ end }}
{{ end }}
- {{ range first 3 $events }}
+ {{ range first (int $data.homepage.termine.number) $events }}
{{ partial "termin" . }}
{{ end }}
diff --git a/static/admin/config.yml b/static/admin/config.yml
deleted file mode 100644
index 13eb15d0..00000000
--- a/static/admin/config.yml
+++ /dev/null
@@ -1,1139 +0,0 @@
-backend:
- name: gitea
- repo: gcg/gcg-website
- branch: master
- api_root: https://git.cantorgymnasium.de/api/v1
- base_url: https://oauth.cantorgymnasium.de
- commit_messages:
- create: "{{collection}} {{slug}} erstellt"
- update: "{{collection}} {{slug}} aktualisiert"
- delete: "{{collection}} {{slug}} gelöscht"
- uploadMedia: "{{path}} hochgeladen"
- deleteMedia: "{{path}} gelöscht"
-
-local_backend: true
-
-media_folder: "/static/media"
-public_folder: "/media"
-site_url: https://cantorgymnasium.de
-display_url: https://cantorgymnasium.de
-locale: "de"
-
-media_library:
- max_file_size: 10240000
- folder_support: true
-
-slug:
- encoding: "ascii"
- clean_accents: true
- sanitize_replacement: "-"
-
-collections:
- - name: "config"
- icon: "settings"
- label: "Konfiguration"
- description: "Hier können die Basiseinstellungen der Website geändert werden. Die meisten Bereiche müssen nur in Ausnahmefällen angepasst werden."
- editor:
- preview: false
- size: half
- files:
- - name: "homepage-config"
- label: "Startseitenkonfiguration"
- file: "data/de/homepage.yml"
- fields:
- - label: "Banner"
- name: "top_banner"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Text", name: "text", widget: "markdown", required: false}
- - {label: "Farbe", name: "color", widget: "color", required: false}
- - {label: "Schriftfarbe", name: "font_color", widget: "color", required: false}
- - {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://pictogrammers.com/library/mdi/"}
- - label: "Zeitschaltung"
- name: temporarily
- widget: "object"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Startdatum", name: "start_date", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
- - {label: "Enddatum", name: "end_date", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
- - label: "Karusell"
- name: "slider"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false }
- - {label: "Titel", name: "title", widget: "string", required: false}
- - label: "Elemente"
- label_singular: "Element"
- name: "slider_item"
- widget: "list"
- collapsed: true
- fields:
- - {label: "Inhalt", name: "content", widget: "string", required: false}
- - label: "Button"
- name: "button"
- widget: "object"
- required: false
- collapsed: true
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Bezeichnung", name: "label", widget: "string", required: false}
- - {label: "Link", name: "link", widget: "string", required: false}
- - label: "Partnerlogos (oben)"
- name: "header_logos"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - label: "Logos"
- label_singular: "Logo"
- name: "logos"
- widget: "list"
- required: false
- collapsed: true
- fields:
- - {label: "Titel", name: "title", widget: "string", required: false}
- - {label: "Link", name: "link", widget: "string", required: false}
- - {label: "Grafik", name: "image", widget: "image", required: true}
- - label: "Einstiegsabschnitt"
- name: "about"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Titel", name: "title", widget: "string", required: false}
- - {label: "Inhalt", name: "content", widget: "markdown", required: false}
- - label: "Button"
- name: "button"
- widget: "object"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Bezeichnung", name: "label", widget: "string", required: false}
- - {label: "Link", name: "link", widget: "string", required: false}
- - label: "Blog-Abschnitt"
- name: "blog"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Titel", name: "title", widget: "string"}
- - label: "Erfolge"
- name: "success_banner"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Bild", name: "image", widget: "image", required: false }
- - label: "Elemente"
- label_singular: "Element"
- name: "feature_item"
- widget: "list"
- collapsed: true
- fields:
- - {label: "Bezeichnung", name: "name", widget: "string", required: false}
- - {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://pictogrammers.com/library/mdi/"}
- - {label: "Bild", name: "image", widget: "image", required: false }
- - {label: "Inhalt", name: "content", widget: "markdown", required: false}
- - label: "Ganztagsangebote"
- name: "ganztagsangebote"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Titel", name: "title", widget: "string", required: false}
- - label: "Button-Abschnitt"
- name: "cta"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Titel", name: "title", widget: "string", required: false}
- - {label: "Untertitel", name: "subtitle", widget: "string", required: false}
- - label: "Button"
- name: "button"
- widget: "object"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Bezeichnung", name: "label", widget: "string", required: false}
- - {label: "Link", name: "link", widget: "string", required: false}
- - label: "Informationsabschnitt"
- name: "info"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false }
- - {label: "Titel", name: "title", widget: "string", required: false}
- - {label: "Inhalt", name: "content", widget: "markdown", required: false}
- - {label: "Video-Link", name: "video_link", widget: "string", required: false}
- - label: "Termine"
- name: "termine"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Titel", name: "title", widget: "string", required: false}
- - label: "DigitalPakt-Banner"
- name: "digitalpakt"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Titel", name: "title", widget: "string", required: false}
- - {label: "Bild", name: "image", widget: "image", required: false }
- - {label: "Inhalt", name: "content", widget: "markdown", required: false}
- - label: "Partnerlogos (unten)"
- name: "footer_logos"
- widget: "object"
- collapsed: true
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - label: "Logos"
- label_singular: "Logo"
- name: "logos"
- widget: "list"
- required: false
- collapsed: true
- fields:
- - {label: "Titel", name: "title", widget: "string", required: false}
- - {label: "Link", name: "link", widget: "string", required: false}
- - {label: "Grafik", name: "image", widget: "image", required: true}
- - name: "hugo-config"
- label: "Website-Konfiguration"
- file: "config.yml"
- fields:
- - {label: "Website-URL", name: "baseURL", widget: "string"}
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Elemente je Seite", name: "paginate", widget: "number", value_type: "int"}
- - {label: "Länge von Zusammenfassungen", name: "summaryLength", widget: "number", value_type: "int"}
- - {label: "Standardsprache in Unterordner", name: "defaultContentLanguageInSubdir", widget: "boolean", required: false}
- - {label: "Standardsprache", name: "defaultContentLanguage", widget: "string"}
- - {label: "Emoji", name: "enableEmoji", widget: "boolean", required: false}
- - {label: "robots.txt", name: "enableRobotsTxt", widget: "boolean", required: false}
- - {label: "Zeitzone", name: "timeZone", widget: "string"}
- - {label: "Pfade von Akzenten und Umlauten bereinigen", name: "removePathAccents", widget: "boolean", required: false, default: true}
- - label: "Markdown-Enstellungen"
- name: "markup"
- widget: "object"
- collapsed: true
- summary: '{{fields.defaultMarkdownHandler}}'
- fields:
- - {label: "standardmäßiger Markdown-Handler", name: "defaultMarkdownHandler", widget: "select", options: ["blackfriday", "goldmark"]}
- - label: "Goldmark-Einstellungen"
- name: "goldmark"
- widget: "object"
- fields:
- - label: "Renderer-Einstellungen"
- name: "renderer"
- widget: "object"
- fields: [{label: "Unsicheren Inhalt erlauben", name: "unsafe", widget: "boolean", required: false}]
- - label: "Einstellungen"
- name: "params"
- widget: "object"
- collapsed: true
- fields:
- - label: "Plugins"
- name: "plugins"
- widget: "object"
- collapsed: true
- fields:
- - label: "CSS"
- label_singular: "CSS-Stylesheet"
- name: "css"
- widget: "list"
- collapsed: true
- fields:
- - {label: "Link", name: "link", widget: "string"}
- - label: "JavaScript"
- label_singular: "JS-Datei"
- name: "js"
- widget: "list"
- collapsed: true
- fields:
- - {label: "Link", name: "link", widget: "string"}
- - label: "JavaScript (am Seitenanfang)"
- label_singular: "JS-Datei"
- name: "head_js"
- widget: "list"
- collapsed: true
- fields:
- - {label: "Link", name: "link", widget: "string"}
- - {label: "Logo", name: "logo", widget: "image" }
- - {label: "Autor", name: "author", widget: "string"}
- - {label: "Adresse", name: "address", widget: "string"}
- - {label: "Route (Link)", name: "route_link", widget: "string"}
- - {label: "Telefonnummer", name: "mobile", widget: "string"}
- - {label: "E-Mail-Adresse", name: "email", widget: "string"}
- - {label: "E-Mail-Adresse (UI-Ansicht)", name: "email_label", widget: "string"}
- - {label: "Beschreibung", name: "description", widget: "string"}
- - {label: "Kontakt-Titelleiste", name: "top_header", widget: "boolean"}
- - label: "Vorschaubilder"
- label_singular: "Vorschaubild"
- name: "images"
- widget: "list"
- required: false
- fields:
- - label: "Bild-Pfad"
- name: "path"
- widget: "string"
- - {label: "Twitter-Konto", name: "twitter", widget: "string", required: false}
- - label: "Ladeanimation"
- name: "preloader"
- widget: "object"
- collapsed: true
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Logo", name: "preloader", widget: "image" }
- - {label: "Ladeanimation", name: "loader", widget: "image" }
- - label: "Soz. Netzwerke"
- label_singular: "Soz. Netzwerk"
- name: "social"
- widget: "list"
- collapsed: true
- fields:
- - {label: "Bezeichnung", name: "title", widget: "string"}
- - {label: "Symbol", name: "icon", widget: "string", hint: "Liste unter https://pictogrammers.com/library/mdi/"}
- - {label: "Link", name: "link", widget: "string"}
- - label: "Menü"
- name: "menu"
- widget: "object"
- collapsed: true
- fields:
- - label: "Hauptmenü"
- label_singular: "Menüeintrag"
- name: "main"
- widget: "list"
- collapsed: true
- fields:
- - {label: "Titel", name: "name", widget: "string"}
- - {label: "Position", name: "weight", widget: "number", hint: "Je höher die Nummer, desto weiter unten liegt der Menüeintrag"}
- - {label: "Erweitertes Menü", name: "hasChildren", widget: "boolean", required: false, hint: "Der Menüpunkt dient als Untermenü für weitere Elemente"}
- - {label: "Link", name: "URL", widget: "string", required: false}
- - {label: "Untermenü von", name: "parent", widget: "relation", collection: "config", file: "hugo-config", search_fields: ['menu.main.*.name'], display_fields: ['menu.main.*.name'], value_field: "menu.main.*.name", required: false, hint: "Menüeintrag, dem dieser untergeordnet ist"}
- - label: "Parameter"
- name: "params"
- widget: "object"
- collapsed: false
- fields:
- - {label: "Externer Link", hint: "Wird in neuem Tab geöffnet.", name: "external", widget: "boolean", default: false, required: false}
- - {label: "Trennlinie", hint: "Trennlinie unter den Menüpunkt einfügen.", name: "separator", widget: "boolean", default: false, required: false}
- - label: "Link-Liste"
- label_singular: "Link"
- name: "footer"
- widget: "list"
- hint: "Im Footer sichtbar"
- collapsed: true
- fields:
- - {label: "Titel", name: "name", widget: "string"}
- - {label: "Link", name: "URL", widget: "string"}
- - label: "Sprachen"
- name: "languages"
- widget: "object"
- collapsed: true
- fields:
- - label: "Deutsch"
- name: "de"
- widget: "object"
- fields:
- - {label: "Abkürzung", name: "languageName", widget: "string"}
- - {label: "Sprachcode", name: "languageCode", widget: "string"}
- - {label: "Inhalt-Ordner", name: "contentDir", widget: "string"}
- - {label: "Position", name: "weight", widget: "number"}
- - {label: "Startseitenbezeichnung", name: "home", widget: "string"}
- - {label: "Copyright-Hinweis", name: "copyright", widget: "string"}
- - {label: "Impressum-Link", name: "impressumURL", widget: "string"}
- - {label: "Datenschutz-Link", name: "dseURL", widget: "string"}
- - label: "Privatsphäre"
- name: "privacy"
- widget: "object"
- collapsed: true
- fields:
- - label: "Disqus"
- name: "disqus"
- widget: "object"
- fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
- - label: "Google Analytics"
- name: "googleAnalytics"
- widget: "object"
- fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
- - label: "Instagram"
- name: "instagram"
- widget: "object"
- fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
- - label: "Twitter"
- name: "twitter"
- widget: "object"
- fields: [{label: "Tracking deaktivieren", name: "enableDNT", widget: "boolean", required: false}]
- - label: "YouTube"
- name: "youtube"
- widget: "object"
- fields: [{label: "Piped-Proxy", name: "privacyEnhanced", widget: "boolean", required: false}]
- - label: "Vimeo"
- name: "vimeo"
- widget: "object"
- fields: [{label: "Tracking deaktivieren", name: "enableDNT", widget: "boolean", required: false}]
- - name: "categories-config"
- label: "Kategorien"
- file: "data/de/categories.yml"
- fields:
- - label: "Aktuelles"
- label_singular: "Kategorie"
- name: "blog"
- widget: "list"
- required: true
- collapsed: true
- fields:
- - {label: "Kategorie", name: "category", widget: "string", required: true}
- - label: "Ganztagsbereich"
- label_singular: "Kategorie"
- name: "ganztag"
- widget: "list"
- required: true
- collapsed: true
- fields:
- - {label: "Kategorie", name: "category", widget: "string", required: true}
- - label: "Wettbewerbe"
- label_singular: "Kategorie"
- name: "contests"
- widget: "list"
- required: true
- collapsed: true
- fields:
- - {label: "Kategorie", name: "category", widget: "string", required: true}
- - label: "Begabtenförderung"
- label_singular: "Kategorie"
- name: "begabte"
- widget: "list"
- required: true
- collapsed: true
- fields:
- - {label: "Kategorie", name: "category", widget: "string", required: true}
- - label: "Fächer (Fachzuordnung)"
- label_singular: "Fach"
- name: "subjects"
- widget: "list"
- required: true
- collapsed: true
- fields:
- - {label: "Fach", name: "subject", widget: "string", required: true}
- - name: "ausblick-config"
- label: "Ausblick auf die Woche"
- file: "data/de/ausblick.yml"
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - {label: "Titel", name: "title", widget: "string", required: false}
- - label: "Autor"
- name: "author"
- widget: "relation"
- collection: "author"
- search_fields: ["title"]
- value_field: "title"
- required: false
- - {label: "Titelbild", name: "image", widget: "image", required: false }
- - {label: "Inhalt", name: "content", widget: "markdown", required: false}
- - name: "index-pages"
- icon: "page"
- label: "Hauptseiten"
- label_singular: "Hauptseite"
- 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.
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "description"]
- files:
- - name: "blog-index"
- label: "Aktuelles"
- file: "content/german/blog/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "about-index"
- label: "Über die Schule"
- file: "content/german/about/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false }
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - label: "Statistik"
- name: "stats"
- widget: "object"
- collapsed: true
- fields:
- - {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
- - label: "Elemente"
- name: "zahlen"
- widget: "list"
- fields:
- - {label: "Bezeichnung", name: "name", widget: "string", required: false}
- - {label: "Zahl", name: "count", widget: "number", required: false}
- - {label: "Text", name: "body", widget: "markdown"}
- - name: "anmeldung-index"
- label: "Aufnahmeverfahren"
- file: "content/german/anmeldung/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - label: "Elemente"
- label_singular: "Element"
- name: "elements"
- widget: "list"
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Text", name: "content", widget: "markdown", required: true}
- required: false
- - {label: "Text", name: "body", widget: "markdown", required: false}
- - name: "author-index"
- label: "Autoren"
- file: "content/german/author/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "anmeldeformular"
- label: "Anmeldeformular"
- file: "content/german/anmeldeformular/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Text", name: "body", widget: "markdown", required: false}
- - name: "cantorpreis-index"
- label: "Cantorpreis"
- file: "content/german/cantorpreis/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "contact-index"
- label: "Kontakt"
- file: "content/german/kontakt/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - label: "Kontaktdaten"
- name: "kontaktdaten"
- widget: "list"
- required: true
- collapsed: true
- fields:
- - {label: "Name", name: "name", widget: "string", required: true}
- - {label: "Berufsbezeichnung", name: "position", widget: "string", required: true}
- - {label: "E-Mail-Adresse", name: "email", widget: "string", required: true, pattern: ["^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", "name@domain.tld"]}
- - name: "event-index"
- label: "Termine"
- file: "content/german/termine/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - label: Termine
- label_singular: "Termin"
- name: "events"
- widget: "list"
- collapsed: true
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Datum/Startdatum", name: "date", widget: "datetime", required: true, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
- - {label: "Enddatum", name: "enddate", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", default: ""}
- - {label: "Ort", name: "location", widget: "string", required: false}
- required: false
- - name: "forms-index"
- label: "Dokumente und Formulare"
- file: "content/german/forms/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "ganztagsangebote-index"
- label: "Unser Ganztagsbereich"
- file: "content/german/ganztagsangebote/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "projektwoche-index"
- label: "Projektwoche"
- file: "content/german/projektwoche/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "wettbewerbe-index"
- label: "Wettbewerbe"
- file: "content/german/wettbewerbe/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "begabte-index"
- label: "Begabtenförderung"
- file: "content/german/begabte/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "abiturienten-index"
- label: "Abiturienten"
- file: "content/german/abiturienten/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - name: "cantorfora-index"
- label: "Cantorfora"
- file: "content/german/cantorfora/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Text", name: "body", widget: "markdown", required: false}
- - name: "schulchronik-index"
- label: "Schulchronik"
- file: "content/german/schulchronik/_index.md"
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Text", name: "body", widget: "markdown", required: false}
- - label: "Karte"
- name: "infocard"
- widget: "object"
- required: false
- fields:
- - {label: "Aktiviert", name: "enable", widget: "boolean", required: false}
- - {label: "Bild", name: "image", widget: "image", required: false}
- - {label: "Zitat", name: "quote", widget: "string", required: false}
- - {label: "Autor", name: "author", widget: "string", required: false}
- - label: "Informationsseiten"
- name: "links"
- widget: "list"
- required: false
- collapsed: true
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Link", name: "link", widget: "string", required: true}
- - name: "pages"
- icon: "page-add"
- label: "Zusatzseiten"
- label_singular: "Zusatzseite"
- description: "Zusatzseiten können direkt aus der grafischen Oberfläche heraus erstellt werden und sind unter https://cantorgymnasium.de/pages/[SEITENTITEL] einsehbar. Sie bestehen immer aus einem Titel, einer Metabeschreibung (kurzer Einstiegstext) und dem eigentlichen Inhalt. Einer Zusatzseite kann auch ein Alias, also eine alternative URL zugewiesen werden."
- folder: "content/german/pages"
- create: true
- editor:
- preview: true
- frame: true
- size: half
- slug: "{{slug}}"
- filter:
- field: type
- value: pages
- summary_fields: ["title", "draft","aliases", "description"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Type", name: "type", widget: "hidden", default: "pages"}
- - label: "Aliase"
- name: "aliases"
- widget: "list"
- fields:
- - label: "Alias"
- name: "alias"
- widget: "string"
- - {label: "Text", name: "body", widget: "markdown", required: false}
- - name: "author"
- icon: "user"
- label: "Autoren"
- label_singular: "Autor"
- description: Autoren können einem Blogartikel zugewiesen werden. Wir unterscheiden in aktive und inaktive sowie vereinfachte Autoren, welche nur mit dem Namen angezeigt werden, und erweiterte Autoren, für die eine Übersichtsseite angelegt wird.
- folder: "content/german/author"
- filter: {field: type, value: author}
- create: true
- slug: "{{slug}}"
- editor:
- preview: true
- frame: true
- size: half
- view_filters:
- - label: "aktiv"
- field: active
- pattern: true
- - label: "inaktiv"
- field: active
- pattern: false
- - label: "einfach"
- field: simplified
- pattern: true
- - label: "erweitert"
- field: simplified
- pattern: false
- view_groups:
- - label: "vereinfacht"
- field: simplified
- - label: "aktiv"
- field: active
- summary_fields: ["title", "active", "simplified", "body"]
- fields:
- - {label: "Name", name: "title", widget: "string"}
- - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
- - {label: "E-Mail-Adresse", name: "email", widget: "string", required: false}
- - {label: "Foto", name: "image", widget: "image", required: false, default: "/media/authors/gcg.webp" }
- - {label: "vereinfacht", name: "simplified", widget: "boolean", default: false, required: false}
- - {label: "aktiv", name: "active", widget: "boolean", default: true, required: false}
- - {label: "Beschreibung", name: "body", widget: "markdown"}
- - name: "blog"
- icon: "news"
- label: "Aktuelles"
- description: Diese Artikel werden im Bereich "Aktuelles" auf der Schulhomepage angezeigt. Sie können sowohl direkt veröffentlicht, als auch als Entwurf gespeichert werden.
- label_singular: "Artikel"
- folder: "content/german/blog"
- filter: {field: "type", value: "post"}
- create: true
- slug: "{{slug}}"
- editor:
- preview: true
- frame: true
- size: half
- view_groups:
- - label: Entwurf
- field: draft
- - label: Kategorie
- field: categories
- sortable_fields:
- fields: ['date', 'title']
- default:
- field: date
- direction: Descending
- summary_fields: ["date", "title", "draft", "author", "body"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Datum", name: "date", widget: "datetime", date_format: "dd/MM/yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
- - {label: "Beitragsbild", name: "image", widget: "image", default: "/media/image.webp" }
- - label: "Beitragsautor"
- name: "author"
- widget: "relation"
- collection: "author"
- search_fields: ["title"]
- value_field: "title"
- - label: "Kategorien"
- name: "categories"
- widget: "relation"
- required: true
- collection: "config"
- file: "categories-config"
- value_field: "blog.*"
- search_fields: ["blog.*"]
- display_fields: ["blog.*"]
- multiple: true
- options_length: 50
- - label: "Fächer"
- name: "subjects"
- widget: "relation"
- required: false
- collection: "config"
- file: "categories-config"
- value_field: "subjects.*"
- search_fields: ["subjects.*"]
- display_fields: ["subjects.*"]
- multiple: true
- options_length: 50
- - label: "Tags"
- name: "tags"
- widget: "list"
- required: false
- fields:
- - label: "Tag"
- name: "tag"
- widget: "string"
- - {label: "Type", name: "type", widget: "hidden", default: "post"}
- - {label: "Text", name: "body", widget: "markdown"}
- - name: "forms"
- icon: "document"
- label: "Dokumente"
- label_singular: "Dokument"
- description: "Hier sind Formulare, Vorlagen und andere Dokumente zu hinterlegen."
- folder: "content/german/forms"
- filter: {field: "type", value: "forms"}
- create: true
- slug: "{{slug}}"
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "draft"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - label: "Dateien"
- name: "files"
- widget: "list"
- required: false
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Datei", name: "link", widget: "file"}
- - {label: "Type", name: "type", widget: "hidden", default: "forms"}
- - {label: "Text", name: "body", widget: "markdown"}
- - name: "ganztagsangebote"
- description: "Hier kann die Übersicht der Ganztagsangebote bearbeitet werden."
- icon: "group"
- label: "Ganztagsangebote"
- label_singular: "Ganztagsangebot"
- folder: "content/german/ganztagsangebote"
- filter: {field: "type", value: "ganztagsangebote"}
- create: true
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "draft", "category", "schedule", "room"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false }
- - label: "Themenbereich"
- name: "category"
- widget: "relation"
- required: true
- collection: "config"
- file: "categories-config"
- value_field: "ganztag.*"
- search_fields: ["ganztag.*"]
- display_fields: ["ganztag.*"]
- options_length: 50
- - {label: "Dauer", name: "duration", widget: "string"}
- - {label: "Tag/Stunden", name: "schedule", widget: "string"}
- - {label: "Klassenstufen", name: "class", widget: "string"}
- - {label: "Raum", name: "room", widget: "string"}
- - {label: "Anmeldelink", name: "apply_url", widget: "hidden", default: "https://moodle.bildung-lsa.de/gcg/mod/choice/view.php?id=828"}
- - {label: "Type", name: "type", widget: "hidden", default: "ganztagsangebote"}
- - {label: "Text", name: "body", widget: "markdown"}
- - name: "wettbewerbe"
- description: "Hier kann die Übersicht der Wettbewerbe bearbeitet werden."
- icon: "trophy"
- label: "Wettbewerbe"
- label_singular: "Wettbewerb"
- folder: "content/german/wettbewerbe"
- filter: {field: "type", value: "wettbewerbe"}
- create: true
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "draft", "category"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false }
- - label: "Fach"
- name: "category"
- widget: "relation"
- required: true
- collection: "config"
- file: "categories-config"
- value_field: "contests.*"
- search_fields: ["contests.*"]
- display_fields: ["contests.*"]
- options_length: 50
- - {label: "Klassenstufen", name: "class", widget: "string"}
- - {label: "Website", name: "web_url", widget: "string", required: false}
- - {label: "Type", name: "type", widget: "hidden", default: "wettbewerbe"}
- - {label: "Text", name: "body", widget: "markdown"}
- - name: "begabte"
- description: "Hier kann die Übersicht der Begabtenförderungsangebote bearbeitet werden."
- icon: "pi"
- label: "Begabtenförderung"
- label_singular: "Begabtenförderung"
- folder: "content/german/begabte"
- filter: {field: "type", value: "begabte"}
- create: true
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "draft", "body"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false }
- - {label: "Klassenstufen", name: "class", widget: "string"}
- - {label: "Website", name: "web_url", widget: "string", required: false}
- - {label: "Type", name: "type", widget: "hidden", default: "begabte"}
- - {label: "Text", name: "body", widget: "markdown"}
- - name: "projektwoche"
- description: "Hier kann die Übersicht der Projektwochen bearbeitet werden."
- icon: "projektwoche"
- label: "Projektwoche"
- label_singular: "Projektwoche"
- folder: "content/german/projektwoche"
- filter: {field: "type", value: "projektwoche"}
- create: true
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "draft", "tiles", "description"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Type", name: "type", widget: "hidden", default: "projektwoche"}
- - {label: "Text", name: "body", widget: "markdown", required: false, default: ""}
- - label: "Kacheln"
- name: "tiles"
- widget: "list"
- required: false
- collapsed: true
- hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte."
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Hintergrundfarbe", name: "bg_color", widget: "color", required: true}
- - {label: "Symbol", name: "icon", widget: "string", required: true}
- - {label: "Symbolfarbe", name: "font_color", widget: "color", required: true}
- - {label: "Inhalt", name: "content", widget: "markdown", required: true}
- - name: "schulchronik"
- description: "Hier können die Chronikjahre bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet."
- icon: "pillar"
- label: "Schulchronik"
- label_singular: "Chronikjahr"
- folder: "content/german/schulchronik"
- 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
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Type", name: "type", widget: "hidden", default: "schulchronik"}
- - {label: "Einleitung", name: "pretext", hint: "Jahreszahltext", widget: "markdown", required: false}
- - label: "Kreative Haufen"
- name: "topics"
- widget: "list"
- required: false
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Inhalt", name: "content", widget: "markdown", required: true}
- - label: "Superhaufen"
- name: "superhaufen"
- widget: "object"
- required: false
- fields:
- - {label: "Aktiviert", name: "enable", widget: "boolean", required: false}
- - label: "Superhaufen"
- name: "link"
- widget: "relation"
- collection: "superhaufen"
- search_fields: ["title"]
- value_field: "title"
- required: false
- collapsed: true
- - label: "Cantorpreisträger"
- name: "cantorpreisträger"
- widget: "relation"
- collection: "cantorpreis"
- search_fields: ["jahr", "name"]
- value_field: "name"
- required: false
- - {label: "Text", name: "body", widget: "markdown", required: false, default: ""}
- - name: "superhaufen"
- description: "\"Superhaufen\" sind ein besonderer Bereich der Schulchronik, um besonders ausführliche Ereignisse darzustellen. Dieser Bereich wird von der Schulchronik verwaltet."
- icon: "superhaufen"
- label: "Superhaufen"
- label_singular: "Superhaufen"
- folder: "content/german/superhaufen"
- filter: {field: "type", value: "superhaufen"}
- create: true
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "draft", "tiles"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Type", name: "type", widget: "hidden", default: "superhaufen"}
- - label: "Rückverlinkung"
- name: "previous"
- widget: "object"
- fields:
- - {label: "Aktiviert", name: "enable", widget: "boolean", default: true}
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Link", name: "link", widget: "string", required: true}
- - label: "Kacheln"
- name: "tiles"
- widget: "list"
- required: false
- collapsed: true
- hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte."
- fields:
- - {label: "Titel", name: "title", widget: "string", required: true}
- - {label: "Hintergrundfarbe", name: "bg_color", widget: "color", required: true}
- - {label: "Symbol", name: "icon", widget: "string", required: true}
- - {label: "Symbolfarbe", name: "font_color", widget: "color", required: true}
- - {label: "Inhalt", name: "content", widget: "markdown", required: true}
- - label: "Unter-Unterhaufen"
- name: "unterhaufen"
- widget: "list"
- required: false
- collapsed: true
- fields:
- - {label: "Titel", name: "title", widget: "string", required: false}
- - {label: "Inhalt", name: "content", widget: "markdown", required: true}
- - name: "cantorpreis"
- description: "Hier sind alle Cantorpreisträger aufgelistet. Dieser Bereich wird von der Schulchronik verwaltet."
- icon: "award"
- label: "Cantorpreisträger"
- label_singular: "Cantorpreisträger"
- folder: "content/german/cantorpreis"
- filter: {field: "type", value: "cantorpreis"}
- sortable_fields:
- fields: ['title', 'name']
- default:
- field: title
- direction: Descending
- summary: "{{title}} - {{name}}"
- create: true
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "name", "draft", "body"]
- fields:
- - {label: "Jahr", name: "title", widget: "string"}
- - {label: "Name", name: "name", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Beschreibung", name: "description", widget: "text", required: false}
- - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false }
- - {label: "Type", name: "type", widget: "hidden", default: "cantorpreis"}
- - {label: "Text", name: "body", widget: "markdown", required: false}
- - name: "abiturienten"
- description: "Hier kann die Übersicht der Abiturjahrgänge bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet."
- icon: "graduation-cap"
- label: "Abiturienten"
- label_singular: "Abiturjahrgang"
- folder: "content/german/abiturienten"
- filter: {field: "type", value: "abiturienten"}
- create: true
- editor:
- preview: true
- frame: true
- size: half
- summary_fields: ["title", "draft"]
- sortable_fields:
- fields: ["title"]
- default:
- field: title
- direction: Descending
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Bild", name: "image", widget: "image", default: "/media/image.webp", required: false }
- - {label: "Type", name: "type", widget: "hidden", default: "abiturienten"}
- - {label: "Text", name: "body", widget: "markdown"}
- - name: "cantorfora"
- description: "Hier kann die Übersicht der Cantorfora bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet."
- icon: "presentation"
- label: "Cantorfora"
- label_singular: "Cantorforum"
- folder: "content/german/cantorfora"
- filter: {field: "type", value: "cantorfora"}
- create: true
- slug: "{{slug}}"
- editor:
- preview: true
- frame: true
- size: half
- view_groups:
- - label: Drafts
- field: draft
- summary_fields: ["title", "draft", "description"]
- sortable_fields:
- fields: ['index', 'title']
- default:
- field: index
- direction: Descending
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Laufindex", name: "index", widget: "number", value_type: 'int', min: 1, step: 1, required: true, hint: "Nummer des Cantorforums"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
- - {label: "Beitragsbild", name: "image", widget: "image", default: "/media/image.webp" }
- - {label: "Type", name: "type", widget: "hidden", default: "cantorfora"}
- - {label: "Text", name: "body", widget: "markdown"}
- - name: "chronikseiten"
- description: "Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten."
- icon: "page-add"
- label: "Chronikseiten"
- label_singular: "Zusatzseite (Chronik)"
- folder: "content/german/chronikseiten"
- create: true
- editor:
- preview: true
- frame: true
- size: half
- slug: "{{slug}}"
- filter: {field: "type", value: "pages"}
- summary_fields: ["title", "draft", "aliases", "body"]
- fields:
- - {label: "Titel", name: "title", widget: "string"}
- - {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- - {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- - {label: "Type", name: "type", widget: "hidden", default: "pages"}
- - label: "Aliase"
- name: "aliases"
- widget: "list"
- required: false
- fields:
- - label: "Alias"
- name: "alias"
- widget: "string"
- - {label: "Text", name: "body", widget: "markdown", required: false}
- - name: "statistik"
- description: "Hier können statistische Daten bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet."
- icon: "stats"
- label: "Statistik"
- editor:
- preview: false
- size: half
- files:
- - name: "abiturdurchschnitte"
- label: "Abiturdurchschnitte"
- file: "static/data/abiturdurchschnitte.json"
- fields:
- - label: "Abiturdurchschnitte"
- label_singular: "Abiturdurchschnitt"
- name: "abiturdurchschnitte"
- widget: "list"
- required: false
- fields:
- - {label: "Jahr", name: "jahr", widget: "number", required: true}
- - {label: "Schnitt", name: "schnitt", widget: "number", value_type: "float", step: 0.01, required: true}
- - name: "schuelerzahlen"
- label: "Schülerzahlen"
- file: "static/data/schuelerzahlen.json"
- fields:
- - label: "Schülerzahlen"
- label_singular: "Schülerzahlen"
- name: "schuelerzahlen"
- widget: "list"
- required: false
- fields:
- - {label: "Jahr", name: "year", widget: "number", required: true}
- - {label: "Gesamt", name: "all", widget: "number", required: true}
- - {label: "davon Mädchen", name: "girls", widget: "number", required: true}
diff --git a/static/admin/config/collections/abiturienten.js b/static/admin/config/collections/abiturienten.js
index 84554b78..15d636ce 100644
--- a/static/admin/config/collections/abiturienten.js
+++ b/static/admin/config/collections/abiturienten.js
@@ -2,53 +2,55 @@ import { MarkdownProps } from "../props.js";
import { DraftBoolean, Title } from "./widgets.js";
const AbiturientenCollection = {
- name: "abiturienten",
- label: "Abiturienten",
- label_singular: "Abiturjahrgang",
- description: "Hier kann die Übersicht der Abiturjahrgänge bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
- icon: "graduation-cap",
- folder: "content/german/abiturienten",
- filter: {
- field: "type",
- value: "abiturienten"
+ name: "abiturienten",
+ label: "Abiturienten",
+ label_singular: "Abiturjahrgang",
+ description:
+ "Hier kann die Übersicht der Abiturjahrgänge bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
+ icon: "graduation-cap",
+ folder: "content/german/abiturienten",
+ filter: {
+ field: "type",
+ value: "abiturienten",
+ },
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ summary_fields: ["title", "draft"],
+ sortable_fields: {
+ fields: ["title"],
+ default: {
+ field: "title",
+ direction: "Descending",
},
- create: true,
- editor: {
- preview: true,
- frame: true
+ },
+ fields: [
+ Title(false),
+ DraftBoolean,
+ {
+ name: "image",
+ label: "Bild",
+ widget: "image",
+ default: "/media/image.webp",
+ required: false,
},
- summary_fields: ["title", "draft"],
- sortable_fields: {
- fields: ["title"],
- default: {
- field: "title",
- direction: "Descending"
- }
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "abiturienten",
},
- fields: [
- Title(false),
- DraftBoolean,
- {
- name: "image",
- label: "Bild",
- widget: "image",
- default: "/media/image.webp",
- required: false
- },
- {
- name: "type",
- label: "Typ",
- widget: "hidden",
- default: "abiturienten"
- },
- {
- name: "body",
- label: "Text",
- widget: "markdown",
- required: false,
- ...MarkdownProps
- }
- ]
+ {
+ name: "body",
+ label: "Text",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
};
-export default AbiturientenCollection;
\ No newline at end of file
+export default AbiturientenCollection;
diff --git a/static/admin/config/collections/author.js b/static/admin/config/collections/author.js
new file mode 100644
index 00000000..01bbd097
--- /dev/null
+++ b/static/admin/config/collections/author.js
@@ -0,0 +1,100 @@
+import { MarkdownProps, PatternEmail } from "../props.js";
+import { DescriptionText } from "./widgets.js";
+
+const AuthorCollection = {
+ name: "author",
+ label: "Autoren",
+ label_singular: "Autor",
+ description:
+ "Autoren können einem Blogartikel zugewiesen werden. Wir unterscheiden in aktive und inaktive sowie vereinfachte Autoren, welche nur mit dem Namen angezeigt werden, und erweiterte Autoren, für die eine Übersichtsseite angelegt wird.Autoren können einem Blogartikel zugewiesen werden.",
+ icon: "user",
+ folder: "content/german/author",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ filter: {
+ field: "type",
+ value: "author",
+ },
+ view_filters: [
+ {
+ label: "aktiv",
+ field: "active",
+ pattern: true,
+ },
+ {
+ label: "inaktiv",
+ field: "active",
+ pattern: false,
+ },
+ {
+ label: "einfach",
+ field: "simplified",
+ pattern: true,
+ },
+ {
+ label: "erweitert",
+ field: "simplified",
+ pattern: false,
+ },
+ ],
+ view_groups: [
+ {
+ label: "vereinfacht",
+ field: "simplified",
+ },
+ {
+ label: "aktiv",
+ field: "active",
+ },
+ ],
+ summary_fields: ["title", "active", "simplified", "body"],
+ fields: [
+ {
+ name: "title",
+ label: "Name",
+ widget: "string",
+ required: true,
+ },
+ DescriptionText,
+ {
+ name: "email",
+ label: "E-Mail-Adresse",
+ widget: "string",
+ required: false,
+ ...PatternEmail,
+ },
+ {
+ name: "image",
+ label: "Bild",
+ widget: "image",
+ required: false,
+ default: "/media/authors/gcg.webp",
+ },
+ {
+ name: "simplified",
+ label: "vereinfacht",
+ widget: "boolean",
+ required: false,
+ },
+ {
+ name: "active",
+ label: "aktiv",
+ widget: "boolean",
+ required: false,
+ default: true,
+ },
+ {
+ name: "body",
+ label: "Beschreibung",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+};
+
+export default AuthorCollection;
diff --git a/static/admin/config/collections/begabte.js b/static/admin/config/collections/begabte.js
new file mode 100644
index 00000000..62d76e6a
--- /dev/null
+++ b/static/admin/config/collections/begabte.js
@@ -0,0 +1,62 @@
+import { MarkdownProps } from "../props.js";
+import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
+
+const BegabteCollection = {
+ name: "begabte",
+ label: "Begabtenförderung",
+ label_singular: "Begabtenförderungsangebot",
+ description:
+ "Hier kann die Übersicht der Begabtenförderungsangebote bearbeitet werden.",
+ icon: "pi",
+ folder: "content/german/begabte",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ filter: {
+ field: "type",
+ value: "begabte",
+ },
+ summary_fields: ["title", "draft", "body"],
+ fields: [
+ Title(false),
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "image",
+ label: "Titelbild",
+ widget: "image",
+ required: true,
+ default: "/media/image.webp",
+ },
+ {
+ 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: "begabte",
+ },
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ ],
+};
+
+export default BegabteCollection;
diff --git a/static/admin/config/collections/blog.js b/static/admin/config/collections/blog.js
new file mode 100644
index 00000000..ac25eeeb
--- /dev/null
+++ b/static/admin/config/collections/blog.js
@@ -0,0 +1,114 @@
+import { DateFormat, MarkdownProps } from "../props.js";
+import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
+
+const BlogCollection = {
+ name: "blog",
+ label: "Aktuelles",
+ label_singular: "Artikel",
+ description:
+ 'Diese Artikel werden im Bereich "Aktuelles" auf der Schulhomepage angezeigt. Sie können sowohl direkt veröffentlicht, als auch als Entwurf gespeichert werden.',
+ icon: "news",
+ folder: "content/german/blog",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ filter: {
+ field: "type",
+ value: "post",
+ },
+ view_groups: [
+ {
+ label: "Entwurf",
+ field: "draft",
+ },
+ ],
+ sortable_fields: {
+ fields: ["date", "title"],
+ default: {
+ field: "date",
+ direction: "Descending",
+ },
+ },
+ summary_fields: ["date", "title", "draft", "author", "body"],
+ fields: [
+ Title(false),
+ {
+ name: "date",
+ label: "Datum",
+ widget: "datetime",
+ required: true,
+ ...DateFormat,
+ },
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "image",
+ label: "Titelbild",
+ widget: "image",
+ required: true,
+ default: "/media/image.webp",
+ },
+ {
+ name: "author",
+ label: "Autor(en)",
+ hint: "Verwaltet im Autoren-Bereich. Mehrere Autoren werden in alphabetischer Reihenfolge aufgelistet.",
+ widget: "relation",
+ collection: "author",
+ value_field: "{{slug}}",
+ search_fields: ["{{title}}"],
+ display_fields: ["{{title}}"],
+ multiple: true,
+ required: true,
+ },
+ {
+ name: "categories",
+ label: "Kategorien",
+ hint: "Verwaltet in den Einstellungen",
+ widget: "relation",
+ collection: "settings",
+ file: "data-categories",
+ value_field: "blog.*",
+ search_fields: ["blog.*"],
+ display_fields: ["blog.*"],
+ multiple: true,
+ required: true,
+ },
+ {
+ name: "subjects",
+ label: "Fächer",
+ hint: "Verwaltet in den Einstellungen",
+ widget: "relation",
+ collection: "settings",
+ file: "data-categories",
+ value_field: "subjects.*",
+ search_fields: ["subjects.*"],
+ display_fields: ["subjects.*"],
+ multiple: true,
+ required: true,
+ },
+ {
+ name: "tags",
+ label: "Tags",
+ widget: "list",
+ delimiter: ",",
+ },
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "post",
+ },
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ ],
+};
+
+export default BlogCollection;
diff --git a/static/admin/config/collections/cantorfora.js b/static/admin/config/collections/cantorfora.js
index 1664a3da..3679f639 100644
--- a/static/admin/config/collections/cantorfora.js
+++ b/static/admin/config/collections/cantorfora.js
@@ -2,70 +2,72 @@ import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const CantorforaCollection = {
- name: "cantorfora",
- label: "Cantorfora",
- label_singular: "Cantorforum",
- description: "Hier kann die Übersicht der Cantorfora bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
- icon: "presentation",
- folder: "content/german/cantorfora",
- filter: {
- field: "type",
- value: "cantorfora"
+ name: "cantorfora",
+ label: "Cantorfora",
+ label_singular: "Cantorforum",
+ description:
+ "Hier kann die Übersicht der Cantorfora bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
+ icon: "presentation",
+ folder: "content/german/cantorfora",
+ filter: {
+ field: "type",
+ value: "cantorfora",
+ },
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ view_groups: [
+ {
+ label: "Entwürfe",
+ field: "draft",
},
- create: true,
- editor: {
- preview: true,
- frame: true
+ ],
+ summary_fields: ["title", "draft", "description"],
+ sortable_fields: {
+ fields: ["index", "title"],
+ default: {
+ field: "index",
+ direction: "Descending",
},
- view_groups: [
- {
- label: "Entwürfe",
- field: "draft"
- }
- ],
- summary_fields: ["title", "draft", "description"],
- sortable_fields: {
- fields: ['index', 'title'],
- default: {
- field: "index",
- direction: "Descending"
- }
+ },
+ fields: [
+ Title(false),
+ {
+ name: "index",
+ label: "Laufindex",
+ hint: "Nummer des Cantorforums",
+ widget: "number",
+ value_type: "int",
+ min: 1,
+ step: 1,
+ required: true,
},
- fields: [
- Title(false),
- {
- name: "index",
- label: "Laufindex",
- hint: "Nummer des Cantorforums",
- widget: "number",
- value_type: "int",
- min: 1,
- step: 1,
- required: true
- },
- DraftBoolean,
- DescriptionText,
- {
- name: "image",
- label: "Titelbild",
- widget: "image",
- default: "/media/image.webp",
- required: true
- },
- {
- name: "type",
- label: "Typ",
- widget: "hidden",
- default: "cantorfora"
- },
- {
- name: "body",
- label: "Text",
- widget: "markdown",
- required: true,
- ...MarkdownProps
- }
- ]
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "image",
+ label: "Titelbild",
+ widget: "image",
+ default: "/media/image.webp",
+ required: true,
+ },
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "cantorfora",
+ },
+ {
+ name: "body",
+ label: "Text",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ ],
};
-export default CantorforaCollection;
\ No newline at end of file
+export default CantorforaCollection;
diff --git a/static/admin/config/collections/cantorpreis.js b/static/admin/config/collections/cantorpreis.js
index 2fbcba1f..d1c73d6c 100644
--- a/static/admin/config/collections/cantorpreis.js
+++ b/static/admin/config/collections/cantorpreis.js
@@ -2,65 +2,67 @@ import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean } from "./widgets.js";
const CantorpreisCollection = {
- name: "cantorpreis",
- label: "Cantorpreisträger",
- description: "Hier sind alle Cantorpreisträger aufgelistet. Dieser Bereich wird von der Schulchronik verwaltet.",
- icon: "award",
- folder: "content/german/cantorpreis",
- filter: {
- field: "type",
- value: "cantorpreis"
+ name: "cantorpreis",
+ label: "Cantorpreisträger",
+ description:
+ "Hier sind alle Cantorpreisträger aufgelistet. Dieser Bereich wird von der Schulchronik verwaltet.",
+ icon: "award",
+ folder: "content/german/cantorpreis",
+ filter: {
+ field: "type",
+ value: "cantorpreis",
+ },
+ sortable_fields: {
+ fields: ["title", "name"],
+ default: {
+ field: "title",
+ direction: "Descending",
},
- sortable_fields: {
- fields: ['title', 'name'],
- default: {
- field: "title",
- direction: "Descending"
- }
+ },
+ summary: "{{title}} - {{name}}",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ summary_fields: ["title", "name", "draft", "body"],
+ fields: [
+ {
+ name: "title",
+ label: "Jahr",
+ widget: "string",
+ required: true,
},
- summary: "{{title}} - {{name}}",
- create: true,
- editor: {
- preview: true,
- frame: true
+ {
+ name: "name",
+ label: "Name",
+ widget: "string",
+ required: true,
},
- summary_fields: ["title", "name", "draft", "body"],
- fields: [
- {
- name: "title",
- label: "Jahr",
- widget: "string",
- required: true
- },
- {
- name: "name",
- label: "Name",
- widget: "string",
- required: true
- },
- DraftBoolean,
- DescriptionText,
- {
- name: "image",
- label: "Bild",
- widget: "image",
- default: "/media/image.webp",
- required: false
- },
- {
- name: "type",
- label: "Typ",
- widget: "hidden",
- default: "cantorpreis"
- },
- {
- name: "body",
- label: "Text",
- widget: "markdown",
- required: false,
- ...MarkdownProps
- }
- ]
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "image",
+ label: "Bild",
+ widget: "image",
+ default: "/media/image.webp",
+ required: false,
+ },
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "cantorpreis",
+ },
+ {
+ name: "body",
+ label: "Text",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
};
-export default CantorpreisCollection;
\ No newline at end of file
+export default CantorpreisCollection;
diff --git a/static/admin/config/collections/chronikjahre.js b/static/admin/config/collections/chronikjahre.js
index b01fc1e9..05423352 100644
--- a/static/admin/config/collections/chronikjahre.js
+++ b/static/admin/config/collections/chronikjahre.js
@@ -2,110 +2,111 @@ import { MarkdownProps } from "../props.js";
import { DraftBoolean, EnableBoolean } from "./widgets.js";
const ChronikjahreCollection = {
- name: "chronikjahre",
- description: "Hier können die Chronikjahre bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
- icon: "schulchronik",
- label: "Chronikjahre",
- label_singular: "Chronikjahr",
- folder: "content/german/schulchronik",
- filter: {
- field: "type",
- value: "schulchronik"
+ name: "chronikjahre",
+ description:
+ "Hier können die Chronikjahre bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
+ icon: "schulchronik",
+ label: "Chronikjahre",
+ label_singular: "Chronikjahr",
+ folder: "content/german/schulchronik",
+ 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",
},
- create: true,
- editor: {
- preview: false
+ },
+ fields: [
+ {
+ name: "title",
+ label: "Jahr",
+ widget: "string",
},
- summary_fields: ["title", "draft", "cantorpreisträger", "topics"],
- sortable_fields: {
- fields: ['title'],
- default: {
- field: "title",
- direction: "Descending"
- }
+ DraftBoolean,
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "schulchronik",
},
- fields: [
+ {
+ 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: [
{
- name: "title",
- label: "Jahr",
- widget: "string"
- },
- DraftBoolean,
- {
- name: "type",
- label: "Typ",
- widget: "hidden",
- default: "schulchronik"
+ name: "title",
+ label: "Titel",
+ widget: "string",
+ required: true,
},
{
- name: "pretext",
- label: "Einleitung",
- hint: "Text für die Jahreszahl",
- widget: "markdown",
- required: false,
- ...MarkdownProps
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
},
{
- name: "topics",
- label: "Kreative Haufen",
- label_singular: "Haufen",
- widget: "list",
- required: false,
- collapsed: true,
- fields: [
- {
- name: "title",
- label: "Titel",
- widget: "string",
- required: true,
- },
- {
- name: "content",
- label: "Inhalt",
- widget: "markdown",
- required: false,
- ...MarkdownProps
- },
- {
- 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
- }
- ]
- }
- ]
+ 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,
+ },
+ ],
},
- {
- 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
- }
+ ],
+ },
+ {
+ 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,
+ },
+ ],
+};
- ]
-}
-
-export default ChronikjahreCollection;
\ No newline at end of file
+export default ChronikjahreCollection;
diff --git a/static/admin/config/collections/chronikseiten.js b/static/admin/config/collections/chronikseiten.js
index a91f94de..38affe4a 100644
--- a/static/admin/config/collections/chronikseiten.js
+++ b/static/admin/config/collections/chronikseiten.js
@@ -2,55 +2,57 @@ import { MarkdownProps } from "../props.js";
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
const ChronikseitenCollection = {
- name: "chronikseiten",
- label: "Chronikseiten",
- label_singular: "Zusatzseite (Chronik)",
- description: "Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten.",
- icon: "page-add",
- folder: "content/german/chronikseiten",
- create: true,
- editor: {
- preview: true,
- frame: true
+ name: "chronikseiten",
+ label: "Chronikseiten",
+ label_singular: "Zusatzseite (Chronik)",
+ description:
+ "Chronikseiten entsprechen von der Funktionalität herkömmlichen Zusatzseiten, sind allerdings der Schulchronik vorbehalten.",
+ icon: "page-add",
+ folder: "content/german/chronikseiten",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ filter: {
+ field: "type",
+ value: "pages",
+ },
+ summary_fields: ["title", "draft", "aliases", "body"],
+ fields: [
+ Title(false),
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "pages",
},
- filter: {
- field: "type",
- value: "pages"
+ {
+ name: "aliases",
+ label: "Aliase",
+ label_singular: "Alias",
+ widget: "list",
+ collapsed: true,
+ required: false,
+ fields: [
+ {
+ name: "alias",
+ label: "Alias",
+ widget: "string",
+ },
+ ],
},
- summary_fields: ["title", "draft", "aliases", "body"],
- fields: [
- Title(false),
- DraftBoolean,
- DescriptionText,
- {
- name: "type",
- label: "Typ",
- widget: "hidden",
- default: "pages"
- },
- {
- name: "aliases",
- label: "Aliase",
- label_singular: "Alias",
- widget: "list",
- collapsed: true,
- required: false,
- fields: [
- {
- name: "alias",
- label: "Alias",
- widget: "string"
- }
- ]
- },
- {
- name: "body",
- label: "Text",
- widget: "markdown",
- required: false,
- ...MarkdownProps
- }
- ]
-}
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+};
-export default ChronikseitenCollection;
\ No newline at end of file
+export default ChronikseitenCollection;
diff --git a/static/admin/config/collections/forms.js b/static/admin/config/collections/forms.js
new file mode 100644
index 00000000..3175e9d5
--- /dev/null
+++ b/static/admin/config/collections/forms.js
@@ -0,0 +1,65 @@
+import { MarkdownProps } from "../props.js";
+import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
+
+const FormsCollection = {
+ name: "forms",
+ label: "Dokumente",
+ label_singular: "Dokument",
+ description:
+ "Hier sind Formulare, Vorlagen und andere Dokumente zu hinterlegen.",
+ icon: "document",
+ folder: "content/german/forms",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ filter: {
+ field: "type",
+ value: "forms",
+ },
+ summary_fields: ["title", "draft"],
+ fields: [
+ Title(false),
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "files",
+ label: "Dateien",
+ label_singular: "Datei",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [
+ {
+ name: "title",
+ label: "Bezeichnung",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "link",
+ label: "Datei",
+ widget: "file",
+ required: true,
+ },
+ ],
+ },
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "forms",
+ },
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+};
+
+export default FormsCollection;
diff --git a/static/admin/config/collections/ganztag.js b/static/admin/config/collections/ganztag.js
new file mode 100644
index 00000000..075cc798
--- /dev/null
+++ b/static/admin/config/collections/ganztag.js
@@ -0,0 +1,92 @@
+import { MarkdownProps } from "../props.js";
+import { Title, DescriptionText, DraftBoolean } from "./widgets.js";
+
+const GanztagCollection = {
+ name: "ganztagsangebote",
+ label: "Ganztag",
+ label_singular: "Arbeitsgemeinschaft",
+ description:
+ "Hier kann die Übersicht der Ganztagsangebote bearbeitet werden.",
+ icon: "group",
+ folder: "content/german/ganztagsangebote",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ filter: {
+ field: "type",
+ value: "ganztagsangebote",
+ },
+ summary_fields: ["title", "draft", "category", "schedule", "room"],
+ fields: [
+ Title(false),
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "image",
+ label: "Titelbild",
+ widget: "image",
+ default: "/media/ganztagsangebote/image.webp",
+ required: true,
+ },
+ {
+ name: "category",
+ label: "Themebereich",
+ hint: "Verwaltet in den Einstellungen",
+ widget: "relation",
+ collection: "settings",
+ file: "data-categories",
+ value_field: "ganztag.*",
+ search_fields: ["ganztag.*"],
+ display_fields: ["ganztag.*"],
+ required: true,
+ },
+ {
+ name: "duration",
+ label: "Dauer",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "schedule",
+ label: "Tag/Stunden",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "class",
+ label: "Klassenstufen(n)",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "room",
+ label: "Raum",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "apply_url",
+ label: "Anmeldelink",
+ widget: "hidden",
+ default: "https://moodle.bildung-lsa.de/gcg/mod/choice/view.php?id=828",
+ },
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "ganztagsangebote",
+ },
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+};
+
+export default GanztagCollection;
diff --git a/static/admin/config/collections/index-pages.js b/static/admin/config/collections/index-pages.js
new file mode 100644
index 00000000..2c342ec5
--- /dev/null
+++ b/static/admin/config/collections/index-pages.js
@@ -0,0 +1,347 @@
+import {
+ DataObject,
+ DateFormat,
+ MarkdownProps,
+ PatternEmail,
+} from "../props.js";
+import { DescriptionText, EnableBoolean, Title } from "./widgets.js";
+
+const IndexPagesCollection = {
+ name: "index-pages",
+ label: "Hauptseiten",
+ label_singular: "Hauptseite",
+ 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.",
+ icon: "page",
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ summary_fields: ["title", "description"],
+ files: [
+ {
+ name: "blog-index",
+ label: "Aktuelles",
+ file: "content/german/blog/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "about-index",
+ label: "Über die Schule",
+ file: "content/german/about/_index.md",
+ fields: [
+ Title(false),
+ DescriptionText,
+ {
+ name: "image",
+ label: "Bild",
+ widget: "image",
+ required: false,
+ },
+ {
+ name: "stats",
+ label: "Statistik",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "zahlen",
+ label: "Elemente",
+ label_singular: "Element",
+ widget: "list",
+ required: false,
+ collapsed: false,
+ fields: [
+ {
+ name: "name",
+ label: "Bezeichnung",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "count",
+ label: "Zahl",
+ widget: "number",
+ value_type: "int",
+ min: 0,
+ step: 1,
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ {
+ name: "anmeldung-index",
+ label: "Aufnahmeverfahren",
+ file: "content/german/anmeldung/_index.md",
+ fields: [
+ Title(false),
+ DescriptionText,
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ {
+ name: "elements",
+ label: "Abschnitte",
+ label_singular: "Abschnitt",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [
+ Title(false),
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "author-index",
+ label: "Autoren",
+ file: "content/german/author/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "anmeldeformular",
+ label: "Anmeldeformular",
+ file: "content/german/anmeldeformular/_index.md",
+ fields: [
+ Title(false),
+ DescriptionText,
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ {
+ name: "cantorpreis-index",
+ label: "Cantorpreis",
+ file: "content/german/cantorpreis/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "kontakt",
+ label: "Kontakt",
+ file: "content/german/kontakt/_index.md",
+ fields: [
+ Title(false),
+ DescriptionText,
+ {
+ name: "kontaktdaten",
+ label: "Kontaktdaten",
+ widget: "list",
+ required: true,
+ collapsed: true,
+ fields: [
+ {
+ name: "name",
+ label: "Name",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "position",
+ label: "Berufsbezeichnung",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "email",
+ label: "E-Mail-Adresse",
+ widget: "string",
+ required: true,
+ ...PatternEmail,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "termine",
+ label: "Termine",
+ file: "content/german/termine/_index.md",
+ fields: [
+ Title(false),
+ DescriptionText,
+ {
+ name: "events",
+ label: "Termine",
+ label_singular: "Termin",
+ widget: "list",
+ required: true,
+ collapsed: true,
+ fields: [
+ {
+ name: "title",
+ label: "Bezeichnung",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "date",
+ label: "Datum/Startdatum",
+ widget: "datetime",
+ required: true,
+ ...DateFormat,
+ },
+ {
+ name: "enddate",
+ label: "Enddatum",
+ hint: "Für mehrtägige Veanstaltungen, nur sichtbar wenn eingestellt",
+ widget: "datetime",
+ required: false,
+ ...DateFormat,
+ },
+ {
+ name: "location",
+ label: "Ort",
+ widget: "string",
+ required: false,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "forms-index",
+ label: "Dokumente und Formulare",
+ file: "content/german/forms/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "ganztagsangebote-index",
+ label: "Unser Ganztagsbereich",
+ file: "content/german/ganztagsangebote/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "projektwoche-index",
+ label: "Projektwoche",
+ file: "content/german/projektwoche/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "wettbewerbe-index",
+ label: "Wettbewerbe",
+ file: "content/german/wettbewerbe/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "begabte-index",
+ label: "Begabtenförderung",
+ file: "content/german/begabte/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "abiturienten-index",
+ label: "Abiturienten",
+ file: "content/german/abiturienten/_index.md",
+ fields: [Title(false), DescriptionText],
+ },
+ {
+ name: "cantorfora-index",
+ label: "Cantorfora",
+ file: "content/german/cantorfora/_index.md",
+ fields: [
+ Title(false),
+ DescriptionText,
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ {
+ name: "schulchronik-index",
+ label: "Schulchronik",
+ file: "content/german/schulchronik/_index.md",
+ fields: [
+ Title(false),
+ DescriptionText,
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ {
+ name: "infocard",
+ label: "Zitatkarte",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "image",
+ label: "Bild",
+ widget: "image",
+ required: false,
+ },
+ {
+ name: "quote",
+ label: "Zitat",
+ widget: "text",
+ required: false,
+ },
+ {
+ name: "author",
+ label: "Autor",
+ widget: "string",
+ required: false,
+ },
+ ],
+ },
+ {
+ name: "links",
+ label: "Informationsseiten",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [
+ {
+ name: "title",
+ label: "Bezeichnung",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "link",
+ label: "Link",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+};
+
+export default IndexPagesCollection;
diff --git a/static/admin/config/collections/index.js b/static/admin/config/collections/index.js
index 252e7da4..16a7217f 100644
--- a/static/admin/config/collections/index.js
+++ b/static/admin/config/collections/index.js
@@ -1,9 +1,37 @@
import SettingsCollection from "./settings-collection.js";
+import IndexPagesCollection from "./index-pages.js";
+import PagesCollection from "./pages.js";
+import AuthorCollection from "./author.js";
+import BlogCollection from "./blog.js";
+import FormsCollection from "./forms.js";
+import GanztagCollection from "./ganztag.js";
+import WettbewerbeCollection from "./wettbewerbe.js";
+import BegabteCollection from "./begabte.js";
+import ProjektwocheCollection from "./projektwoche.js";
import ChronikjahreCollection from "./chronikjahre.js";
import SuperhaufenCollection from "./superhaufen.js";
import CantorpreisCollection from "./cantorpreis.js";
import AbiturientenCollection from "./abiturienten.js";
import CantorforaCollection from "./cantorfora.js";
import ChronikseitenCollection from "./chronikseiten.js";
+import StatsCollection from "./stats.js";
-export { SettingsCollection, ChronikjahreCollection, SuperhaufenCollection, CantorpreisCollection, AbiturientenCollection, CantorforaCollection, ChronikseitenCollection };
\ No newline at end of file
+export {
+ SettingsCollection,
+ IndexPagesCollection,
+ PagesCollection,
+ AuthorCollection,
+ BlogCollection,
+ FormsCollection,
+ GanztagCollection,
+ WettbewerbeCollection,
+ BegabteCollection,
+ ProjektwocheCollection,
+ ChronikjahreCollection,
+ SuperhaufenCollection,
+ CantorpreisCollection,
+ AbiturientenCollection,
+ CantorforaCollection,
+ ChronikseitenCollection,
+ StatsCollection,
+};
diff --git a/static/admin/config/collections/pages.js b/static/admin/config/collections/pages.js
new file mode 100644
index 00000000..8d9bb466
--- /dev/null
+++ b/static/admin/config/collections/pages.js
@@ -0,0 +1,58 @@
+import { MarkdownProps } from "../props.js";
+import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
+
+const PagesCollection = {
+ name: "pages",
+ label: "Zusatzseiten",
+ label_singular: "Zusatzseite",
+ description:
+ "Zusatzseiten können direkt aus der grafischen Oberfläche heraus erstellt werden und sind unter https://cantorgymnasium.de/pages/[SEITENTITEL] einsehbar. Sie bestehen immer aus einem Titel, einer Metabeschreibung (kurzer Einstiegstext) und dem eigentlichen Inhalt. Einer Zusatzseite kann auch ein Alias, also eine alternative URL zugewiesen werden.",
+ icon: "page-add",
+ folder: "content/german/pages",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ filter: {
+ field: "type",
+ value: "pages",
+ },
+ summary_fields: ["title", "draft", "aliases", "description"],
+ fields: [
+ Title(false),
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "pages",
+ },
+ {
+ name: "aliases",
+ label: "Aliase",
+ label_singular: "Alias",
+ widget: "list",
+ collapsed: true,
+ required: false,
+ fields: [
+ {
+ name: "alias",
+ label: "Alias",
+ widget: "string",
+ },
+ ],
+ },
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+};
+
+export default PagesCollection;
diff --git a/static/admin/config/collections/projektwoche.js b/static/admin/config/collections/projektwoche.js
new file mode 100644
index 00000000..a84e39ee
--- /dev/null
+++ b/static/admin/config/collections/projektwoche.js
@@ -0,0 +1,73 @@
+import { MarkdownProps } from "../props.js";
+import { DescriptionText, DraftBoolean, IconList, Title } from "./widgets.js";
+
+const ProjektwocheCollection = {
+ name: "projektwoche",
+ label: "Projektwochen",
+ label_singular: "Projektwoche",
+ description: "Hier kann die Übersicht der Projektwochen bearbeitet werden.",
+ icon: "projektwoche",
+ folder: "content/german/projektwoche",
+ filter: {
+ field: "type",
+ value: "projektwoche",
+ },
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ summary_fields: ["title", "draft", "tiles", "description"],
+ fields: [
+ Title(false),
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "type",
+ label: "Typ",
+ widget: "hidden",
+ default: "projektwoche",
+ },
+ {
+ name: "body",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ {
+ name: "tiles",
+ label: "Kacheln",
+ hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte.",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [
+ Title(false),
+ {
+ name: "bg_color",
+ label: "Hintergrundfarbe",
+ widget: "color",
+ required: true,
+ },
+ IconList,
+ {
+ name: "font_color",
+ label: "Symbolfarbe",
+ widget: "color",
+ required: true,
+ },
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ ],
+};
+
+export default ProjektwocheCollection;
diff --git a/static/admin/config/collections/settings-collection.js b/static/admin/config/collections/settings-collection.js
index 1d72283c..d46b03d7 100644
--- a/static/admin/config/collections/settings-collection.js
+++ b/static/admin/config/collections/settings-collection.js
@@ -1,135 +1,981 @@
-import { DateFormat, MarkdownProps } from "../props.js";
-import { EnableBoolean, Title } from "./widgets.js";
+import {
+ DataObject,
+ DateFormat,
+ MarkdownProps,
+ PatternEmail,
+} from "../props.js";
+import {
+ ButtonObject,
+ EnableBoolean,
+ Title,
+ IconList,
+ PreviewNumber,
+ DescriptionText,
+ DisableBoolean,
+} from "./widgets.js";
const SettingsCollection = {
- name: "settings",
- label: "Einstellungen",
- icon: "settings",
- description: "Hier können die Basiseinstellungen der Website geändert werden. Die meisten Bereiche müssen nur in Ausnahmefällen angepasst werden.",
- editor: {
- preview: false
- },
- files: [
+ name: "settings",
+ label: "Einstellungen",
+ icon: "settings",
+ description:
+ "Hier können die Basiseinstellungen der Website geändert werden. Die meisten Bereiche müssen nur in Ausnahmefällen angepasst werden.",
+ editor: {
+ preview: false,
+ size: "half",
+ },
+ files: [
+ {
+ name: "data-homepage",
+ label: "Startseiteneinstellungen",
+ file: "data/de/homepage.yml",
+ fields: [
{
- name: "data-homepage",
- label: "Startseiteneinstellungen",
- file: "data/de/homepage.yml",
- fields: [
+ name: "top_banner",
+ label: "Banner",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "text",
+ label: "Text",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ {
+ name: "color",
+ label: "Farbe",
+ widget: "color",
+ required: false,
+ },
+ {
+ name: "font_color",
+ label: "Schriftfarbe",
+ widget: "color",
+ required: false,
+ },
+ IconList,
+ {
+ name: "temporarily",
+ label: "Zeitschaltung",
+ widget: "object",
+ fields: [
+ EnableBoolean,
{
- name: "top_banner",
- label: "Banner",
- widget: "object",
- collapsed: true,
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}",
- fields: [
- EnableBoolean,
- {
- name: "text",
- label: "Text",
- widget: "markdown",
- required: false,
- ...MarkdownProps
- },
- {
- name: "color",
- label: "Farbe",
- widget: "color",
- required: false
- },
- {
- name: "font_color",
- label: "Schriftfarbe",
- widget: "color",
- required: false
- },
- {
- name: "icon",
- label: "Symbol",
- widget: "string",
- required: false,
- hint: "Liste unter https://assets.cantorgymnasium.de/fonts/mdi/v7/preview.html"
- },
- {
- name: "temporarily",
- label: "Zeitschaltung",
- widget: "object",
- fields: [
- EnableBoolean,
- {
- name: "start_date",
- label: "Startdatum",
- widget: "datetime",
- ...DateFormat,
- required: false,
- },
- {
- name: "end_date",
- label: "Enddatum",
- widget: "datetime",
- ...DateFormat,
- required: false,
- }
- ]
- }
- ]
+ name: "start_date",
+ label: "Startdatum",
+ widget: "datetime",
+ ...DateFormat,
+ required: false,
},
{
- name: "slider",
- label: "Karusell",
- widget: "object",
- collapsed: true,
- summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}",
- fields: [
- EnableBoolean,
- {
- name: "bg_image",
- label: "Hintergrundbild",
- widget: "image",
- required: false,
- },
- Title(true),
- {
- name: "slider_item",
- label: "Elemente",
- label_singular: "Element",
- widget: "list",
- collapsed: true,
- fields: [
- {
- name: "content",
- label: "Text",
- widget: "string",
- required: false
- },
- {
- name: "button",
- label: "Button",
- widget: "object",
- required: false,
- collapsed: true,
- fields: [
- EnableBoolean,
- {
- name: "label",
- label: "Aufschrift",
- widget: "string",
- required: false
- },
- {
- name: "link",
- label: "Link",
- widget: "string",
- required: false
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
+ name: "end_date",
+ label: "Enddatum",
+ widget: "datetime",
+ ...DateFormat,
+ required: false,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "slider",
+ label: "Karusell",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "bg_image",
+ label: "Hintergrundbild",
+ widget: "image",
+ required: true,
+ },
+ Title(false),
+ {
+ name: "slider_item",
+ label: "Elemente",
+ label_singular: "Element",
+ widget: "list",
+ collapsed: true,
+ fields: [
+ {
+ name: "content",
+ label: "Text",
+ widget: "string",
+ required: false,
+ },
+ ButtonObject,
+ ],
+ },
+ ],
+ },
+ {
+ name: "header_logos",
+ label: "Partnerlogos (oben)",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "logos",
+ label: "Logos",
+ label_singular: "Logo",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [
+ Title(true),
+ {
+ name: "link",
+ label: "Link",
+ widget: "string",
+ required: false,
+ },
+ {
+ name: "image",
+ label: "Grafik",
+ widget: "image",
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "about",
+ label: "Einstiegsabschnitt",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ Title(false),
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ButtonObject,
+ ],
+ },
+ {
+ name: "blog",
+ label: "Blog-Abschnitt",
+ ...DataObject,
+ fields: [EnableBoolean, Title(false), PreviewNumber],
+ },
+ {
+ name: "success_banner",
+ label: "Erfolge",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "image",
+ label: "Hintergrundbild",
+ widget: "image",
+ required: true,
+ },
+ {
+ name: "feature_item",
+ label: "Elemente",
+ label_singular: "Element",
+ widget: "list",
+ collapsed: true,
+ types: [
+ {
+ name: "image",
+ label: "Grafik",
+ widget: "object",
+ summary: "{{fields.name}}",
+ fields: [
+ {
+ name: "name",
+ label: "Bezeichnung",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "image",
+ label: "Grafik",
+ widget: "image",
+ required: false,
+ },
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ {
+ name: "icon",
+ label: "Symbol",
+ widget: "object",
+ summary: "{{fields.name}}",
+ fields: [
+ {
+ name: "name",
+ label: "Bezeichnung",
+ widget: "string",
+ required: true,
+ },
+ IconList,
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "ganztagsangebote",
+ label: "Ganztagsangebote",
+ ...DataObject,
+ fields: [EnableBoolean, Title(false), PreviewNumber],
+ },
+ {
+ name: "cta",
+ label: "Button-Abschnitt",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ Title(false),
+ {
+ name: "subtitle",
+ label: "Untertitel",
+ widget: "string",
+ required: false,
+ },
+ ButtonObject,
+ ],
+ },
+ {
+ name: "info",
+ label: "Informationsabschnitt (inkl. Video)",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "bg_image",
+ label: "Hintergrundbild",
+ widget: "image",
+ required: true,
+ },
+ Title(false),
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ {
+ name: "video_link",
+ label: "Video-Link",
+ widget: "string",
+ required: false,
+ },
+ ],
+ },
+ {
+ name: "termine",
+ label: "Termine",
+ ...DataObject,
+ fields: [EnableBoolean, Title(false), PreviewNumber],
+ },
+ {
+ name: "digitalpakt",
+ label: "DigitalPakt-Banner",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ Title(false),
+ {
+ name: "image",
+ label: "Bild",
+ widget: "image",
+ required: false,
+ },
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ {
+ name: "footer_logos",
+ label: "Partnerlogos (unten)",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "logos",
+ label: "Logos",
+ label_singular: "Logo",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [
+ Title(true),
+ {
+ name: "link",
+ label: "Link",
+ widget: "string",
+ required: false,
+ },
+ {
+ name: "image",
+ label: "Grafik",
+ widget: "image",
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "data-ausblick",
+ label: "Ausblick auf die Woche",
+ file: "data/de/ausblick.yml",
+ fields: [
+ EnableBoolean,
+ Title(false),
+ {
+ name: "author",
+ label: "Autor",
+ hint: "Verwaltet im Autoren-Bereich",
+ widget: "relation",
+ collection: "author",
+ value_field: "{{slug}}",
+ search_fields: ["{{title}}"],
+ display_fields: ["{{title}}"],
+ multiple: true,
+ required: true,
+ },
+ {
+ name: "image",
+ label: "Titelbild",
+ widget: "image",
+ required: true,
+ },
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: false,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ {
+ name: "hugo-config",
+ label: "Website-Einstellungen für Entwickler",
+ file: "config.yml",
+ fields: [
+ {
+ name: "baseURL",
+ label: "Website-URL",
+ widget: "string",
+ required: true,
+ },
+ Title(false),
+ {
+ name: "paginate",
+ label: "Anzahl der Seitenelemente",
+ widget: "number",
+ value_type: "int",
+ min: 1,
+ step: 1,
+ required: true,
+ },
+ {
+ name: "summaryLength",
+ label: "Länge von Zusammenfassungen (Zeichenanzahl)",
+ widget: "number",
+ value_type: "int",
+ min: 1,
+ step: 1,
+ required: true,
+ },
+ {
+ name: "defaultContentLanguageInSubdir",
+ label: "Standardsprache in Unterordner rendern",
+ widget: "boolean",
+ required: false,
+ },
+ {
+ name: "defaultContentLanguage",
+ label: "Standardsprache",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "enableEmoji",
+ label: "Emoji",
+ widget: "boolean",
+ required: false,
+ },
+ {
+ name: "enableRobotsTxt",
+ label: "robots.txt generieren",
+ widget: "boolean",
+ required: false,
+ },
+ {
+ name: "timeZone",
+ label: "Zeitzone",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "removePathAccents",
+ label: "Pfadbereinigung",
+ hint: "Entfernt Umlaute, Akzente u. ä. aus Dateinamen und Pfaden",
+ widget: "boolean",
+ required: false,
+ },
+ {
+ name: "markup",
+ label: "Markup",
+ widget: "object",
+ collapsed: true,
+ summary: "{{fields.defaultMarkdownHandler}}",
+ fields: [
+ {
+ name: "defaultMarkdownHandler",
+ label: "Markdown-Handler",
+ hint: "Dienst, welcher als Markdown-Renderer fungiert.",
+ widget: "select",
+ options: ["blackfriday", "goldmark"],
+ required: true,
+ },
+ {
+ name: "goldmark",
+ label: "Goldmark-Einstellungen",
+ widget: "object",
+ fields: [
+ {
+ name: "renderer",
+ label: "Renderer",
+ widget: "object",
+ fields: [
+ {
+ name: "unsafe",
+ label: "Unsicheren Inhalt erlauben",
+ hint: "Ermöglicht das Rendern von HTML in Markdown-Dateien",
+ widget: "boolean",
+ required: false,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "params",
+ label: "Parameter",
+ widget: "object",
+ collapsed: true,
+ fields: [
+ {
+ name: "plugins",
+ label: "Erweiterungen",
+ widget: "object",
+ collapsed: true,
+ fields: [
+ {
+ name: "css",
+ label: "CSS-Stylesheets",
+ label_singular: "CSS-Stylesheet",
+ widget: "list",
+ collapsed: true,
+ fields: [{ name: "link", label: "Link", widget: "string" }],
+ },
+ {
+ name: "head_js",
+ label: "JavaScript (am Seitenanfang)",
+ label_singular: "JS-Datei",
+ widget: "list",
+ collapsed: true,
+ fields: [{ name: "link", label: "Link", widget: "string" }],
+ },
+ {
+ name: "js",
+ label: "JavaScript (am Seitenende)",
+ label_singular: "JS-Datei",
+ widget: "list",
+ collapsed: true,
+ fields: [{ name: "link", label: "Link", widget: "string" }],
+ },
+ ],
+ },
+ {
+ name: "logo",
+ label: "Logo",
+ widget: "image",
+ required: true,
+ },
+ {
+ name: "author",
+ label: "Autor-Eintrag",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "address",
+ label: "Adresse",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "route_link",
+ label: "Route (Link)",
+ widget: "string",
+ required: false,
+ },
+ {
+ name: "mobile",
+ label: "Telefonnummer",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "email",
+ label: "E-Mail-Adresse",
+ widget: "string",
+ required: true,
+ ...PatternEmail,
+ },
+ {
+ name: "email_label",
+ label: "E-Mail-Adresse (UI-Ansicht)",
+ hint: "Wird über die E-Mail-Adresse gelegt, um Spambots entgegenzuwirken",
+ widget: "string",
+ required: true,
+ },
+ DescriptionText,
+ {
+ name: "top_header",
+ label: "Kontakt-Leiste",
+ widget: "boolean",
+ required: false,
+ },
+ {
+ name: "images",
+ label: "Vorschaubilder",
+ label_singular: "Vorschaubild",
+ hint: "Werden als Linkvorschau in soz. Netzwerken & co. angezeigt",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [{ name: "path", label: "Bild-Pfad", widget: "string" }],
+ },
+ {
+ name: "twitter",
+ label: "Twitter-Konto",
+ widget: "string",
+ required: false,
+ },
+ {
+ name: "preloader",
+ label: "Ladebildschirm",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "preloader",
+ label: "Logo",
+ widget: "image",
+ required: true,
+ },
+ {
+ name: "loader",
+ label: "Ladeanimation",
+ widget: "image",
+ required: true,
+ },
+ ],
+ },
+ {
+ name: "social",
+ label: "Soziale Netzwerke",
+ label_singular: "Link",
+ widget: "list",
+ collapsed: true,
+ fields: [
+ {
+ name: "title",
+ label: "Bezeichnung",
+ widget: "string",
+ required: true,
+ },
+ IconList,
+ {
+ name: "link",
+ label: "Link",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "menu",
+ label: "Menüs",
+ widget: "object",
+ collapsed: true,
+ fields: [
+ {
+ name: "main",
+ label: "Hauptmenü",
+ label_singular: "Menüeintrag",
+ hint: "Wird am Seitenanfang angezeigt",
+ widget: "list",
+ collapsed: true,
+ fields: [
+ Title(false),
+ {
+ name: "weight",
+ label: "Positionierung",
+ hint: "Je höher die Zahl, desto weiter unten liegt der Eintrag",
+ widget: "number",
+ value_type: "int",
+ min: 1,
+ step: 1,
+ required: true,
+ },
+ {
+ name: "hasChildren",
+ label: "Erweitertes Menü",
+ hint: "Der Menüpunkt dient als Untermenü für weitere Elemente",
+ widget: "boolean",
+ required: false,
+ },
+ {
+ name: "parent",
+ label: "Übergeordneter Eintrag",
+ hint: "Falls ausgewählt, wird dieser Eintrag im Untermenü erscheinen",
+ widget: "relation",
+ collection: "config",
+ file: "hugo-config",
+ value_field: "menu.main.*.name",
+ search_fields: ["menu.main.*.name"],
+ display_fields: ["menu.main.*.name"],
+ required: false,
+ },
+ {
+ name: "URL",
+ label: "Link",
+ widget: "string",
+ required: false,
+ },
+ {
+ name: "params",
+ label: "Parameter",
+ widget: "object",
+ collapsed: false,
+ fields: [
+ {
+ name: "external",
+ label: "Externer Link",
+ hint: "Wird in einem neuen Tab geöffnet",
+ widget: "boolean",
+ required: false,
+ },
+ {
+ name: "separator",
+ label: "Trennlinie",
+ hint: "Wird unter dem Menüpunkt eingefügt",
+ widget: "boolean",
+ required: false,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "footer",
+ label: "Link-Liste",
+ label_singular: "Link",
+ hint: "Wird am Seitenende angezeigt",
+ widget: "list",
+ collapsed: true,
+ fields: [
+ {
+ name: "name",
+ label: "Bezeichnung",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "URL",
+ label: "Link",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "languages",
+ label: "Sprachen",
+ widget: "object",
+ collapsed: true,
+ fields: [
+ {
+ name: "de",
+ label: "Deutsch",
+ widget: "object",
+ collapsed: false,
+ fields: [
+ {
+ name: "languageName",
+ label: "Abkürzung",
+ hint: "De, En, Fr...",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "languageCode",
+ label: "Sprachcode",
+ hint: "de-de, en-us, fr-fr...",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "contentDir",
+ label: "Ordner mit Inhalt",
+ widget: "file",
+ media_folder: "/content",
+ public_folder: "content",
+ select_folder: true,
+ },
+ {
+ name: "weight",
+ label: "Positionierung",
+ hint: "Je höher die Zahl, desto weiter unten liegt der Eintrag",
+ widget: "number",
+ value_type: "int",
+ min: 1,
+ step: 1,
+ required: true,
+ },
+ {
+ name: "copyright",
+ label: "Copyright-Eintrag",
+ hint: "Am Seitenende sichtbar",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ {
+ name: "params",
+ label: "Parameter",
+ widget: "object",
+ collapsed: false,
+ fields: [
+ {
+ name: "home",
+ label: "Startseitenbezeichnung",
+ hint: "Verwendet für Menüerstellung",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "impressumURL",
+ label: "Link zum Impressum",
+ hint: "pages/impressum",
+ widget: "string",
+ required: true,
+ },
+ {
+ name: "dseURL",
+ label: "Link zur Datenschutzerklärung",
+ hint: "pages/datenschutz",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "privacy",
+ label: "Datenschutz-Optionen",
+ hint: "Konfiguration externer Dienste",
+ widget: "object",
+ collapsed: true,
+ fields: [
+ {
+ name: "disqus",
+ label: "Disqus",
+ widget: "object",
+ fields: [DisableBoolean],
+ },
+ {
+ name: "googleAnalytics",
+ label: "Google Analytics",
+ widget: "object",
+ fields: [DisableBoolean],
+ },
+ {
+ name: "instagram",
+ label: "Instagram",
+ widget: "object",
+ fields: [DisableBoolean],
+ },
+ {
+ name: "twitter",
+ label: "Twitter",
+ widget: "object",
+ fields: [
+ {
+ name: "enableDNT",
+ label: "Tracking deaktivieren",
+ widget: "boolean",
+ required: false,
+ },
+ ],
+ },
+ {
+ name: "youtube",
+ label: "YouTube",
+ widget: "object",
+ fields: [
+ {
+ name: "privacyEnhanced",
+ label: "Piped-Proxy",
+ hint: "Datenschutzfreundliche Oberfläche für YouTube",
+ widget: "boolean",
+ required: false,
+ },
+ ],
+ },
+ {
+ name: "vimeo",
+ label: "Vimeo",
+ widget: "object",
+ fields: [
+ {
+ name: "enableDNT",
+ label: "Tracking deaktivieren",
+ widget: "boolean",
+ required: false,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "data-categories",
+ label: "Kategorien und Zuordnungen",
+ file: "data/de/categories.yml",
+ fields: [
+ {
+ name: "blog",
+ label: "Aktuelles",
+ label_singular: "Kategorie",
+ widget: "list",
+ required: true,
+ collapsed: true,
+ fields: [
+ {
+ name: "category",
+ label: "Kategorie",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ {
+ name: "ganztag",
+ label: "Ganztagsbereich",
+ label_singular: "Kategorie",
+ widget: "list",
+ required: true,
+ collapsed: true,
+ fields: [
+ {
+ name: "category",
+ label: "Kategorie",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ {
+ name: "contests",
+ label: "Wettbewerbe",
+ label_singular: "Kategorie",
+ widget: "list",
+ required: true,
+ collapsed: true,
+ fields: [
+ {
+ name: "category",
+ label: "Kategorie",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ {
+ name: "begabte",
+ label: "Begabtenförderung",
+ label_singular: "Kategorie",
+ widget: "list",
+ required: true,
+ collapsed: true,
+ fields: [
+ {
+ name: "category",
+ label: "Kategorie",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ {
+ name: "subjects",
+ label: "Fächer (Fachzuordnung)",
+ label_singular: "Fach",
+ widget: "list",
+ required: true,
+ collapsed: true,
+ fields: [
+ {
+ name: "category",
+ label: "Kategorie",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ ],
};
-export default SettingsCollection;
\ No newline at end of file
+export default SettingsCollection;
diff --git a/static/admin/config/collections/statistik.js b/static/admin/config/collections/statistik.js
deleted file mode 100644
index ce502724..00000000
--- a/static/admin/config/collections/statistik.js
+++ /dev/null
@@ -1,78 +0,0 @@
-const StatistikCollection = {
- name: "statistik",
- label: "Statistik",
- description: "Hier können statistische Daten bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
- icon: "stats",
- editor: {
- preview: false
- },
- files: [
- {
- name: "abiturdurchschnitte",
- label: "Abiturdurchschnitte",
- file: "static/data/abiturdurchschnitte.json",
- fields: [
- {
- name: "abiturdurchschnitte",
- label: "Abiturdurchschnitte",
- label_singular: "Abiturdurchschnitt",
- widget: "list",
- required: false,
- fields: [
- {
- name: "jahr",
- label: "Jahr",
- widget: "number",
- value_type: "int",
- step: 1,
- required: true
- },
- {
- name: "schnitt",
- label: "Schnitt",
- widget: "number",
- value_type: "float",
- step: 0.01,
- required: true
- }
- ]
- },
- {
- name: "schuelerzahlen",
- label: "Schülerzahlen",
- file: "static/data/schuelerzahlen.json",
- fields: [
- {
- name: "schuelerzahlen",
- label: "Schülerzahlen",
- widget: "list",
- required: false,
- fields: [
- {
- name: "year",
- label: "Jahr",
- widget: "number",
- required: true
- },
- {
- name: "all",
- label: "Gesamt",
- widget: "number",
- required: true
- },
- {
- name: "girls",
- label: "davon Mädchen",
- widget: "number",
- required: true
- }
- ]
- }
- ]
- }
- ]
- }
- ]
-}
-
-export default StatistikCollection;
\ No newline at end of file
diff --git a/static/admin/config/collections/stats.js b/static/admin/config/collections/stats.js
new file mode 100644
index 00000000..9b265fd0
--- /dev/null
+++ b/static/admin/config/collections/stats.js
@@ -0,0 +1,83 @@
+const StatsCollection = {
+ name: "statistik",
+ label: "Statistik",
+ description:
+ "Hier können statistische Daten bearbeitet werden. Dieser Bereich wird von der Schulchronik verwaltet.",
+ icon: "stats",
+ editor: {
+ preview: false,
+ size: "half",
+ },
+ files: [
+ {
+ name: "abiturdurchschnitte",
+ label: "Abiturdurchschnitte",
+ file: "static/data/abiturdurchschnitte.json",
+ fields: [
+ {
+ name: "abiturdurchschnitte",
+ label: "Abiturdurchschnitte",
+ label_singular: "Jahr",
+ widget: "list",
+ required: false,
+ fields: [
+ {
+ name: "jahr",
+ label: "Jahr",
+ widget: "number",
+ value_type: "int",
+ required: true,
+ },
+ {
+ name: "schnitt",
+ label: "Schnitt",
+ widget: "number",
+ value_type: "float",
+ step: 0.01,
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ {
+ name: "schuelerzahlen",
+ label: "Schülerzahlen",
+ file: "static/data/schuelerzahlen.json",
+ fields: [
+ {
+ name: "schuelerzahlen",
+ label: "Schülerzahlen",
+ label_singular: "Jahr",
+ widget: "list",
+ required: false,
+ fields: [
+ {
+ name: "year",
+ label: "Jahr",
+ widget: "number",
+ value_type: "int",
+ required: true,
+ },
+ {
+ name: "all",
+ label: "Gesamtzahl",
+ widget: "number",
+ value_type: "int",
+ required: true,
+ },
+ {
+ name: "girls",
+ label: "davon Mädchen",
+ widget: "number",
+ value_type: "int",
+ required: true,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+};
+
+export default StatsCollection;
diff --git a/static/admin/config/collections/superhaufen.js b/static/admin/config/collections/superhaufen.js
index 6b0f335e..aa6ada52 100644
--- a/static/admin/config/collections/superhaufen.js
+++ b/static/admin/config/collections/superhaufen.js
@@ -2,100 +2,102 @@ import { MarkdownProps } from "../props.js";
import { DraftBoolean, EnableBoolean, Title } from "./widgets.js";
const SuperhaufenCollection = {
- 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",
- folder: "content/german/superhaufen",
- filter: {
- field: "type",
- value: "superhaufen"
+ 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",
+ folder: "content/german/superhaufen",
+ 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",
},
- create: true,
- editor: {
- preview: true,
- frame: true,
- },
- summary_fields: ["title", "draft", "tiles"],
- fields: [
+ {
+ name: "previous",
+ label: "Rückverlinkung",
+ widget: "object",
+ collapsed: true,
+ fields: [
+ EnableBoolean,
Title(false),
- DraftBoolean,
{
- name: "type",
- label: "Typ",
- widget: "hidden",
- default: "superhaufen"
+ name: "link",
+ label: "Link",
+ widget: "string",
+ required: true,
+ },
+ ],
+ },
+ {
+ name: "tiles",
+ label: "Kacheln",
+ hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte.",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [
+ Title(false),
+ {
+ name: "bg_color",
+ label: "Hintergrundfarbe",
+ widget: "color",
+ required: true,
},
{
- name: "previous",
- label: "Rückverlinkung",
- widget: "object",
- collapsed: true,
- fields: [
- EnableBoolean,
- Title(false),
- {
- name: "link",
- label: "Link",
- widget: "string",
- required: true
- }
- ]
+ name: "icon",
+ label: "Symbol",
+ widget: "string",
+ required: true,
},
{
- name: "tiles",
- label: "Kacheln",
- hint: "Die Vorschau zeigt nur die generierten Symbolkarten, NICHT die Inhalte.",
- widget: "list",
- required: false,
- collapsed: true,
- fields: [
- Title(false),
- {
- name: "bg_color",
- label: "Hintergrundfarbe",
- widget: "color",
- required: true,
- },
- {
- name: "icon",
- label: "Symbol",
- widget: "string",
- required: true,
- },
- {
- name: "font_color",
- label: "Symbolfarbe",
- widget: "color",
- required: true,
- },
- {
- name: "content",
- label: "Inhalt",
- widget: "markdown",
- required: true,
- ...MarkdownProps
- },
- {
- name: "unterhaufen",
- label: "Unterhaufen",
- widget: "list",
- required: false,
- collapsed: true,
- fields: [
- Title(false),
- {
- name: "content",
- label: "Inhalt",
- widget: "markdown",
- required: true,
- ...MarkdownProps
- }
- ]
- }
- ]
- }
- ]
-}
+ name: "font_color",
+ label: "Symbolfarbe",
+ widget: "color",
+ required: true,
+ },
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ {
+ name: "unterhaufen",
+ label: "Unterhaufen",
+ widget: "list",
+ required: false,
+ collapsed: true,
+ fields: [
+ Title(false),
+ {
+ name: "content",
+ label: "Inhalt",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+};
-export default SuperhaufenCollection;
\ No newline at end of file
+export default SuperhaufenCollection;
diff --git a/static/admin/config/collections/wettbewerbe.js b/static/admin/config/collections/wettbewerbe.js
new file mode 100644
index 00000000..96134d47
--- /dev/null
+++ b/static/admin/config/collections/wettbewerbe.js
@@ -0,0 +1,73 @@
+import { MarkdownProps } from "../props.js";
+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",
+ folder: "content/german/wettbewerbe",
+ create: true,
+ editor: {
+ preview: true,
+ frame: true,
+ size: "half",
+ },
+ filter: {
+ field: "type",
+ value: "wettbewerbe",
+ },
+ summary_fields: ["title", "draft", "category"],
+ fields: [
+ Title(false),
+ DraftBoolean,
+ DescriptionText,
+ {
+ name: "image",
+ label: "Titelbild",
+ widget: "image",
+ 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",
+ widget: "markdown",
+ required: true,
+ ...MarkdownProps,
+ },
+ ],
+};
+
+export default WettbewerbeCollection;
diff --git a/static/admin/config/collections/widgets.js b/static/admin/config/collections/widgets.js
index 1ed5292b..2c20bf05 100644
--- a/static/admin/config/collections/widgets.js
+++ b/static/admin/config/collections/widgets.js
@@ -1,30 +1,88 @@
+import { DataObject } from "../props.js";
+
const EnableBoolean = {
- name: "enable",
- label: "Aktivieren",
- widget: "boolean",
- required: false
+ name: "enable",
+ label: "Aktivieren",
+ widget: "boolean",
+ required: false,
+};
+
+const DisableBoolean = {
+ name: "disable",
+ label: "Deaktivieren",
+ widget: "boolean",
+ required: false,
};
const DraftBoolean = {
- name: "draft",
- label: "Entwurf",
- widget: "boolean",
- default: false,
- required: false
-}
+ name: "draft",
+ label: "Entwurf",
+ widget: "boolean",
+ default: false,
+ required: false,
+};
const Title = (optional = false) => ({
- name: "title",
- label: "Titel",
- widget: "string",
- required: !optional
+ name: "title",
+ label: "Titel",
+ widget: "string",
+ required: !optional,
});
const DescriptionText = {
- name: "description",
- label: "Beschreibung",
- widget: "text",
- required: false
+ name: "description",
+ label: "Beschreibung",
+ widget: "text",
+ required: false,
};
-export { EnableBoolean, DraftBoolean, Title, DescriptionText };
\ No newline at end of file
+const IconList = {
+ name: "icon",
+ label: "Symbol",
+ widget: "string",
+ required: false,
+ hint: "Liste unter https://assets.cantorgymnasium.de/fonts/mdi/v7/preview.html",
+};
+
+const PreviewNumber = {
+ name: "number",
+ label: "Anzahl",
+ hint: "Anzahl der Elemente, die auf der Startseite angezeigt werden sollen.",
+ widget: "number",
+ value_type: "int",
+ min: 0,
+ step: 1,
+ required: true,
+};
+
+const ButtonObject = {
+ name: "button",
+ label: "Button",
+ ...DataObject,
+ fields: [
+ EnableBoolean,
+ {
+ name: "label",
+ label: "Aufschrift",
+ widget: "string",
+ required: false,
+ },
+ {
+ name: "link",
+ label: "Link",
+ widget: "string",
+ required: false,
+ },
+ ],
+};
+
+export {
+ EnableBoolean,
+ DisableBoolean,
+ DraftBoolean,
+ Title,
+ DescriptionText,
+ IconList,
+ PreviewNumber,
+ ButtonObject,
+};
diff --git a/static/admin/config/index.js b/static/admin/config/index.js
index 53debbdb..7dfeba5e 100644
--- a/static/admin/config/index.js
+++ b/static/admin/config/index.js
@@ -1,37 +1,71 @@
-import { SettingsCollection } from "./collections/index.js";
+import {
+ AbiturientenCollection,
+ AuthorCollection,
+ BegabteCollection,
+ BlogCollection,
+ CantorforaCollection,
+ CantorpreisCollection,
+ ChronikjahreCollection,
+ ChronikseitenCollection,
+ FormsCollection,
+ GanztagCollection,
+ IndexPagesCollection,
+ PagesCollection,
+ ProjektwocheCollection,
+ SettingsCollection,
+ StatsCollection,
+ SuperhaufenCollection,
+ WettbewerbeCollection,
+} from "./collections/index.js";
const config = {
- backend: {
- name: "gitea",
- repo: "gcg/gcg-website",
- branch: "master",
- api_root: "https://git.cantorgymnasium.de/api/v1",
- base_url: "https://oauth.cantorgymnasium.de",
- commit_messages: {
- create: "{{collection}} {{slug}} erstellt",
- update: "{{collection}} {{slug}} aktualisiert",
- delete: "{{collection}} {{slug}} gelöscht",
- updateMedia: "{{path}} hochgeladen",
- deleteMedia: "{{path}} gelöscht"
- }
+ backend: {
+ name: "gitea",
+ repo: "gcg/gcg-website",
+ branch: "master",
+ api_root: "https://git.cantorgymnasium.de/api/v1",
+ base_url: "https://oauth.cantorgymnasium.de",
+ commit_messages: {
+ create: "{{collection}} {{slug}} erstellt",
+ update: "{{collection}} {{slug}} aktualisiert",
+ delete: "{{collection}} {{slug}} gelöscht",
+ updateMedia: "{{path}} hochgeladen",
+ deleteMedia: "{{path}} gelöscht",
},
- local_backend: true,
- media_folder: "/static/media",
- public_folder: "/media",
- media_library: {
- max_file_size: 10240000,
- folder_support: true
- },
- site_url: "https://cantorgymnasium.de",
- locale: "de",
- slug: {
- encoding: "ascii",
- clean_accents: true,
- sanitize_replacement: "-"
- },
- collections: [
- SettingsCollection
- ]
+ },
+ local_backend: true,
+ media_folder: "/static/media",
+ public_folder: "/media",
+ media_library: {
+ max_file_size: 10240000,
+ folder_support: true,
+ },
+ site_url: "https://cantorgymnasium.de",
+ locale: "de",
+ slug: {
+ encoding: "ascii",
+ clean_accents: true,
+ sanitize_replacement: "-",
+ },
+ collections: [
+ SettingsCollection,
+ IndexPagesCollection,
+ PagesCollection,
+ AuthorCollection,
+ BlogCollection,
+ FormsCollection,
+ GanztagCollection,
+ WettbewerbeCollection,
+ BegabteCollection,
+ ProjektwocheCollection,
+ ChronikjahreCollection,
+ SuperhaufenCollection,
+ CantorpreisCollection,
+ AbiturientenCollection,
+ CantorforaCollection,
+ ChronikseitenCollection,
+ StatsCollection,
+ ],
};
-export default config;
\ No newline at end of file
+export default config;
diff --git a/static/admin/config/props.js b/static/admin/config/props.js
index a7394503..c0488b8b 100644
--- a/static/admin/config/props.js
+++ b/static/admin/config/props.js
@@ -1,56 +1,77 @@
const MarkdownProps = {
- toolbar_buttons: {
- main: [
- 'bold',
- 'italic',
- 'strikethrough',
- 'code',
- 'font',
- 'unordered-list',
- 'ordered-list',
- 'decrease-indent',
- 'increase-indent',
- 'insert-table',
- 'blockquote',
- 'file-link',
- 'code-block',
- 'shortcode',
- ],
- empty: [],
- selection: ['bold', 'italic', 'strikethrough', 'code', 'font', 'file-link', 'blockquote'],
- table_empty: [
- 'bold',
- 'italic',
- 'strikethrough',
- 'code',
- 'insert-row',
- 'delete-row',
- 'insert-column',
- 'delete-column',
- 'delete-table',
- 'file-link',
- 'shortcode',
- ],
- table_selection: [
- 'bold',
- 'italic',
- 'strikethrough',
- 'code',
- 'insert-row',
- 'delete-row',
- 'insert-column',
- 'delete-column',
- 'delete-table',
- 'file-link',
- 'shortcode',
- ]
- }
+ toolbar_buttons: {
+ main: [
+ "bold",
+ "italic",
+ "strikethrough",
+ "code",
+ "font",
+ "unordered-list",
+ "ordered-list",
+ "decrease-indent",
+ "increase-indent",
+ "insert-table",
+ "blockquote",
+ "file-link",
+ "code-block",
+ "shortcode",
+ ],
+ empty: [],
+ selection: [
+ "bold",
+ "italic",
+ "strikethrough",
+ "code",
+ "font",
+ "file-link",
+ "blockquote",
+ ],
+ table_empty: [
+ "bold",
+ "italic",
+ "strikethrough",
+ "code",
+ "insert-row",
+ "delete-row",
+ "insert-column",
+ "delete-column",
+ "delete-table",
+ "file-link",
+ "shortcode",
+ ],
+ table_selection: [
+ "bold",
+ "italic",
+ "strikethrough",
+ "code",
+ "insert-row",
+ "delete-row",
+ "insert-column",
+ "delete-column",
+ "delete-table",
+ "file-link",
+ "shortcode",
+ ],
+ },
};
const DateFormat = {
- date_format: "dd.MM.yyyy",
- time_format: false,
- format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"
+ date_format: "dd.MM.yyyy",
+ time_format: false,
+ format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",
};
-export { MarkdownProps, DateFormat };
\ No newline at end of file
+const DataObject = {
+ widget: "object",
+ collapsed: true,
+ summary: "{{fields.enable | ternary('aktiv', 'inaktiv')}}",
+};
+
+const PatternEmail = {
+ pattern: [
+ "^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$",
+ "name@domain.tld",
+ ],
+};
+
+export { MarkdownProps, DateFormat, DataObject, PatternEmail };
diff --git a/static/admin/config/schulchronik.js b/static/admin/config/schulchronik.js
index 0f0f5a08..d153bd0c 100644
--- a/static/admin/config/schulchronik.js
+++ b/static/admin/config/schulchronik.js
@@ -1,43 +1,51 @@
-import { AbiturientenCollection, CantorforaCollection, CantorpreisCollection, ChronikjahreCollection, ChronikseitenCollection, SuperhaufenCollection } from "./collections/index.js";
-
+import {
+ AbiturientenCollection,
+ CantorforaCollection,
+ CantorpreisCollection,
+ ChronikjahreCollection,
+ ChronikseitenCollection,
+ StatsCollection,
+ SuperhaufenCollection,
+} from "./collections/index.js";
const config = {
- backend: {
- name: "gitea",
- repo: "gcg/gcg-website",
- branch: "master",
- api_root: "https://git.cantorgymnasium.de/api/v1",
- base_url: "https://oauth.cantorgymnasium.de",
- commit_messages: {
- create: "{{collection}} {{slug}} erstellt",
- update: "{{collection}} {{slug}} aktualisiert",
- delete: "{{collection}} {{slug}} gelöscht",
- updateMedia: "{{path}} hochgeladen",
- deleteMedia: "{{path}} gelöscht"
- }
+ backend: {
+ name: "gitea",
+ repo: "gcg/gcg-website",
+ branch: "master",
+ api_root: "https://git.cantorgymnasium.de/api/v1",
+ base_url: "https://oauth.cantorgymnasium.de",
+ commit_messages: {
+ create: "{{collection}} {{slug}} erstellt",
+ update: "{{collection}} {{slug}} aktualisiert",
+ delete: "{{collection}} {{slug}} gelöscht",
+ updateMedia: "{{path}} hochgeladen",
+ deleteMedia: "{{path}} gelöscht",
},
- local_backend: true,
- media_folder: "/static/media",
- public_folder: "/media",
- media_library: {
- max_file_size: 10240000,
- folder_support: true
- },
- site_url: "https://cantorgymnasium.de/schulchronik/",
- locale: "de",
- slug: {
- encoding: "ascii",
- clean_accents: true,
- sanitize_replacement: "-"
- },
- collections: [
- ChronikjahreCollection,
- SuperhaufenCollection,
- CantorpreisCollection,
- AbiturientenCollection,
- CantorforaCollection,
- ChronikseitenCollection
- ]
+ },
+ local_backend: true,
+ media_folder: "/static/media",
+ public_folder: "/media",
+ media_library: {
+ max_file_size: 10240000,
+ folder_support: true,
+ },
+ site_url: "https://cantorgymnasium.de/schulchronik/",
+ locale: "de",
+ slug: {
+ encoding: "ascii",
+ clean_accents: true,
+ sanitize_replacement: "-",
+ },
+ collections: [
+ ChronikjahreCollection,
+ SuperhaufenCollection,
+ CantorpreisCollection,
+ AbiturientenCollection,
+ CantorforaCollection,
+ ChronikseitenCollection,
+ StatsCollection,
+ ],
};
-export default config;
\ No newline at end of file
+export default config;
diff --git a/static/admin/icons.js b/static/admin/icons.js
index 3c0e9f02..5a413453 100644
--- a/static/admin/icons.js
+++ b/static/admin/icons.js
@@ -1,37 +1,36 @@
const IconNames = {
- settings: "mdi mdi-cog-outline",
- user: "mdi mdi-fountain-pen-tip",
- page: "mdi mdi-file-document-outline",
- "page-add": "mdi mdi-file-document-plus-outline",
- document: "mdi mdi-file-document-multiple-outline",
- news: "mdi mdi-newspaper",
- award: "mdi mdi-seal-variant",
- group: "mdi mdi-crowd",
- trophy: "mdi mdi-trophy-outline",
- pi: "mdi mdi-pi-box",
- schulchronik: "mdi mdi-pillar",
- "graduation-cap": "mdi mdi-school-outline",
- help: "mdi mdi-lifebuoy",
- dash: "mdi mdi-monitor-dashboard",
- presentation: "mdi mdi-presentation",
- projektwoche: "mdi mdi-calendar-range-outline",
- superhaufen: "mdi mdi-view-dashboard",
- stats: "mdi mdi-chart-bar",
- };
-
- let Icons = [];
-
- for (let [name, icon] of Object.entries(IconNames)) {
- Icons.push({
- name,
- icon: () =>
- h(
- "div",
- { className: "flex items-center" },
- h("i", { className: icon, style: { fontSize: "1.5rem" } })
- ),
- });
- }
-
- export default Icons;
-
\ No newline at end of file
+ settings: "mdi mdi-cog-outline",
+ user: "mdi mdi-fountain-pen-tip",
+ page: "mdi mdi-file-document-outline",
+ "page-add": "mdi mdi-file-document-plus-outline",
+ document: "mdi mdi-file-document-multiple-outline",
+ news: "mdi mdi-newspaper",
+ award: "mdi mdi-seal-variant",
+ group: "mdi mdi-crowd",
+ trophy: "mdi mdi-trophy-outline",
+ pi: "mdi mdi-pi-box",
+ schulchronik: "mdi mdi-pillar",
+ "graduation-cap": "mdi mdi-school-outline",
+ help: "mdi mdi-lifebuoy",
+ dash: "mdi mdi-monitor-dashboard",
+ presentation: "mdi mdi-presentation",
+ projektwoche: "mdi mdi-calendar-range-outline",
+ superhaufen: "mdi mdi-view-dashboard",
+ stats: "mdi mdi-chart-bar",
+};
+
+let Icons = [];
+
+for (let [name, icon] of Object.entries(IconNames)) {
+ Icons.push({
+ name,
+ icon: () =>
+ h(
+ "div",
+ { className: "flex items-center" },
+ h("i", { className: icon, style: { fontSize: "1.5rem" } })
+ ),
+ });
+}
+
+export default Icons;
diff --git a/static/admin/index.html b/static/admin/index.html
index 7e7bd7c1..f6dae4de 100644
--- a/static/admin/index.html
+++ b/static/admin/index.html
@@ -3,8 +3,14 @@
-
-
+
+
Static CMS
@@ -52,15 +58,15 @@
import Icons from "./icons.js";
// cms initialization
- CMS.init();
+ CMS.init({ config });
// preview templates
CMS.registerPreviewTemplate("about-index", AboutPreview);
CMS.registerPreviewTemplate("blog", BlogPreview);
CMS.registerPreviewTemplate("wettbewerbe", ContestPreview);
CMS.registerPreviewTemplate("ganztagsangebote", GanztagPreview);
- CMS.registerPreviewTemplate("contact-index", KontaktPreview);
- CMS.registerPreviewTemplate("event-index", EventPreview);
+ CMS.registerPreviewTemplate("kontakt", KontaktPreview);
+ CMS.registerPreviewTemplate("termine", EventPreview);
CMS.registerPreviewTemplate("anmeldung-index", AnmeldungPreview);
CMS.registerPreviewTemplate("chronikjahre", ChronikPreview);
CMS.registerPreviewTemplate("anmeldeformular", AnmeldeformularPreview);
@@ -116,7 +122,6 @@
Icons.forEach((i) => CMS.registerIcon(i.name, i.icon));
// field previews
-
CMS.registerFieldPreview("author", "active", BooleanPreview);
CMS.registerFieldPreview("author", "simplified", BooleanPreview);
CMS.registerFieldPreview("blog", "date", DatePreview);
@@ -141,8 +146,15 @@
].forEach((collection) =>
CMS.registerFieldPreview(collection, "draft", DraftPreview)
);
- ["blog", "author", "chronikseiten", "pages", "cantorpreis", "begabte"].forEach(
- (collection) => CMS.registerFieldPreview(collection, "body", BodyPreview)
+ [
+ "blog",
+ "author",
+ "chronikseiten",
+ "pages",
+ "cantorpreis",
+ "begabte",
+ ].forEach((collection) =>
+ CMS.registerFieldPreview(collection, "body", BodyPreview)
);
[
"cantorpreis-index",
@@ -154,8 +166,8 @@
"blog-index",
"about-index",
"anmeldung-index",
- "contact-index",
- "event-index",
+ "kontakt",
+ "termine",
"forms-index",
"ganztagsangebote-index",
"begabte-index",
@@ -166,6 +178,27 @@
["chronikseiten", "blog"].forEach((collection) =>
CMS.registerFieldPreview(collection, "title", BodyPreview)
);
+
+ // access control
+ CMS.registerEventListener({
+ name: "login",
+ handler: ({ login }) => {
+ const adminUsers = [
+ "fberger",
+ "denyskon",
+ "gfelke",
+ "lberthold",
+ "cschapitz",
+ "bgorsler",
+ ];
+ if (login && !adminUsers.includes(login)) {
+ alert(
+ "Sie sind nicht berechtigt, diese Seite aufzurufen. Sie werden nun auf die Startseite weitergeleitet."
+ );
+ location.href = "/";
+ }
+ },
+ });