CMS-Reparaturen #242
@ -6,7 +6,7 @@ const AuthorCollection = {
|
|||||||
label: "Autoren",
|
label: "Autoren",
|
||||||
label_singular: "Autor",
|
label_singular: "Autor",
|
||||||
description:
|
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.",
|
"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",
|
icon: "user",
|
||||||
folder: "content/author",
|
folder: "content/author",
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
import { DateFormat, MarkdownProps } from "../props.js";
|
import { DateFormat, MarkdownProps } from "../props.js";
|
||||||
import { DescriptionText, DraftBoolean, Title } from "./widgets.js";
|
import {
|
||||||
|
AuthorRelation,
|
||||||
|
DescriptionText,
|
||||||
|
DraftBoolean,
|
||||||
|
Title,
|
||||||
|
} from "./widgets.js";
|
||||||
|
|
||||||
const BlogCollection = {
|
const BlogCollection = {
|
||||||
name: "blog",
|
name: "blog",
|
||||||
@ -52,19 +57,7 @@ const BlogCollection = {
|
|||||||
required: true,
|
required: true,
|
||||||
default: "/media/image.webp",
|
default: "/media/image.webp",
|
||||||
},
|
},
|
||||||
{
|
AuthorRelation,
|
||||||
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,
|
|
||||||
options_length: 10000,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "categories",
|
name: "categories",
|
||||||
label: "Kategorien",
|
label: "Kategorien",
|
||||||
@ -98,7 +91,7 @@ const BlogCollection = {
|
|||||||
label: "Tags",
|
label: "Tags",
|
||||||
widget: "list",
|
widget: "list",
|
||||||
delimiter: ",",
|
delimiter: ",",
|
||||||
required: false
|
required: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "type",
|
name: "type",
|
||||||
|
@ -12,6 +12,7 @@ import {
|
|||||||
PreviewNumber,
|
PreviewNumber,
|
||||||
DescriptionText,
|
DescriptionText,
|
||||||
DisableBoolean,
|
DisableBoolean,
|
||||||
|
AuthorRelation,
|
||||||
} from "./widgets.js";
|
} from "./widgets.js";
|
||||||
|
|
||||||
const SettingsCollection = {
|
const SettingsCollection = {
|
||||||
@ -355,18 +356,7 @@ const SettingsCollection = {
|
|||||||
fields: [
|
fields: [
|
||||||
EnableBoolean,
|
EnableBoolean,
|
||||||
Title(false),
|
Title(false),
|
||||||
{
|
AuthorRelation,
|
||||||
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",
|
name: "image",
|
||||||
label: "Titelbild",
|
label: "Titelbild",
|
||||||
@ -664,7 +654,7 @@ const SettingsCollection = {
|
|||||||
name: "name",
|
name: "name",
|
||||||
label: "Bezeichnung",
|
label: "Bezeichnung",
|
||||||
widget: "string",
|
widget: "string",
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "weight",
|
name: "weight",
|
||||||
|
@ -76,6 +76,20 @@ const ButtonObject = {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const AuthorRelation = {
|
||||||
|
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,
|
||||||
|
options_length: 10000,
|
||||||
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
EnableBoolean,
|
EnableBoolean,
|
||||||
DisableBoolean,
|
DisableBoolean,
|
||||||
@ -85,4 +99,5 @@ export {
|
|||||||
IconList,
|
IconList,
|
||||||
PreviewNumber,
|
PreviewNumber,
|
||||||
ButtonObject,
|
ButtonObject,
|
||||||
|
AuthorRelation,
|
||||||
};
|
};
|
||||||
|
@ -25,11 +25,7 @@ for (let [name, icon] of Object.entries(IconNames)) {
|
|||||||
Icons.push({
|
Icons.push({
|
||||||
name,
|
name,
|
||||||
icon: () =>
|
icon: () =>
|
||||||
h(
|
h("i", { className: "CMS_Icon_root cms-icon " + icon, style: { fontSize: "1.5rem" } })
|
||||||
"div",
|
|
||||||
{ className: "flex items-center" },
|
|
||||||
h("i", { className: icon, style: { fontSize: "1.5rem" } })
|
|
||||||
),
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
const BooleanPreview = ({ value }) =>
|
const BooleanPreview = ({ value }) =>
|
||||||
h("i", {
|
h("i", {
|
||||||
className: value ? "mdi mdi-check" : "mdi mdi-close",
|
className: value ? "mdi mdi-check" : "mdi mdi-close",
|
||||||
|
style: { color: value ? "#00ff99" : "#ff0000", "font-size": "1.5rem" },
|
||||||
});
|
});
|
||||||
|
|
||||||
export default BooleanPreview;
|
export default BooleanPreview;
|
||||||
|
@ -6,7 +6,7 @@ const DraftPreview = ({ value }) =>
|
|||||||
backgroundColor: value === true ? "rgb(37 99 235)" : "rgb(22 163 74)",
|
backgroundColor: value === true ? "rgb(37 99 235)" : "rgb(22 163 74)",
|
||||||
color: "white",
|
color: "white",
|
||||||
border: "none",
|
border: "none",
|
||||||
padding: "2px 6px",
|
padding: "0 5px",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
display: "inline-block",
|
display: "inline-block",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user