From f85eb504de6abb66ade05f7051e91256ec65487c Mon Sep 17 00:00:00 2001 From: aynsix Date: Wed, 5 Jun 2024 17:19:21 +0300 Subject: [PATCH] display nb items --- Phraseanet-production-client/dist/production.js | 2 ++ Phraseanet-production-client/dist/production.min.js | 2 ++ .../src/components/ui/workzone/index.js | 2 ++ .../PhraseanetService/Controller/PSExposeController.php | 3 ++- templates/web/prod/WorkZone/Macros.html.twig | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Phraseanet-production-client/dist/production.js b/Phraseanet-production-client/dist/production.js index 4176497ed0..644ce44fc9 100644 --- a/Phraseanet-production-client/dist/production.js +++ b/Phraseanet-production-client/dist/production.js @@ -11155,6 +11155,8 @@ var workzone = function workzone(services) { if ('error' in data) { (0, _jquery2.default)('.publication-list').empty().html(data.error); } + + (0, _jquery2.default)('#expose_workzone .nb_item').text(data.nbItems); }, error: function error(data) { if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) { diff --git a/Phraseanet-production-client/dist/production.min.js b/Phraseanet-production-client/dist/production.min.js index 4176497ed0..644ce44fc9 100644 --- a/Phraseanet-production-client/dist/production.min.js +++ b/Phraseanet-production-client/dist/production.min.js @@ -11155,6 +11155,8 @@ var workzone = function workzone(services) { if ('error' in data) { (0, _jquery2.default)('.publication-list').empty().html(data.error); } + + (0, _jquery2.default)('#expose_workzone .nb_item').text(data.nbItems); }, error: function error(data) { if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) { diff --git a/Phraseanet-production-client/src/components/ui/workzone/index.js b/Phraseanet-production-client/src/components/ui/workzone/index.js index cd8622fdd0..24d0e4b075 100644 --- a/Phraseanet-production-client/src/components/ui/workzone/index.js +++ b/Phraseanet-production-client/src/components/ui/workzone/index.js @@ -1215,6 +1215,8 @@ const workzone = (services) => { if ('error' in data) { $('.publication-list').empty().html(data.error); } + + $('#expose_workzone .nb_item').text(data.nbItems); }, error: function (data) { if (data.status === 403 && data.getResponseHeader('x-phraseanet-end-session')) { diff --git a/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php b/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php index ddec27cb30..0beb023678 100644 --- a/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php +++ b/lib/Alchemy/Phrasea/PhraseanetService/Controller/PSExposeController.php @@ -346,7 +346,8 @@ public function listPublicationAction(PhraseaApplication $app, Request $request) 'exposeLogin' => $session->get($this->getLoginSessionName($exposeName)), 'basePath' => $basePath, 'previousPage' => $previousPage, - 'nextPage' => $nextPage + 'nextPage' => $nextPage, + 'nbItems' => count($publications) . ' / ' . $totalItems ]); } diff --git a/templates/web/prod/WorkZone/Macros.html.twig b/templates/web/prod/WorkZone/Macros.html.twig index c27cc19822..77bd4fb99f 100644 --- a/templates/web/prod/WorkZone/Macros.html.twig +++ b/templates/web/prod/WorkZone/Macros.html.twig @@ -725,6 +725,7 @@ < {{ 'prod:expose previous' | trans}} 1 {{ 'prod:expose next' | trans}} > +