From 901c0ba24ec921dea0d705aa93df59799e7907dc Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 9 May 2023 14:35:07 +0300 Subject: [PATCH] use forceDisplayTopBar --- client/res/templates/record/list.tpl | 2 -- client/src/views/list-related.js | 1 + client/src/views/list.js | 1 + client/src/views/record/list.js | 6 ++++++ client/src/views/record/panels/relationship.js | 1 + 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/res/templates/record/list.tpl b/client/res/templates/record/list.tpl index b17f1b0f12..a291264a35 100644 --- a/client/res/templates/record/list.tpl +++ b/client/res/templates/record/list.tpl @@ -116,8 +116,6 @@ {{/if}} -{{else}} -
{{/if}}
diff --git a/client/src/views/list-related.js b/client/src/views/list-related.js index f9ae7a2957..322796d66f 100644 --- a/client/src/views/list-related.js +++ b/client/src/views/list-related.js @@ -576,6 +576,7 @@ function (Dep, /** typeof module:search-manager.Class */SearchManager) { unlinkMassAction: !massUnlinkDisabled, skipBuildRows: true, buttonsDisabled: true, + forceDisplayTopBar: true, rowActionsOptions: { unlinkDisabled: this.panelDefs.unlinkDisabled || this.unlinkDisabled, }, diff --git a/client/src/views/list.js b/client/src/views/list.js index c04a869d8d..5fe68a529e 100644 --- a/client/src/views/list.js +++ b/client/src/views/list.js @@ -574,6 +574,7 @@ function (Dep, /** typeof module:search-manager.Class */SearchManager) { scope: this.scope, skipBuildRows: true, shortcutKeysEnabled: true, + forceDisplayTopBar: true, }; this.optionsToPass.forEach(option => { diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js index 6ecfce6091..9003bb449c 100644 --- a/client/src/views/record/list.js +++ b/client/src/views/record/list.js @@ -253,6 +253,12 @@ function (Dep, MassActionHelper, ExportHelper, RecordModal) { */ checkboxesDisabled: false, + /** + * Force displaying the top bar even if empty. Can be overridden by an option parameter. + * @protected + */ + forceDisplayTopBar: false, + /** * Where to display the pagination. Can be overridden by an option parameter. * diff --git a/client/src/views/record/panels/relationship.js b/client/src/views/record/panels/relationship.js index d7a01af79d..92bea7755f 100644 --- a/client/src/views/record/panels/relationship.js +++ b/client/src/views/record/panels/relationship.js @@ -277,6 +277,7 @@ function (Dep, SearchManager, RecordModal) { rowActionsOptions: { unlinkDisabled: this.defs.unlinkDisabled, }, + displayTotalCount: false, }, view => { view.getSelectAttributeList((selectAttributeList) => { if (selectAttributeList) {