From 0495ded5c23692390c27bfef12576690da7e1900 Mon Sep 17 00:00:00 2001 From: stephan Date: Thu, 18 Jun 2026 11:48:10 -0400 Subject: [PATCH] Enhance bib management with translation buttons and CSS updates; increment version code This commit introduces new functions for handling translation buttons in the bib management system, improving user interaction with translated content. The CSS is updated to style these buttons appropriately within the bib summary sections. Additionally, the version code is incremented to 4.72.667 to reflect these enhancements, further improving the user experience in managing bib assignments. --- css/style.css | 13 ++++ php/inc_fx_promoteur.php | 149 +++++++++++++++++++++++++++------------ php/inc_settings.php | 2 +- 3 files changed, 119 insertions(+), 45 deletions(-) diff --git a/css/style.css b/css/style.css index cec62e2..31ed716 100644 --- a/css/style.css +++ b/css/style.css @@ -1670,6 +1670,19 @@ a.ms1-trad-link.btn-aide-trad{ font-size:9px; } +#module-bib .epr-header-summary .btn-aide-trad, +#module-bib .bib-auto-badge--row .btn-aide-trad{ + width:18px; + height:18px; + margin-left:4px; + flex-shrink:0; +} + +#module-bib .epr-header-summary .btn-aide-trad .fa, +#module-bib .bib-auto-badge--row .btn-aide-trad .fa{ + font-size:9px; +} + .tippy-box[data-theme~='ms1-bib']{ background-color:#1e293b; color:#f8fafc; diff --git a/php/inc_fx_promoteur.php b/php/inc_fx_promoteur.php index 62ba5ec..3e19134 100644 --- a/php/inc_fx_promoteur.php +++ b/php/inc_fx_promoteur.php @@ -1052,7 +1052,9 @@ function fxShowAjouterQuantiteV4($int_epr_id, $intQte, $strLangue) { ?>
+ +
' . fxBibEsc($strText) . ''; + $strInner = fxBibEsc($strText); + if ($strTradClef !== '') { + $strInner .= fxBibTradButton($strTradClef); + } + return '' . $strInner . ''; } /** Résumé gestion : quantité disponible. */ @@ -3037,7 +3071,7 @@ function fxBibGestionHeaderSummary($epr_id) { $arrQuantites = fxGetQuantites((int)$epr_id); $intDispo = (int)$arrQuantites['qte_restante']; $strLabel = fxBibSiteOrBibTexte('promoteur_qte_epr_qte', 'bib_v4_summary_dispo'); - return fxBibHeaderSummaryBadge($strLabel . ' : ' . $intDispo, 'dispo'); + return fxBibHeaderSummaryBadge($strLabel . ' : ' . $intDispo, 'dispo', 'bib_v4_summary_dispo'); } /** Résumé assignation : nombre de séquences (+ auto si actif). */ @@ -3046,16 +3080,31 @@ function fxBibAssignHeaderSummary($intSeqCount, $blnAutoActive = false) { $intSeqCount = (int)$intSeqCount; if ($intSeqCount > 0) { if ($intSeqCount === 1) { - $strSeq = fxBibTexte('bib_v4_summary_seq_one', 0); + $html .= fxBibHeaderSummaryBadge( + fxBibTexte('bib_v4_summary_seq_one', 0), + 'seq', + 'bib_v4_summary_seq_one' + ); } else { - $strSeq = fxBibMsg('bib_v4_summary_seq_many', $intSeqCount); + $html .= fxBibHeaderSummaryBadge( + fxBibMsg('bib_v4_summary_seq_many', $intSeqCount), + 'seq', + 'bib_v4_summary_seq_many' + ); } - $html .= fxBibHeaderSummaryBadge($strSeq, 'seq'); } else { - $html .= fxBibHeaderSummaryBadge(fxBibTexte('bib_v4_summary_seq_empty', 0), 'seq-empty'); + $html .= fxBibHeaderSummaryBadge( + fxBibTexte('bib_v4_summary_seq_empty', 0), + 'seq-empty', + 'bib_v4_summary_seq_empty' + ); } if ($blnAutoActive) { - $html .= fxBibHeaderSummaryBadge(fxBibTexte('bib_v4_auto_badge', 0), 'auto'); + $html .= fxBibHeaderSummaryBadge( + fxBibTexte('bib_v4_auto_badge', 0), + 'auto', + 'bib_v4_auto_badge' + ); } return $html; } @@ -3214,6 +3263,7 @@ function fxBibRenderRangeAutoBadge(array $range, $mode = 'assign') { . fxBibTippyAttr('bib_v4_auto') . '>' . fxBibEsc(fxBibTexte('bib_v4_auto', 0)) + . fxBibTradButton('bib_v4_auto') . ''; } @@ -3221,22 +3271,28 @@ function fxBibRenderRangeAutoBadge(array $range, $mode = 'assign') { function fxBibEpreuveHeaderSummaries($tabEpreuve, $infoBib) { $html = ''; if ((int)$tabEpreuve['epr_equipe'] === 1) { - $strMode = fxBibSiteOrBibTexte('promoteur_epr_equipe', 'bib_v4_summary_team'); - $html .= fxBibHeaderSummaryBadge($strMode, 'team'); + $html .= fxBibHeaderSummaryBadge( + fxBibSiteOrBibTexte('promoteur_epr_equipe', 'bib_v4_summary_team'), + 'team', + 'bib_v4_summary_team' + ); } else { - $strMode = fxBibSiteOrBibTexte('promoteur_epr_solo', 'bib_v4_summary_solo'); - $html .= fxBibHeaderSummaryBadge($strMode, 'solo'); + $html .= fxBibHeaderSummaryBadge( + fxBibSiteOrBibTexte('promoteur_epr_solo', 'bib_v4_summary_solo'), + 'solo', + 'bib_v4_summary_solo' + ); } - $strInscLabel = fxBibSiteOrBibTexte('promoteur_qte_epr_qte_ordered', 'bib_v4_summary_registered'); $html .= '' . '' . (int)$infoBib['total'] . ' ' - . fxBibEsc($strInscLabel) . ''; + . fxBibSiteOrBibTexteTrad('promoteur_qte_epr_qte_ordered', 'bib_v4_summary_registered') + . ''; - $strBibLabel = fxBibSiteOrBibTexte('promoteur_qte_epr_qte_orderedavec_bib', 'bib_v4_summary_with_bib'); $html .= '' . '' . (int)$infoBib['avec_bib'] . ' ' - . fxBibEsc($strBibLabel) . ''; + . fxBibSiteOrBibTexteTrad('promoteur_qte_epr_qte_orderedavec_bib', 'bib_v4_summary_with_bib') + . ''; return $html; } @@ -3301,6 +3357,7 @@ function fxBibColHeader($clef) { return '' . fxBibEsc($strLabel) . fxBibAideButton($clef) + . fxBibTradButton($clef) . ''; } @@ -3613,7 +3670,7 @@ if ($teamMode <= 0) { data-epr-id="">
- +
@@ -4097,7 +4154,7 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies =

- +

@@ -4111,15 +4168,15 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies =
  • - — - — + — + ); ?>
    • @@ -4146,18 +4203,18 @@ function renderBibAnomaliesPanel($int_eve_id, $strLangue = 'fr', $tabAnomalies = ?>
    • - — - — + — + ); ?>
      - — + — () @@ -4607,6 +4664,7 @@ $blnRangeLocked = fxBibRangeIsLocked($range); value="" > + + 0) { ?>
      @@ -4803,9 +4862,9 @@ if ($title != '') { } else { if ($hasRange) { - echo fxBibEsc(sprintf(fxBibTexte('bib_v4_view_title_range', 0), $start, $end)); + echo fxBibMsgTrad('bib_v4_view_title_range', $start, $end); } else { - fxBibTexte('bib_v4_view_title_all', 1); + echo fxBibTexteTrad('bib_v4_view_title_all', 1); } } ?> @@ -4820,16 +4879,16 @@ if ($title != '') {
      -
      +
      -
      +
      -
      -
      +
      +
      -
      +
      @@ -4875,7 +4934,7 @@ echo $p['no_equipe']; echo $p['pec_nom_equipe']; if ((int)$p['rol_id'] === 1) { - echo ' ' . fxBibEsc(fxBibTexte('bib_v4_view_captain', 0)); + echo ' ' . fxBibTexteTrad('bib_v4_view_captain', 0); } ?> @@ -4894,16 +4953,18 @@ echo $p['no_equipe'];
      - +
  • diff --git a/php/inc_settings.php b/php/inc_settings.php index ac73b7a..5b7d7a4 100644 --- a/php/inc_settings.php +++ b/php/inc_settings.php @@ -7,7 +7,7 @@ * Constantes * * **************/ -define('_VERSION_CODE', '4.72.666'); +define('_VERSION_CODE', '4.72.667'); define('_DATE_CODE', '2026-06-18'); //MSIN-4290 define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');