feat(15-02): add Posts admin with mlmarkdown and FormatHTML
YAML-driven Posts screen stores translatable markdown and regenerates content_html in the plugin. Publish writes without access_publish are refused; list and form queries stay on the principal without access_other_posts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
25
models/post/columns.yaml
Normal file
25
models/post/columns.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
columns:
|
||||
title:
|
||||
label: golem15.journal::lang.post.title
|
||||
searchable: true
|
||||
is_pinned:
|
||||
label: Pinned
|
||||
type: switch
|
||||
sortable: true
|
||||
categories:
|
||||
label: golem15.journal::lang.post.categories
|
||||
relation: categories
|
||||
select: name
|
||||
searchable: true
|
||||
sortable: false
|
||||
created_at:
|
||||
label: golem15.journal::lang.post.created
|
||||
type: date
|
||||
invisible: true
|
||||
updated_at:
|
||||
label: golem15.journal::lang.post.updated
|
||||
type: date
|
||||
invisible: true
|
||||
published_at:
|
||||
label: golem15.journal::lang.post.published
|
||||
type: date
|
||||
67
models/post/fields.yaml
Normal file
67
models/post/fields.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
fields:
|
||||
title:
|
||||
label: golem15.journal::lang.post.title
|
||||
type: mltext
|
||||
span: left
|
||||
tab: golem15.journal::lang.post.tab_edit
|
||||
required: true
|
||||
slug:
|
||||
label: golem15.journal::lang.post.slug
|
||||
type: mltext
|
||||
span: right
|
||||
tab: golem15.journal::lang.post.tab_edit
|
||||
required: true
|
||||
content:
|
||||
label: golem15.journal::lang.post.content
|
||||
type: mlmarkdown
|
||||
size: huge
|
||||
tab: golem15.journal::lang.post.tab_edit
|
||||
required: true
|
||||
excerpt:
|
||||
label: golem15.journal::lang.post.excerpt
|
||||
type: mltext
|
||||
size: small
|
||||
tab: golem15.journal::lang.post.tab_manage
|
||||
categories:
|
||||
label: golem15.journal::lang.post.categories
|
||||
type: relation
|
||||
nameFrom: name
|
||||
tab: golem15.journal::lang.post.tab_categories
|
||||
comment: golem15.journal::lang.post.categories_comment
|
||||
tags:
|
||||
label: golem15.journal::lang.journal.tags
|
||||
type: relation
|
||||
nameFrom: name
|
||||
tab: golem15.journal::lang.post.tab_categories
|
||||
comment: golem15.journal::lang.post.tags_comment
|
||||
published:
|
||||
label: golem15.journal::lang.post.published
|
||||
type: switch
|
||||
span: left
|
||||
tab: golem15.journal::lang.post.tab_manage
|
||||
is_pinned:
|
||||
label: Pinned
|
||||
comment: Pin this post to appear first in listings
|
||||
type: checkbox
|
||||
span: left
|
||||
tab: golem15.journal::lang.post.tab_manage
|
||||
user:
|
||||
label: golem15.journal::lang.post.published_by
|
||||
type: relation
|
||||
nameFrom: login
|
||||
emptyOption: golem15.journal::lang.post.current_user
|
||||
span: right
|
||||
tab: golem15.journal::lang.post.tab_manage
|
||||
published_at:
|
||||
label: golem15.journal::lang.post.published_on
|
||||
type: datepicker
|
||||
mode: datetime
|
||||
span: left
|
||||
tab: golem15.journal::lang.post.tab_manage
|
||||
featured_images:
|
||||
label: golem15.journal::lang.post.featured_images
|
||||
type: fileupload
|
||||
mode: image
|
||||
imageWidth: 200
|
||||
imageHeight: 200
|
||||
tab: golem15.journal::lang.post.tab_manage
|
||||
Reference in New Issue
Block a user