gcg-website/static/admin/config/collections/author.js
Denys Konovalov d94cc5b584
All checks were successful
website-main / prod-build (push) Successful in 9s
website-main / test-build (push) Successful in 6s
revert c4206b7d341c9f28285efa0582ab0271ddfeaa49
revert Static CMS v4 (#246)

- Static CMS v4
- switch from jsdelivr to unpkg due to performance issues
- custom themes
- preset view_group

Reviewed-on: #246
2023-11-04 23:28:40 +01:00

107 lines
2.1 KiB
JavaScript

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.",
icon: "user",
folder: "content/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/people/gcg.webp",
},
{
name: "simplified",
label: "vereinfacht",
widget: "boolean",
required: false,
},
{
name: "active",
label: "aktiv",
widget: "boolean",
required: false,
default: true,
},
{
name: "type",
label: "Typ",
widget: "hidden",
default: "author",
},
{
name: "body",
label: "Beschreibung",
widget: "markdown",
required: false,
...MarkdownProps,
},
],
};
export default AuthorCollection;