Update bib quantity summary panel to reflect new totals and improve localization, increment version code to 4.72.776

This commit modifies the rendering logic of the bib quantity summary panel to include updated totals for 'sans_bib', 'places_dispo', and 'avec_bib'. The localization keys are adjusted for better clarity, and unnecessary elements are removed to streamline the display. The version code is incremented to 4.72.776 to reflect these changes.
This commit is contained in:
2026-07-09 11:26:02 -04:00
parent b85b01f2d2
commit afdd50489f

View File

@ -5802,13 +5802,13 @@ function renderBibQtySummaryPanel($int_eve_id, $strLangue = 'fr', $tabSummary =
$tabTotals = $tabSummary['totals'] ?? [];
$tabEpreuves = $tabSummary['epreuves'] ?? [];
$blnHasPending = (int)($tabTotals['a_assigner'] ?? 0) > 0;
$blnHasSansBib = (int)($tabTotals['sans_bib'] ?? 0) > 0;
$blnHasOrphans = (int)($tabTotals['orphelins'] ?? 0) > 0;
ob_start();
?>
<div id="bib-qty-summary-panel"
class="bib-qty-summary-panel bib-anomalies-panel bib-tool-panel epr-block<?php echo ($blnHasPending || $blnHasOrphans) ? ' bib-qty-summary-panel--alert' : ''; ?> is-collapsed"
class="bib-qty-summary-panel bib-anomalies-panel bib-tool-panel epr-block<?php echo ($blnHasSansBib || $blnHasOrphans) ? ' bib-qty-summary-panel--alert' : ''; ?> is-collapsed"
data-bib-tool="qty_summary"
data-eve-id="<?php echo $int_eve_id; ?>"
data-bib-qty-summary-loaded="1">
@ -5817,18 +5817,30 @@ function renderBibQtySummaryPanel($int_eve_id, $strLangue = 'fr', $tabSummary =
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_title', 0)); ?>
<?php echo fxBibAideButton('bib_v4_qty_summary_title'); ?>
<span class="bib-qty-summary-badges">
<span class="epr-header-summary epr-header-summary--bib bib-qty-summary-badge">
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_a_assigner', 0)); ?> :
<strong><?php echo (int)($tabTotals['a_assigner'] ?? 0); ?></strong>
<span class="epr-header-summary bib-qty-summary-badge">
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_total', 0)); ?> :
<strong><?php echo (int)($tabTotals['total'] ?? 0); ?></strong>
</span>
<span class="epr-header-summary epr-header-summary--dispo bib-qty-summary-badge">
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_bib_restant', 0)); ?> :
<strong><?php echo (int)($tabTotals['bib_restant'] ?? 0); ?></strong>
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_places_dispo', 0)); ?> :
<strong><?php echo (int)($tabTotals['places_dispo'] ?? 0); ?></strong>
</span>
<span class="epr-header-summary bib-qty-summary-badge">
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_avec_bib', 0)); ?> :
<strong><?php echo (int)($tabTotals['avec_bib'] ?? 0); ?></strong>
</span>
<span class="epr-header-summary epr-header-summary--bib bib-qty-summary-badge<?php echo $blnHasSansBib ? ' bib-qty-summary-badge--warn' : ''; ?>">
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_sans_bib', 0)); ?> :
<strong><?php echo (int)($tabTotals['sans_bib'] ?? 0); ?></strong>
</span>
<span class="epr-header-summary bib-qty-summary-badge<?php echo $blnHasOrphans ? ' bib-qty-summary-badge--warn' : ''; ?>">
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_orphelins', 0)); ?> :
<strong><?php echo (int)($tabTotals['orphelins'] ?? 0); ?></strong>
</span>
<span class="epr-header-summary bib-qty-summary-badge">
<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_bib_restant', 0)); ?> :
<strong><?php echo (int)($tabTotals['bib_restant'] ?? 0); ?></strong>
</span>
</span>
</span>
<?php echo fxBibBlockCollapseToggle($strLangue, true); ?>
@ -5837,22 +5849,14 @@ function renderBibQtySummaryPanel($int_eve_id, $strLangue = 'fr', $tabSummary =
<section class="bib-qty-summary-totals" aria-label="<?php echo fxBibEsc(fxBibTexte('bib_v4_qty_summary_global', 0)); ?>">
<h3 class="bib-qty-summary-section-title"><?php fxBibTexteTrad('bib_v4_qty_summary_global', 1); ?></h3>
<dl class="bib-qty-summary-dl">
<div class="bib-qty-summary-dl__row">
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_a_assigner', 1); ?></dt>
<dd><?php echo (int)($tabTotals['a_assigner'] ?? 0); ?></dd>
</div>
<div class="bib-qty-summary-dl__row">
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_bib_restant', 1); ?></dt>
<dd><?php echo (int)($tabTotals['bib_restant'] ?? 0); ?></dd>
</div>
<div class="bib-qty-summary-dl__row">
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_orphelins', 1); ?></dt>
<dd><?php echo (int)($tabTotals['orphelins'] ?? 0); ?></dd>
</div>
<div class="bib-qty-summary-dl__row">
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_total', 1); ?></dt>
<dd><?php echo (int)($tabTotals['total'] ?? 0); ?></dd>
</div>
<div class="bib-qty-summary-dl__row">
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_places_dispo', 1); ?></dt>
<dd><?php echo (int)($tabTotals['places_dispo'] ?? 0); ?></dd>
</div>
<div class="bib-qty-summary-dl__row">
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_avec_bib', 1); ?></dt>
<dd><?php echo (int)($tabTotals['avec_bib'] ?? 0); ?></dd>
@ -5862,8 +5866,12 @@ function renderBibQtySummaryPanel($int_eve_id, $strLangue = 'fr', $tabSummary =
<dd><?php echo (int)($tabTotals['sans_bib'] ?? 0); ?></dd>
</div>
<div class="bib-qty-summary-dl__row">
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_places_dispo', 1); ?></dt>
<dd><?php echo (int)($tabTotals['places_dispo'] ?? 0); ?></dd>
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_orphelins', 1); ?></dt>
<dd><?php echo (int)($tabTotals['orphelins'] ?? 0); ?></dd>
</div>
<div class="bib-qty-summary-dl__row">
<dt><?php fxBibTexteTrad('bib_v4_qty_summary_bib_restant', 1); ?></dt>
<dd><?php echo (int)($tabTotals['bib_restant'] ?? 0); ?></dd>
</div>
</dl>
</section>
@ -5876,26 +5884,24 @@ function renderBibQtySummaryPanel($int_eve_id, $strLangue = 'fr', $tabSummary =
<thead>
<tr>
<th scope="col"><?php fxBibTexteTrad('bib_v4_qty_summary_col_epr', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_a_assigner', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_bib_restant', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_orphelins', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_total', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_places_dispo', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_avec_bib', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_sans_bib', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_places_dispo', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_orphelins', 1); ?></th>
<th scope="col" class="text-right"><?php fxBibTexteTrad('bib_v4_qty_summary_bib_restant', 1); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($tabEpreuves as $row) { ?>
<tr>
<th scope="row"><?php echo fxBibEsc($row['epr_label'] ?? ''); ?></th>
<td class="text-right"><?php echo (int)($row['a_assigner'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['bib_restant'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['orphelins'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['total'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['places_dispo'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['avec_bib'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['sans_bib'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['places_dispo'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['orphelins'] ?? 0); ?></td>
<td class="text-right"><?php echo (int)($row['bib_restant'] ?? 0); ?></td>
</tr>
<?php } ?>
</tbody>