From eca8b34d883c941247c41eb95cee3a656ca0a869 Mon Sep 17 00:00:00 2001 From: stephan Date: Tue, 7 Jul 2026 14:53:02 -0400 Subject: [PATCH] Update bib management for MSIN-4429: Refine quantity and end input handling This commit enhances the bib management system by updating the CSS layout for quantity and end inputs, ensuring proper alignment and display. It also modifies PHP functions to introduce a new column for the "or" separator between quantity and end values, improving the user interface. Additionally, new SQL entries are added to support the updated functionality, including localized labels and hints for user guidance. These changes aim to improve usability and clarity in the bib input process. --- css/style.css | 32 ++++++-------- php/inc_fx_promoteur.php | 59 +++++++++++--------------- php/inc_settings.php | 2 +- sql/MSIN-4429-bib-range-qty.sql | 75 ++++++++++++++++++++++++++++++++- 4 files changed, 112 insertions(+), 56 deletions(-) diff --git a/css/style.css b/css/style.css index 6e44c49..936383a 100644 --- a/css/style.css +++ b/css/style.css @@ -1961,14 +1961,16 @@ a.ms1-trad-link.btn-aide-trad{ } /* MSIN-4379 — Cadenas + view/OK/stats ; badge auto à droite. */ -/* MSIN-4429 — colonne Début + bloc Qté/ou/Fin. */ +/* MSIN-4429 — colonnes Début | Qté | ou | Fin (alignées sur l'en-tête). */ .epr-line{ display:grid; grid-template-columns: 40px 40px 58px - minmax(148px, 1fr) + 58px + 22px + 58px 44px 48px auto @@ -1984,7 +1986,9 @@ a.ms1-trad-link.btn-aide-trad{ 40px 40px 58px - minmax(148px, 1fr) + 58px + 22px + 58px 44px 48px auto @@ -2045,21 +2049,8 @@ a.ms1-trad-link.btn-aide-trad{ background-color:#f1f3f5; } -/* MSIN-4429 — Qté / ou / Fin : pilote actif vs champ calculé / choix. */ -.epr-col-range-spec, -.bib-range-spec{ - display:grid; - grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr); - gap:6px; - align-items:center; - min-width:0; -} - -.epr-line-header .epr-col-range-spec{ - min-width:0; -} - -.epr-line-header .epr-col-range-spec > div{ +/* MSIN-4429 — colonne « ou » + états pilote / calculé sur Qté et Fin. */ +.epr-col-or{ display:flex; align-items:center; justify-content:center; @@ -2073,10 +2064,11 @@ a.ms1-trad-link.btn-aide-trad{ text-transform:lowercase; white-space:nowrap; user-select:none; + line-height:1; } -.bib-range-or--header{ - font-size:12px; +.epr-line-header .epr-col-or{ + padding-top:2px; } .bib-range-preview{ diff --git a/php/inc_fx_promoteur.php b/php/inc_fx_promoteur.php index 4cce9c3..c39ea6d 100644 --- a/php/inc_fx_promoteur.php +++ b/php/inc_fx_promoteur.php @@ -3629,11 +3629,7 @@ function renderBibAddRangeButton($epr_id) { return ob_get_clean(); } -/** - * MSIN-4429 — Bloc Qté / ou / Fin (saisie pilote + champ calculé). - * - * @return array{qty:int|string,start:int,end:int,has_values:bool} - */ +/** MSIN-4429 — Valeurs dérivées pour affichage Qté (colonne séparée de Fin). */ function fxBibRangeSpecValues(array $range) { $intStart = (int)($range['epr_bib_start'] ?? 0); $intEnd = (int)($range['epr_bib_finish'] ?? 0); @@ -3652,31 +3648,12 @@ function fxBibRangeSpecValues(array $range) { ]; } -/** MSIN-4429 — Inputs quantité + fin avec séparateur « ou ». */ -function fxBibRenderRangeQtyEndInputs(array $range, $blnRangeLocked) { - $tabSpec = fxBibRangeSpecValues($range); - $strQty = ($tabSpec['qty'] !== '') ? (int)$tabSpec['qty'] : ''; - $strEnd = ($tabSpec['end'] > 0) ? (int)$tabSpec['end'] : ''; - $strReadonly = $blnRangeLocked ? 'readonly' : ''; - +/** MSIN-4429 — Colonne « ou » entre Qté et Fin. */ +function fxBibRenderRangeOrCell() { ob_start(); ?> -
- - > - - - > +
-
-
- -
-
+
+ +
@@ -5235,7 +5210,23 @@ $tabSpec = fxBibRangeSpecValues($range); > - + + > + + + + + >