plural results text

This commit is contained in:
Corban-Lee Jones 2024-08-16 19:04:24 +01:00
parent 656e6c1106
commit 41a3376033

View File

@ -321,7 +321,7 @@ function createTableControls(containingSelector, pageSizeId) {
<div class="table-controls row mb-3 px-3">
<div class="col-lg-2">
<div class="table-page-info d-flex justify-content-start align-items-center mx-auto">
<span class="pageinfo-total"></span>&nbsp;Results
<span class="pageinfo-total"></span>
</div>
</div>
<div class="col-lg-8">
@ -382,7 +382,7 @@ function updateTableContainer(containerId, page, pageSize, itemsCount, totalItem
// Updates the pagination text for a given pageInfoId
function updateTablePaginationInfo(pageInfoId, showing, total) {
$(`${pageInfoId} .pageinfo-showing`).text(showing);
$(`${pageInfoId} .pageinfo-total`).text(total);
$(`${pageInfoId} .pageinfo-total`).text(`${total} Result${total > 1 ? "s" : ""}`);
}
// Updates the pagination buttons for a given pageControlsId