From dcf50239f14da1d70c3c45391360d4f3ae16b311 Mon Sep 17 00:00:00 2001 From: Emmy Leke Date: Wed, 8 Mar 2023 15:49:18 +0100 Subject: [PATCH] Fix the layout for recordlist configurator --- .../PageBlocks/RecordListConfigurator.vue | 777 ++++++++++++------ lib/vue/src/components/index.ts | 1 + .../src/components/input/CInputCheckbox.vue | 49 ++ lib/vue/src/components/input/index.ts | 1 + lib/vue/src/filters/index.ts | 1 - lib/vue/src/filters/truncate.ts | 6 - locale/en/corteza-webapp-compose/block.yaml | 27 +- 7 files changed, 571 insertions(+), 291 deletions(-) create mode 100644 lib/vue/src/components/input/CInputCheckbox.vue delete mode 100644 lib/vue/src/filters/truncate.ts diff --git a/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue b/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue index c2696c99f..3b19ffd03 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue @@ -3,68 +3,90 @@ - - - - - - {{ $t('recordList.recordPage') }} - - - - - - - - - - - - - - {{ $t('recordList.record.inlineEditorAllow') }} - - + {{ $t('recordList.record.generalLabel') }} + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ {{ $t('recordList.record.inlineEditor') }} +
+ - - - - - - - {{ $t('recordList.refField.footnote') }} - - + + - - - - + + + + {{ $t('recordList.refField.footnote') }} + + + + + + - {{ field.label || field.name }} - - - - {{ $t('recordList.positionField.footnote') }} - - + + - - - {{ $t('recordList.record.draggable') }} - - + + + + + {{ $t('recordList.positionField.footnote') }} + + + + + + + + + +
+
- - - {{ $t('recordList.record.hideAddButton') }} - - - {{ $t('recordList.record.hideImportButton') }} - - - {{ $t('recordList.record.linkToParent') }} - - +
+ {{ $t('recordList.record.prefilterLabel') }} +
- - - - + - ${recordID} - ${ownerID} - ${userID} - - - - {{ $t('recordList.record.prefilterHideSearch') }} - - - {{ $t('recordList.record.filterHide') }} - - + + + + - + + + + + + + + + + + + + ${recordID} + + ${ownerID} + + ${userID} + + + + + + +
+ +
- - - {{ $t('recordList.record.presortHideSort') }} - - +
+ {{ $t('recordList.record.presortLabel') }} +
+ + + + + + + - + + + + + + +
+
+ +
- - - {{ $t('recordList.record.hidePaging') }} - - - {{ $t('recordList.record.fullPageNavigation') }} - - - {{ $t('recordList.record.showTotalCount') }} - - - {{ $t('recordList.record.showDeletedRecordsOption') }} - - +
+ {{ $t('recordList.record.pagingLabel') }} +
- - - {{ $t('recordList.enableRecordPageNavigation') }} - - - {{ $t('recordList.export.allow') }} - - - {{ $t('recordList.record.enableBulkRecordEdit') }} - - + + + + + - - - {{ $t('recordList.selectable') }} - - + + + + + + - - - +
+
+ {{ $t('recordList.record.pagingOptions') }} +
- + + + + + + + + + + + + +
+
+
+ +
- - {{ $t('recordList.hideRecordReminderButton') }} - - - {{ $t('recordList.hideRecordCloneButton') }} - - + {{ $t('recordList.record.newLabel') }} + + - {{ $t('recordList.hideRecordEditButton') }} - - - {{ $t('recordList.hideRecordViewButton') }} - - - {{ $t('recordList.hideRecordPermissionsButton') }} - - + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ {{ $t('recordList.record.moreOptions') }} +
+ + + + + + {{ $t('recordList.hideRecordViewButton') }} + + + + {{ $t('recordList.hideRecordEditButton') }} + + + + {{ $t('recordList.hideRecordCloneButton') }} + + + + + + + + {{ $t('recordList.record.showDeletedRecordsOption') }} + + + + {{ $t('recordList.hideRecordPermissionsButton') }} + + + + {{ $t('recordList.hideRecordReminderButton') }} + + + + + + + + {{ $t('recordList.export.allow') }} + + + + {{ $t('recordList.selectable') }} + + + + {{ $t('recordList.record.showTotalCount') }} + + + + + + + + + + + + +
+ diff --git a/lib/vue/src/components/input/index.ts b/lib/vue/src/components/input/index.ts index 334ab077f..e4cb31ee1 100644 --- a/lib/vue/src/components/input/index.ts +++ b/lib/vue/src/components/input/index.ts @@ -5,3 +5,4 @@ export { default as CInputPresort } from './CInputPresort.vue' export { default as CInputCron } from './CInputCron.vue' export { default as CInputSearch } from './CInputSearch.vue' export { default as CRichTextInput } from './CRichTextInput/index.vue' +export { default as CInputCheckbox } from './CInputCheckbox.vue' diff --git a/lib/vue/src/filters/index.ts b/lib/vue/src/filters/index.ts index 5c3e1c3d5..edf1e3ce2 100644 --- a/lib/vue/src/filters/index.ts +++ b/lib/vue/src/filters/index.ts @@ -1,2 +1 @@ export * from './date' -export * from './truncate' diff --git a/lib/vue/src/filters/truncate.ts b/lib/vue/src/filters/truncate.ts deleted file mode 100644 index 302c4472a..000000000 --- a/lib/vue/src/filters/truncate.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function Truncate(s: string, l: number): string { - if (!s) { - return '' - } - return s.length > l ? s.substring(0, l) + '...' : s -} \ No newline at end of file diff --git a/locale/en/corteza-webapp-compose/block.yaml b/locale/en/corteza-webapp-compose/block.yaml index 25ccedb09..1ac8122bb 100644 --- a/locale/en/corteza-webapp-compose/block.yaml +++ b/locale/en/corteza-webapp-compose/block.yaml @@ -390,25 +390,30 @@ recordList: record: draggable: Can drag & drop records to order them fullPageNavigation: Full page navigation - hideAddButton: Hide add record button - hideImportButton: Hide import record button - hidePaging: Hide paging - inlineEditor: Inline editor - inlineEditorAllow: Allow inline record editing + hideAddButton: The button 'Add Record' is hidden + hideImportButton: The button 'Import Record' is hidden + pagingLabel: Paging + pagingOptions: Paging Options + moreOptions: More Options + hidePaging: User will be able to use Paging + inlineEditor: Inline Options + inlineEditorAllow: Allow in-line record editing on module fields inlineEditorFootnote: Only one inline editor with the same module can be present the same page newLabel: New records noPermission: No permission to read record perPage: Records per page prefilterFootnote: Simplified SQL condition (WHERE ...) syntax is supported. Variables like {{0}}, {{1}} and {{2}} are evaluated (when available) - prefilterHideSearch: Hide search box - filterHide: Hide filtering - prefilterLabel: Prefilter records + prefilterHideSearch: Users are able to search the record list + filterHide: Users will see a prefiltered record list + prefilterLabel: Filtering + generalLabel: General Settings + prefilterCommand: Prefilter prefilterPlaceholder: field1 = 1 AND field2 = 232 presortFootnote: Simplified SQL condition (ORDER BY ...) syntax is supported presortToggleInput: Toggle input type - enableBulkRecordEdit: Enable bulk record edit - presortHideSort: Hide sorting - presortLabel: Presort records + presortHideSort: Users will be able to sort the list + presortLabel: Sorting + presortInputLabel: Presort presortPlaceholder: field1 DESC, field2 ASC showTotalCount: Show total record count showDeletedRecordsOption: Show option to see deleted records