2023-12-12 17:25:51 +01:00
import { MarkdownProps , PatternEmail , ImageProps } from "../props.js" ;
2023-05-29 16:22:34 +02:00
import { DescriptionText } from "./widgets.js" ;
const AuthorCollection = {
name : "author" ,
label : "Autoren" ,
label _singular : "Autor" ,
description :
2023-10-01 15:24:00 +02:00
"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." ,
2023-05-29 16:22:34 +02:00
icon : "user" ,
2023-06-21 17:58:49 +02:00
folder : "content/author" ,
2023-05-29 16:22:34 +02:00
create : true ,
editor : {
preview : true ,
frame : true ,
size : "half" ,
} ,
filter : {
field : "type" ,
value : "author" ,
} ,
2023-12-12 17:25:51 +01:00
view _filters : {
filters : [
{
name : "active" ,
label : "aktiv" ,
field : "active" ,
pattern : true ,
} ,
{
name : "inactive" ,
label : "inaktiv" ,
field : "active" ,
pattern : false ,
} ,
{
name : "simplified" ,
label : "einfach" ,
field : "simplified" ,
pattern : true ,
} ,
{
name : "extended" ,
label : "erweitert" ,
field : "simplified" ,
pattern : false ,
} ,
] ,
} ,
view _groups : {
default : "active" ,
groups : [
{
name : "simplified" ,
label : "vereinfacht" ,
field : "simplified" ,
} ,
{
name : "active" ,
label : "aktiv" ,
field : "active" ,
} ,
] ,
} ,
2023-05-29 16:22:34 +02:00
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" ,
2023-06-07 21:16:51 +02:00
default : "/media/people/gcg.webp" ,
2023-12-12 17:25:51 +01:00
... ImageProps ,
2023-05-29 16:22:34 +02:00
} ,
{
name : "simplified" ,
label : "vereinfacht" ,
widget : "boolean" ,
required : false ,
} ,
{
name : "active" ,
label : "aktiv" ,
widget : "boolean" ,
required : false ,
default : true ,
} ,
2023-06-07 21:21:41 +02:00
{
name : "type" ,
label : "Typ" ,
widget : "hidden" ,
default : "author" ,
} ,
2023-05-29 16:22:34 +02:00
{
name : "body" ,
label : "Beschreibung" ,
required : false ,
... MarkdownProps ,
} ,
] ,
} ;
export default AuthorCollection ;