feat: SEO change history

This commit is contained in:
2026-10-27 10:45:30 +01:00
parent 9f1082d62d
commit e8a6b9fc77
21 changed files with 1070 additions and 26 deletions

View File

@@ -0,0 +1,10 @@
{{- if .Data.Rows -}}
<table class="summer-table">
<thead><tr><th>{{ trans "golem15.seo::lang.history.diff_field" }}</th><th>{{ trans "golem15.seo::lang.history.diff_before" }}</th><th>{{ trans "golem15.seo::lang.history.diff_after" }}</th></tr></thead>
<tbody>
{{- range .Data.Rows -}}
<tr><td>{{ .Field }}</td><td>{{ if and .Created (not .Before) }}<span class="summer-table__sub">{{ trans "golem15.seo::lang.history.created" }}</span>{{ else if .Mono }}<code>{{ .Before }}</code>{{ else }}{{ .Before }}{{ end }}</td><td>{{ if and .Deleted (not .After) }}<span class="summer-table__sub">{{ trans "golem15.seo::lang.history.deleted" }}</span>{{ else if .Mono }}<code>{{ .After }}</code>{{ else }}{{ .After }}{{ end }}</td></tr>
{{- end -}}
</tbody>
</table>
{{- end -}}

View File

@@ -0,0 +1,11 @@
# History filters (UI-SPEC C12): writer and date.
scopes:
via:
label: golem15.seo::lang.history.filter_via
modelClass: Golem15\SEO\Models\Revision
nameFrom: via
scope: FilterVia
created_at:
label: golem15.seo::lang.history.filter_when
type: daterange
column: created_at

View File

@@ -0,0 +1,8 @@
# History preview (UI-SPEC C12): read-only with the P5 diff.
name: golem15.seo::lang.history.name
form: ~/plugins/golem15/seo/models/revision/fields.yaml
modelClass: Golem15\SEO\Models\Revision
defaultRedirect: golem15/seo/history
messages:
preview: golem15.seo::lang.history.preview

View File

@@ -0,0 +1,22 @@
# History list (UI-SPEC C12): newest first, read-only, undone rows
# disabled.
list: ~/plugins/golem15/seo/models/revision/columns.yaml
modelClass: Golem15\SEO\Models\Revision
title: golem15.seo::lang.history.list_title
recordUrl: golem15/seo/history/preview/:id
noRecordsMessage: golem15.seo::lang.history.list_empty
recordsPerPage: 50
showSetup: true
filter: config_filter.yaml
defaultSort:
column: created_at
direction: desc
toolbar:
search:
prompt: backend::lang.list.search_prompt
messages:
empty: golem15.seo::lang.history.list_empty
rowStateDisabled: golem15.seo::lang.history.state_undone