feat: SEO change history
This commit is contained in:
10
controllers/history/_history_diff.htm
Normal file
10
controllers/history/_history_diff.htm
Normal 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 -}}
|
||||
11
controllers/history/config_filter.yaml
Normal file
11
controllers/history/config_filter.yaml
Normal 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
|
||||
8
controllers/history/config_form.yaml
Normal file
8
controllers/history/config_form.yaml
Normal 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
|
||||
22
controllers/history/config_list.yaml
Normal file
22
controllers/history/config_list.yaml
Normal 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
|
||||
Reference in New Issue
Block a user