diff --git a/client/web/compose/src/components/Admin/Module/RelatedPages.vue b/client/web/compose/src/components/Admin/Module/RelatedPages.vue
index 5870c4dd5..8c777270d 100644
--- a/client/web/compose/src/components/Admin/Module/RelatedPages.vue
+++ b/client/web/compose/src/components/Admin/Module/RelatedPages.vue
@@ -134,7 +134,7 @@ export default {
})
this.createPage(page).then(({ pageID, title, blocks }) => {
- const pageLayout = new compose.PageLayout({ namespaceID, pageID, blocks, meta: { title } })
+ const pageLayout = new compose.PageLayout({ namespaceID, pageID, handle: 'primary', blocks, meta: { title } })
return this.createPageLayout(pageLayout)
}).catch(this.toastErrorHandler(this.$t('notification:module.recordPage.createFailed')))
.finally(() => {
@@ -167,7 +167,7 @@ export default {
this.createPage(page)
.then(({ pageID, title, blocks }) => {
- const pageLayout = new compose.PageLayout({ namespaceID, pageID, blocks, meta: { title } })
+ const pageLayout = new compose.PageLayout({ namespaceID, pageID, handle: 'primary', blocks, meta: { title } })
return Promise.all([
this.updatePage({ ...this.recordPage, selfID: pageID }),
this.createPageLayout(pageLayout),
diff --git a/client/web/compose/src/components/Admin/Page/Builder/Selector.vue b/client/web/compose/src/components/Admin/Page/Builder/Selector.vue
index c4cb11cd6..8f4028777 100644
--- a/client/web/compose/src/components/Admin/Page/Builder/Selector.vue
+++ b/client/web/compose/src/components/Admin/Page/Builder/Selector.vue
@@ -49,14 +49,14 @@
:get-option-key="b => b.blockID"
:options="existingBlocks"
:calculate-position="calculateDropdownPosition"
- placeholder="Blocks from other layouts"
+ :placeholder="$t('selector.selectableBlocks.placeholder')"
append-to-body
class="block-selector bg-white position-relative"
/>
{
return this.fetchPageLayouts().then(() => {
@@ -872,7 +872,7 @@ export default {
this.layout = this.layout || this.layouts[0]
if (!this.layout) {
- this.toastWarning('No layout, create one to edit it')
+ this.toastWarning('notification:page.page-layout.notFound.edit')
return this.$router.push(this.pageEditor)
}
diff --git a/client/web/compose/src/views/Admin/Pages/Edit.vue b/client/web/compose/src/views/Admin/Pages/Edit.vue
index 61169147a..4afac5c33 100644
--- a/client/web/compose/src/views/Admin/Pages/Edit.vue
+++ b/client/web/compose/src/views/Admin/Pages/Edit.vue
@@ -195,14 +195,14 @@
class="text-primary"
style="width: 45%; min-width: 200px;"
>
- Title *
+ {{ $t('page-layout.title') }}
|
- Handle
+ {{ $t('page-layout.handle') }}
|
|
@@ -229,10 +229,21 @@
-
+
+
+
+
+
+
+
-
@@ -290,7 +296,7 @@
variant="primary"
@click="addLayout"
>
- Add layout
+ {{ $t('page-layout.add') }}
@@ -301,7 +307,7 @@
- Visibility
+ {{ $t('page-layout.visibility') }}
@@ -326,20 +332,20 @@
- Record toolbar
+ {{ $t('page-layout.recordToolbar') }}
- Show back button
+ {{ $t('page-layout.recordToolbar.buttons.showBack') }}
- Show delete button
+ {{ $t('page-layout.recordToolbar.buttons.showDelete') }}
- Show clone button
+ {{ $t('page-layout.recordToolbar.buttons.showClone') }}
- Show new button
+ {{ $t('page-layout.recordToolbar.buttons.showNew') }}
- Show edit button
+ {{ $t('page-layout.recordToolbar.buttons.showEdit') }}
- Show submit button
+ {{ $t('page-layout.recordToolbar.buttons.showEdit') }}
- Label
+ {{ $t('page-layout.recordToolbar.actions.buttonLabel') }}
- Redirect to layout
+ {{ $t('page-layout.recordToolbar.actions.layout.label') }}
|
- Variant
+ {{ $t('page-layout.recordToolbar.actions.variant') }}
|
- Placement
+ {{ $t('page-layout.recordToolbar.actions.placement.label') }}
|
- Visible
+ {{ $t('page-layout.recordToolbar.actions.visible') }}
|
|
@@ -819,15 +825,9 @@ export default {
},
},
- actionKindOptions () {
- return [
- { value: 'toLayout', text: 'Go to layout' },
- ]
- },
-
actionLayoutOptions () {
return [
- { pageLayoutID: '', label: 'No route selected' },
+ { pageLayoutID: '', label: this.$t('page-layout.recordToolbar.actions.layout.placeholder') },
...this.layouts.filter(({ pageLayoutID }) => pageLayoutID !== NoID)
.map(({ pageLayoutID, handle, meta }) => ({ pageLayoutID, label: meta.title || handle || pageLayoutID })),
]
@@ -835,22 +835,22 @@ export default {
actionPlacementOptions () {
return [
- { value: 'start', text: 'Start' },
- { value: 'center', text: 'Center' },
- { value: 'end', text: 'End' },
+ { value: 'start', text: this.$t('page-layout.recordToolbar.actions.placement.start') },
+ { value: 'center', text: this.$t('page-layout.recordToolbar.actions.placement.center') },
+ { value: 'end', text: this.$t('page-layout.recordToolbar.actions.placement.end') },
]
},
actionVariantOptions () {
return [
- { text: this.$t('general:variants.primary'), value: 'primary' },
- { text: this.$t('general:variants.secondary'), value: 'secondary' },
- { text: this.$t('general:variants.success'), value: 'success' },
- { text: this.$t('general:variants.warning'), value: 'warning' },
- { text: this.$t('general:variants.danger'), value: 'danger' },
- { text: this.$t('general:variants.info'), value: 'info' },
- { text: this.$t('general:variants.light'), value: 'light' },
- { text: this.$t('general:variants.dark'), value: 'dark' },
+ { value: 'primary', text: this.$t('general:variants.primary') },
+ { value: 'secondary', text: this.$t('general:variants.secondary') },
+ { value: 'success', text: this.$t('general:variants.success') },
+ { value: 'warning', text: this.$t('general:variants.warning') },
+ { value: 'danger', text: this.$t('general:variants.danger') },
+ { value: 'info', text: this.$t('general:variants.info') },
+ { value: 'light', text: this.$t('general:variants.light') },
+ { value: 'dark', text: this.$t('general:variants.dark') },
]
},
},
diff --git a/client/web/compose/src/views/Public/Pages/Records/View.vue b/client/web/compose/src/views/Public/Pages/Records/View.vue
index 3cd23954c..d336d8c94 100644
--- a/client/web/compose/src/views/Public/Pages/Records/View.vue
+++ b/client/web/compose/src/views/Public/Pages/Records/View.vue
@@ -393,7 +393,7 @@ export default {
})
if (!this.layout) {
- this.toastWarning('No page layout, create one to view the page')
+ this.toastWarning('notification:page.page-layout.notFound.view')
return this.$router.go(-1)
}
diff --git a/client/web/compose/src/views/Public/Pages/View.vue b/client/web/compose/src/views/Public/Pages/View.vue
index e0449ca6d..4cab647e9 100644
--- a/client/web/compose/src/views/Public/Pages/View.vue
+++ b/client/web/compose/src/views/Public/Pages/View.vue
@@ -256,7 +256,7 @@ export default {
})
if (!this.layout) {
- this.toastWarning('No page layout, create one to view the page')
+ this.toastWarning('notification:page.page-layout.notFound.view')
return this.$router.go(-1)
}
diff --git a/locale/en/corteza-webapp-compose/block.yaml b/locale/en/corteza-webapp-compose/block.yaml
index e32d2f02e..f9acb1d1f 100644
--- a/locale/en/corteza-webapp-compose/block.yaml
+++ b/locale/en/corteza-webapp-compose/block.yaml
@@ -1,3 +1,10 @@
+selector:
+ selectableBlocks:
+ placeholder: Blocks from other layouts
+ tooltip:
+ clone:
+ ref: Clone with references
+ noRef: Clone without references
automation:
addPlaceholderLabel: Add placeholder (dummy button)
availableScriptsAndWorkflow: Available scripts and workflows ({{count}})
diff --git a/locale/en/corteza-webapp-compose/notification.yaml b/locale/en/corteza-webapp-compose/notification.yaml
index 8b55671d1..e0a758536 100644
--- a/locale/en/corteza-webapp-compose/notification.yaml
+++ b/locale/en/corteza-webapp-compose/notification.yaml
@@ -99,6 +99,9 @@ page:
copyFailed: Could not copy block {{reason}}
invalidBlock: Not a valid page-block
page-layout:
+ notFound:
+ edit: No page layout, create one to edit it
+ view: No page layout found, create one to view the page
save:
success: Layout saved
failed: Failed to save layout
diff --git a/locale/en/corteza-webapp-compose/page.yaml b/locale/en/corteza-webapp-compose/page.yaml
index c8eff0e8d..1bcc3dcef 100644
--- a/locale/en/corteza-webapp-compose/page.yaml
+++ b/locale/en/corteza-webapp-compose/page.yaml
@@ -1,3 +1,38 @@
+page-layout:
+ title: Title *
+ handle: Handle
+ add: Add layout
+ configure: 'Configure layout - "{{title}}"'
+ visibility: Visibility
+ condition:
+ label: Condition
+ placeholder: When will the layout be shown
+ roles:
+ label: Roles
+ placeholder: Pick roles that the layout will be shown to
+ recordToolbar:
+ buttons:
+ label: Buttons
+ showBack: Show "Back" button
+ showDelete: Show "Delete" button
+ showClone: Show "Save as copy" button
+ showNew: Show "Add new" button
+ showEdit: Show "Edit" button
+ showSave: Show "Save" button
+ actions:
+ label: Actions
+ buttonLabel: Label
+ variant: Variant
+ visible: Visible
+ placement:
+ label: Placement
+ start: Start
+ center: Center
+ end: End
+ layout:
+ label: Redirect to layout
+ placeholder: No layout selected
+
block:
general:
changeBlock: Change existing block