From 79c182d1739a94f63b3ab693ba532070f5daefde Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 21 Mar 2023 15:42:40 +0200 Subject: [PATCH] kanban records per page --- application/Espo/Resources/defaults/config.php | 1 + application/Espo/Resources/i18n/en_US/Settings.json | 2 ++ .../Espo/Resources/layouts/Settings/userInterface.json | 2 +- .../Espo/Resources/metadata/entityDefs/Settings.json | 7 +++++++ client/src/views/list.js | 2 +- 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/application/Espo/Resources/defaults/config.php b/application/Espo/Resources/defaults/config.php index cd9606723a..37686c7ce1 100644 --- a/application/Espo/Resources/defaults/config.php +++ b/application/Espo/Resources/defaults/config.php @@ -51,6 +51,7 @@ return [ 'recordsPerPage' => 20, 'recordsPerPageSmall' => 5, 'recordsPerPageSelect' => 10, + 'recordsPerPageKanban' => 5, 'applicationName' => 'EspoCRM', 'version' => '@@version', 'timeZone' => 'UTC', diff --git a/application/Espo/Resources/i18n/en_US/Settings.json b/application/Espo/Resources/i18n/en_US/Settings.json index 9bbe095e2e..82ad47c16e 100644 --- a/application/Espo/Resources/i18n/en_US/Settings.json +++ b/application/Espo/Resources/i18n/en_US/Settings.json @@ -29,6 +29,7 @@ "recordsPerPage": "Records Per Page", "recordsPerPageSmall": "Records Per Page (Small)", "recordsPerPageSelect": "Records Per Page (Select)", + "recordsPerPageKanban": "Records Per Page (Kanban)", "tabList": "Tab List", "quickCreateList": "Quick Create List", "exportDelimiter": "Export Delimiter", @@ -213,6 +214,7 @@ "recordsPerPage": "Number of records initially displayed in list views.", "recordsPerPageSmall": "Number of records initially displayed in relationship panels.", "recordsPerPageSelect": "Number of records initially displayed when selecting records.", + "recordsPerPageKanban": "Number of records initially displayed in kanban columns.", "outboundEmailIsShared": "Allow users to send emails from this address.", "followCreatedEntities": "Users will automatically follow records they created.", "emailMessageMaxSize": "All inbound emails exceeding a specified size will be fetched w/o body and attachments.", diff --git a/application/Espo/Resources/layouts/Settings/userInterface.json b/application/Espo/Resources/layouts/Settings/userInterface.json index caf39519e2..dbe73cc805 100644 --- a/application/Espo/Resources/layouts/Settings/userInterface.json +++ b/application/Espo/Resources/layouts/Settings/userInterface.json @@ -13,7 +13,7 @@ { "rows": [ [{"name": "recordsPerPage"}, {"name": "recordsPerPageSelect"}], - [{"name": "recordsPerPageSmall"}, false], + [{"name": "recordsPerPageSmall"}, {"name": "recordsPerPageKanban"}], [{"name": "displayListViewRecordCount"}, false] ] }, diff --git a/application/Espo/Resources/metadata/entityDefs/Settings.json b/application/Espo/Resources/metadata/entityDefs/Settings.json index 4c4c3485db..f93f240ade 100644 --- a/application/Espo/Resources/metadata/entityDefs/Settings.json +++ b/application/Espo/Resources/metadata/entityDefs/Settings.json @@ -30,6 +30,13 @@ "required": true, "tooltip": true }, + "recordsPerPageKanban": { + "type": "int", + "min": 1, + "max": 100, + "required": true, + "tooltip": true + }, "timeZone": { "type": "enum", "default": "UTC", diff --git a/client/src/views/list.js b/client/src/views/list.js index 40d04e2222..197de3a6d2 100644 --- a/client/src/views/list.js +++ b/client/src/views/list.js @@ -407,7 +407,7 @@ function (Dep, /** typeof module:search-manager.Class */SearchManager) { */ setViewModeKanban: function () { this.collection.url = 'Kanban/' + this.scope; - this.collection.maxSize = this.getConfig().get('recordsPerPageSmall'); + this.collection.maxSize = this.getConfig().get('recordsPerPageKanban'); this.collection.resetOrderToDefault(); },