diff --git a/frontend/client/res/templates/record/list-expanded.tpl b/frontend/client/res/templates/record/list-expanded.tpl index 7b56100367..106724dc3d 100644 --- a/frontend/client/res/templates/record/list-expanded.tpl +++ b/frontend/client/res/templates/record/list-expanded.tpl @@ -31,7 +31,12 @@ {{#unless paginationEnabled}} {{#if showMoreEnabled}}
{{/if}} {{/unless}} diff --git a/frontend/client/res/templates/record/list.tpl b/frontend/client/res/templates/record/list.tpl index 510628e46d..269a54c52b 100644 --- a/frontend/client/res/templates/record/list.tpl +++ b/frontend/client/res/templates/record/list.tpl @@ -56,7 +56,12 @@ {{#unless paginationEnabled}} {{#if showMoreEnabled}} {{/if}} {{/unless}} diff --git a/frontend/client/src/views/notifications/panel.js b/frontend/client/src/views/notifications/panel.js index 3785cdac12..b3d1e1b884 100644 --- a/frontend/client/src/views/notifications/panel.js +++ b/frontend/client/src/views/notifications/panel.js @@ -39,6 +39,7 @@ Espo.define('Views.Notifications.Panel', 'View', function (Dep) { this.createView('list', 'Record.ListExpanded', { el: this.options.el + ' .list-container', collection: this.collection, + showTotalCount: false, listLayout: { rows: [ [ diff --git a/frontend/client/src/views/record/list.js b/frontend/client/src/views/record/list.js index 03ccaf2403..b26debd471 100644 --- a/frontend/client/src/views/record/list.js +++ b/frontend/client/src/views/record/list.js @@ -51,6 +51,8 @@ Espo.define('Views.Record.List', 'View', function (Dep) { _internalLayoutType: 'list-row', listContainerEl: '.list > table > tbody', + + showTotalCount: true, events: { 'click a.link': function (e) { @@ -266,11 +268,14 @@ Espo.define('Views.Record.List', 'View', function (Dep) { paginationBottom: paginationBottom, showMoreActive: this.collection.total > this.collection.length, showMoreEnabled: this.showMore, - checkboxes: this.checkboxes, + showTotalCount: this.showTotalCount, + totalCount: this.collection.total, + + checkboxes: this.checkboxes, actions: this._getActions(), rows: this.rows, topBar: paginationTop || this.checkboxes, - bottomBar: paginationBottom, + bottomBar: paginationBottom, }; }, @@ -337,6 +342,10 @@ Espo.define('Views.Record.List', 'View', function (Dep) { }; } + if ('showTotalCount' in this.options) { + this.showTotalCount = this.options.showTotalCount; + } + if (!this.getConfig().get('disableExport') || this.getUser().get('isAdmin')) { this.actions.push({ name: 'export', diff --git a/frontend/client/src/views/stream/list.js b/frontend/client/src/views/stream/list.js index 94ac21a3b3..a14ded8f30 100644 --- a/frontend/client/src/views/stream/list.js +++ b/frontend/client/src/views/stream/list.js @@ -24,6 +24,8 @@ Espo.define('Views.Stream.List', 'Views.Record.ListExpanded', function (Dep) { return Dep.extend({ type: 'listStream', + + showTotalCount: false, buildRow: function (i, model, callback) { var key = 'row-' + model.id;