feat(12.1-02): read-only preview screen with a status hint and record actions
- config_form.yaml preview block (optional headerPartial), reported in the form schema as preview
- fields with context: preview show only on the preview screen and are never written
- form messages preview and edit; recordActions without a preview block stops boot
- SPA route {id}/preview, PreviewView and PreviewField, record actions in the footer
- mapWinterUrl maps preview/:id; the update form returns to the preview
- summer-callout partial style classes for status hints
- README, docs, OpenAPI document, TS types and the embedded build updated
This commit is contained in:
6
modules/cabana/testdata/roster/controllers/people/_status.htm
vendored
Normal file
6
modules/cabana/testdata/roster/controllers/people/_status.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{{- if .Data.Title -}}
|
||||
<div class="summer-callout summer-callout--{{ .Data.Tone }}" role="status">
|
||||
<p class="summer-callout__title">{{ trans .Data.Title }}</p>
|
||||
<p class="summer-callout__text">{{ trans .Data.Text }}</p>
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -3,9 +3,14 @@ form: ~/plugins/acme/roster/models/person/fields.yaml
|
||||
modelClass: Person
|
||||
defaultRedirect: acme/roster/people
|
||||
create:
|
||||
redirect: acme/roster/people/update/:id
|
||||
redirect: acme/roster/people/preview/:id
|
||||
redirectClose: acme/roster/people
|
||||
update:
|
||||
redirect: acme/roster/people
|
||||
redirectClose: acme/roster/people
|
||||
redirectClose: acme/roster/people/preview/:id
|
||||
preview:
|
||||
headerPartial: status
|
||||
recordActions: [activate, reinstate]
|
||||
messages:
|
||||
preview: acme.roster::lang.people.preview
|
||||
edit: acme.roster::lang.people.edit
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
list: ~/plugins/acme/roster/models/person/columns.yaml
|
||||
modelClass: Person
|
||||
title: acme.roster::lang.people.title
|
||||
recordUrl: acme/roster/people/update/:id
|
||||
recordUrl: acme/roster/people/preview/:id
|
||||
recordsPerPage: 20
|
||||
showCheckboxes: true
|
||||
toolbar:
|
||||
|
||||
@@ -15,3 +15,12 @@ people:
|
||||
refused: You may not rename this person.
|
||||
refused_name: This name is reserved.
|
||||
locked: This person is locked and cannot be changed.
|
||||
preview: Person details
|
||||
edit: Edit person
|
||||
joined_ip: Joined from IP address
|
||||
banned_title: This person is banned
|
||||
banned_text: A banned person cannot sign in until the ban is lifted.
|
||||
deleted_title: This person is archived
|
||||
deleted_text: An archived person is hidden from the directory.
|
||||
inactive_title: This person is not active
|
||||
inactive_text: Activate the person to let them sign in.
|
||||
|
||||
@@ -15,3 +15,12 @@ people:
|
||||
refused: Nie możesz zmienić nazwy tej osoby.
|
||||
refused_name: Ta nazwa jest zastrzeżona.
|
||||
locked: Ta osoba jest zablokowana i nie można jej zmienić.
|
||||
preview: Szczegóły osoby
|
||||
edit: Edytuj osobę
|
||||
joined_ip: Adres IP przy dołączeniu
|
||||
banned_title: Ta osoba jest zablokowana
|
||||
banned_text: Zablokowana osoba nie może się zalogować do czasu zdjęcia blokady.
|
||||
deleted_title: Ta osoba jest zarchiwizowana
|
||||
deleted_text: Zarchiwizowana osoba jest ukryta w katalogu.
|
||||
inactive_title: Ta osoba jest nieaktywna
|
||||
inactive_text: Aktywuj osobę, aby mogła się zalogować.
|
||||
|
||||
@@ -7,3 +7,7 @@ fields:
|
||||
label: acme.roster::lang.people.email
|
||||
type: text
|
||||
span: right
|
||||
joined_ip:
|
||||
label: acme.roster::lang.people.joined_ip
|
||||
type: text
|
||||
context: preview
|
||||
|
||||
Reference in New Issue
Block a user