From dc76b3340eb0864af7db4c57fdfc4e7c967e552f Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 10 Jun 2025 17:41:14 +0300 Subject: [PATCH] force list view settings param --- .../Espo/Resources/metadata/clientDefs/EmailTemplate.json | 1 + client/src/views/list.js | 1 + client/src/views/record/list.js | 5 +++++ schema/metadata/clientDefs.json | 4 ++++ 4 files changed, 11 insertions(+) diff --git a/application/Espo/Resources/metadata/clientDefs/EmailTemplate.json b/application/Espo/Resources/metadata/clientDefs/EmailTemplate.json index 11ef0cdc92..10d1f015f4 100644 --- a/application/Espo/Resources/metadata/clientDefs/EmailTemplate.json +++ b/application/Espo/Resources/metadata/clientDefs/EmailTemplate.json @@ -1,5 +1,6 @@ { "controller": "controllers/record", + "forceListViewSettings": true, "views": { "list": "views/email-template/list" }, diff --git a/client/src/views/list.js b/client/src/views/list.js index 9537bfdb9e..d16a036e8b 100644 --- a/client/src/views/list.js +++ b/client/src/views/list.js @@ -637,6 +637,7 @@ class ListView extends MainView { forceDisplayTopBar: true, additionalRowActionList: this.getMetadata().get(`clientDefs.${this.scope}.rowActionList`), settingsEnabled: true, + forceSettings: this.getMetadata().get(`clientDefs.${this.scope}.forceListViewSettings`), }; if (this.getHelper().isXsScreen()) { diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js index 96efea1bb9..33464477bb 100644 --- a/client/src/views/record/list.js +++ b/client/src/views/record/list.js @@ -98,6 +98,7 @@ class ListRecordView extends View { * @property {boolean} [columnResize] Column resize. Actual only if the settings is enabled. * @property {function(import('model').default[])} [onSelect] An on-select callback. Actual if selectable. * As of v9.1.0. + * @property {boolean} [forceSettings] Force settings. As of v9.2.0. */ /** @@ -2053,6 +2054,10 @@ class ListRecordView extends View { this.checkboxes = false; } + if (this.options.forceSettings) { + this.forceSettings = true; + } + /** * @private * @type {boolean} diff --git a/schema/metadata/clientDefs.json b/schema/metadata/clientDefs.json index d69124d5f5..5801f5650f 100644 --- a/schema/metadata/clientDefs.json +++ b/schema/metadata/clientDefs.json @@ -53,6 +53,10 @@ "type": "boolean", "description": "Disables remove." }, + "forceListViewSettings": { + "type": "boolean", + "description": "Force list view settings for non-object entity types. As of v9.2.0." + }, "views": { "description": "View classes. Available views: list, detail, edit, listRelated.", "type": "object",