feat(cabana): mail layouts and partials screens with reset, drift and custom layouts

- Layouts and partials controllers with catalog scoping, reset action and File version diff
- Custom layout create/delete with in-use refusal; meta.deletable and customized/outdated row states
- List schema golden fixtures updated for the two new row-state message keys

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-13 12:33:20 +01:00
parent 7efb9ed7ad
commit 83f76cc3f7
35 changed files with 1868 additions and 18 deletions

View File

@@ -230,6 +230,8 @@ messages:
row_state_deleted: Deleted
row_state_negative: Blocked
row_state_disabled: Inactive
row_state_customized: Customized
row_state_outdated: File changed
form:
create: New record
update: Edit record
@@ -604,6 +606,34 @@ mail:
invalid_layout: "Choose a layout from the list."
invalid_partial: "The partial “:name” does not exist."
invalid_no_content: "Put {{ .Content }} where the message goes."
name_field: "Name"
source: "Source"
source_custom: "Custom"
filter_status: "Status"
filter_customized: "Customized"
filter_not_customized: "Not customized"
filter_outdated: "File changed"
state_customized: "Customized"
state_outdated: "File changed"
tab_file_version: "File version"
info_description: "Description: :text"
info_file: "File: :path in :plugin"
info_not_customized: "Not customized. The form shows the file version; saving creates your version."
info_customized: "Customized. Your version is sent instead of the file."
info_custom_layout: "Custom layout. It exists only in the database and can be deleted."
info_variables: "Variables with sample values:"
info_no_samples: "This file declares no sample values. Variables show as [name] in the preview."
info_partial_usage: "Use it in a template or layout with:"
drift_title: "The file changed after this was customized"
drift_text: "A plugin update changed the file. Your version is still sent. Compare both on the File version tab, then save your version again to mark the change as reviewed, or reset to the file version."
file_changes: "Changes from the file"
file_legend: "Lines starting with + are only in your version. Lines starting with − are only in the file."
file_content: "File version"
file_identical: "Your version matches the file."
file_not_customized: "Not customized: the form already shows this version."
reset: "Reset to file version"
reset_done: "Reset to the file version."
reset_unavailable: "There is no customized version to reset."
template:
name: "Mail template"
list_title: "Mail templates"
@@ -621,3 +651,42 @@ mail:
layout_comment: "The layout wraps the message. Custom layouts are listed too."
body: "Message"
body_comment: "Markdown with variables such as {{ .Name }}. The plain-text version is made from it automatically."
reset_confirm: "Reset this template to the file version? Your subject, message and layout choice are deleted, and unsaved edits on this page are discarded. This cannot be undone."
layout:
name: "Mail layout"
new: "New layout"
list_title: "Mail layouts"
list_empty: "No layouts in this view. Clear the search, or create a layout."
menu_label: "Mail layouts"
menu_description: "Edit the layouts that wrap every message, or create your own."
tab_html: "HTML"
tab_text: "Plain text"
tab_css: "CSS"
code_comment: "Templates refer to the layout by this code. It cannot be changed later."
html: "HTML layout"
html_comment: "Wraps the HTML message. Put {{ .Content }} where the message goes."
text: "Plain-text layout"
text_comment: "Wraps the plain-text message. Put {{ .Content }} where the message goes."
css: "CSS"
css_comment: "Styles for this layout. They are inlined into the HTML message after the branding styles."
delete_confirm: "Delete this layout? This cannot be undone. A layout that customized templates still use cannot be deleted."
reset_confirm: "Reset this layout to the file version? Your HTML, plain-text and CSS changes are deleted, and unsaved edits on this page are discarded. This cannot be undone."
delete_in_use:
one: "The layout “:name” is used by :count customized template. Choose another layout for it first."
other: "The layout “:name” is used by :count customized templates. Choose another layout for them first."
code_taken: "This code is already used by another layout."
code_format: "Use lowercase letters, digits and dashes only."
partial:
name: "Mail partial"
list_title: "Mail partials"
list_empty: "No partials in this view. Clear the search."
menu_label: "Mail partials"
menu_description: "Edit the reusable blocks used in mail, such as buttons and panels."
no_create: "Mail partials come from plugin files and cannot be created here."
tab_html: "HTML"
tab_text: "Plain text"
html: "HTML"
html_comment: "Used in the HTML part of messages."
text: "Plain text"
text_comment: "Used in the plain-text part of messages."
reset_confirm: "Reset this partial to the file version? Your HTML and plain-text changes are deleted, and unsaved edits on this page are discarded. This cannot be undone."