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:
Jakub Zych
2026-10-06 18:41:10 +02:00
parent 0bf2d39323
commit dea0934950
17 changed files with 1138 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
scopes:
category:
label: golem15.journal::lang.posts.filter_category
modelClass: Golem15\Journal\Models\Category
nameFrom: name
scope: FilterCategories
published:
label: golem15.journal::lang.posts.filter_published
type: switch
column: published
published_date:
label: golem15.journal::lang.posts.filter_date
type: daterange
column: created_at

View File

@@ -0,0 +1,19 @@
name: golem15.journal::lang.journal.create_post
form: ~/plugins/golem15/journal/models/post/fields.yaml
modelClass: Golem15\Journal\Models\Post
defaultRedirect: golem15/journal/posts
create:
redirect: golem15/journal/posts/update/:id
redirectClose: golem15/journal/posts
update:
redirect: golem15/journal/posts
redirectClose: golem15/journal/posts
messages:
create: golem15.journal::lang.posts.new_post
update: backend::lang.messages.form.update
saved: backend::lang.messages.form.saved
deleteConfirm: golem15.journal::lang.post.delete_confirm
deleted: backend::lang.messages.form.deleted

View File

@@ -0,0 +1,26 @@
list: ~/plugins/golem15/journal/models/post/columns.yaml
modelClass: Golem15\Journal\Models\Post
title: golem15.journal::lang.post.label_plural
recordUrl: golem15/journal/posts/update/:id
noRecordsMessage: backend::lang.list.no_records
recordsPerPage: 25
showCheckboxes: true
showSetup: true
showSorting: true
filter: config_filter.yaml
defaultSort:
column: published_at
direction: desc
toolbar:
buttons: [create, delete]
search:
prompt: backend::lang.list.search_prompt
messages:
create: golem15.journal::lang.posts.new_post
empty: backend::lang.list.no_records
deleteConfirm: golem15.journal::lang.post.delete_confirm
deleted: backend::lang.messages.list.deleted
rowStateDisabled: golem15.journal::lang.journal.chart_drafts