Skip to content

EspoCRM – Open Source CRM Application

force list view settings param

Yuri Kuznetsovdc76b3340eb0
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",