Bug 31685: Replace current_article_requests_count in opac-user

Fixing the "( total)" in the caption of the table.

The tt var should be replaced now by current_article_requests.size.
Note that current_article_requests is an array now (from as_list).
We cannot use .count since it is no Koha object.

Test plan:
Submit a few article requests.
Check OPAC account page, and verify that both totals are fine now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5db2163857)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2022-10-05 13:45:09 +00:00 committed by Lucas Gass
parent e02af62e0d
commit 9b7b41be1f
1 changed files with 1 additions and 1 deletions

View File

@ -1039,7 +1039,7 @@
}
}
$(document).ready(function(){
$('#opac-user-article-requests caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests_count | html %]'));
$('#opac-user-article-requests caption .count').html(AR_CAPTION_COUNT.format('[% current_article_requests.size | html %]'));
$(".modal-nojs").addClass("modal").addClass("hide").removeClass("modal-nojs");