Refactor bib management interface to support empty labels in column headers and enhance layout for statistics display. Updated CSS styles for improved responsiveness and adjusted translation handling in Python scripts for better clarity in the bib management system.
This commit is contained in:
@ -988,10 +988,16 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
.epr-block-assign .epr-content{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
gap:10px;
|
||||
gap:0;
|
||||
min-width:0;
|
||||
}
|
||||
|
||||
.epr-assign-divider{
|
||||
border-top:1px solid #ced4da;
|
||||
margin:14px 0 12px;
|
||||
flex-shrink:0;
|
||||
}
|
||||
|
||||
.epr-block-assign .bib-container{
|
||||
width:100%;
|
||||
min-width:0;
|
||||
@ -1019,6 +1025,10 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
line-height:1.2;
|
||||
}
|
||||
|
||||
.epr-col-header-label--empty{
|
||||
gap:0;
|
||||
}
|
||||
|
||||
.epr-line-header .btn-aide-bib{
|
||||
width:18px;
|
||||
height:18px;
|
||||
@ -1064,10 +1074,6 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
gap:8px;
|
||||
}
|
||||
|
||||
.epr-add-range-row{
|
||||
margin-top:4px;
|
||||
}
|
||||
|
||||
.epr-header-label{
|
||||
display:inline-flex;
|
||||
align-items:center;
|
||||
@ -1211,7 +1217,7 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
/* MSIN-4379 — View en 1re col. ; Début/Fin largeur fixe ; stats en fr. */
|
||||
/* MSIN-4379 — View/OK/Suppr icônes ; stats regroupées ; marge droite libre acceptée. */
|
||||
.epr-line{
|
||||
display:grid;
|
||||
grid-template-columns:
|
||||
@ -1220,10 +1226,8 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
58px
|
||||
44px
|
||||
48px
|
||||
minmax(52px, 1fr)
|
||||
minmax(52px, 1fr)
|
||||
minmax(52px, 1fr)
|
||||
0fr;
|
||||
auto
|
||||
minmax(0, 1fr);
|
||||
gap:8px;
|
||||
align-items:center;
|
||||
width:100%;
|
||||
@ -1237,12 +1241,34 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
58px
|
||||
44px
|
||||
48px
|
||||
minmax(48px, 1fr)
|
||||
minmax(48px, 1fr)
|
||||
minmax(48px, 1fr)
|
||||
auto
|
||||
28px;
|
||||
}
|
||||
|
||||
.epr-col-stats{
|
||||
display:grid;
|
||||
grid-template-columns:56px 48px 48px;
|
||||
gap:4px;
|
||||
align-items:center;
|
||||
justify-content:start;
|
||||
min-width:0;
|
||||
}
|
||||
|
||||
.epr-col-stats > .bib-last,
|
||||
.epr-col-stats > .bib-used,
|
||||
.epr-col-stats > .bib-dispo{
|
||||
text-align:center;
|
||||
font-size:13px;
|
||||
min-width:0;
|
||||
}
|
||||
|
||||
.epr-line-header .epr-col-stats > div{
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
min-width:0;
|
||||
}
|
||||
|
||||
.epr-line .bib-start,
|
||||
.epr-line .bib-end{
|
||||
width:100%;
|
||||
@ -1252,7 +1278,7 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
}
|
||||
|
||||
.epr-add-range-row{
|
||||
margin-top:4px;
|
||||
margin-top:6px;
|
||||
}
|
||||
|
||||
.epr-col-batch{
|
||||
@ -1275,6 +1301,7 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
flex-direction:column;
|
||||
gap:10px;
|
||||
width:100%;
|
||||
padding-top:2px;
|
||||
}
|
||||
|
||||
/* MOBILE */
|
||||
|
||||
@ -2681,17 +2681,32 @@ function fxBibGetInfoRow($clef) {
|
||||
return $bibInfoCache[$clef];
|
||||
}
|
||||
|
||||
/** Libellé bib v4 — sur compte.php auto-crée si absent ; en AJAX, lecture seule + repli. */
|
||||
function fxBibTexte($clef, $mem_echo = 0, $strFallback = '') {
|
||||
/** Libellé bib v4 — sur compte.php auto-crée si absent ; en AJAX, lecture seule + repli.
|
||||
* $blnAllowEmptyLabel : si true, info_texte vide en BD reste vide (en-têtes colonnes éditables). */
|
||||
function fxBibTexte($clef, $mem_echo = 0, $strFallback = '', $blnAllowEmptyLabel = false) {
|
||||
$row = fxBibGetInfoRow($clef);
|
||||
$blnHasDbRow = !empty($row) && array_key_exists('info_texte', $row);
|
||||
$str = trim($row['info_texte'] ?? '');
|
||||
|
||||
if ($blnAllowEmptyLabel && $blnHasDbRow && $str === '') {
|
||||
if ($mem_echo) {
|
||||
echo '';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
if ($str === '' || $str === $clef || $str === '*' . $clef . '*') {
|
||||
if (!defined('MS1_BIB_AJAX') || !MS1_BIB_AJAX) {
|
||||
if (!$blnAllowEmptyLabel || $strFallback !== '') {
|
||||
$str = trim(afficheTexte($clef, 0));
|
||||
}
|
||||
}
|
||||
if ($str === '' || $str === $clef || $str === '*' . $clef . '*') {
|
||||
$str = $strFallback !== '' ? $strFallback : $clef;
|
||||
if ($strFallback !== '') {
|
||||
$str = $strFallback;
|
||||
} else {
|
||||
$str = $blnAllowEmptyLabel ? '' : $clef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2769,10 +2784,15 @@ function fxBibBlockHeader($clef, $strFallback = '') {
|
||||
return '<span class="epr-header-label">' . fxBibEsc(fxBibTexte($clef, 0, $strFallback)) . fxBibAideButton($clef) . '</span>';
|
||||
}
|
||||
|
||||
/** Cellule d'en-tête de colonne séquence + aide optionnelle. */
|
||||
function fxBibColHeader($clef, $strFallback) {
|
||||
return '<span class="epr-col-header-label">'
|
||||
. fxBibEsc(fxBibTexte($clef, 0, $strFallback))
|
||||
/** Cellule d'en-tête de colonne séquence + aide optionnelle (info_texte peut être vide). */
|
||||
function fxBibColHeader($clef, $strFallback = '') {
|
||||
$strLabel = fxBibTexte($clef, 0, $strFallback, true);
|
||||
$strClass = 'epr-col-header-label';
|
||||
if ($strLabel === '') {
|
||||
$strClass .= ' epr-col-header-label--empty';
|
||||
}
|
||||
return '<span class="' . $strClass . '">'
|
||||
. fxBibEsc($strLabel)
|
||||
. fxBibAideButton($clef)
|
||||
. '</span>';
|
||||
}
|
||||
@ -2809,14 +2829,16 @@ function renderBibRangeHeader() {
|
||||
ob_start();
|
||||
?>
|
||||
<div class="epr-line epr-line-header">
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_view', ' '); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_start', ' '); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_end', ' '); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_ok', ' '); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_del', ' '); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_last', ' '); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_used', ' '); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_avail', ' '); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_view'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_start', 'Début'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_end', 'Fin'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_ok'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_del'); ?></div>
|
||||
<div class="epr-col-stats">
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_last', 'Dernier'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_used', 'Utilisé'); ?></div>
|
||||
<div><?php echo fxBibColHeader('bib_v4_col_avail', 'Dispo'); ?></div>
|
||||
</div>
|
||||
<div class="epr-col-batch"></div>
|
||||
</div>
|
||||
<?php
|
||||
@ -3072,6 +3094,7 @@ if ($teamMode <= 0) {
|
||||
|
||||
<?php } ?>
|
||||
|
||||
<div class="epr-assign-divider" role="separator" aria-hidden="true"></div>
|
||||
<?php echo renderBibAssignActions(
|
||||
$tabBibAssignments,
|
||||
$strLangue,
|
||||
@ -3630,11 +3653,10 @@ $mem_dispo = max(0, $nb_total - $nb_utilises);
|
||||
<?php } else { ?>
|
||||
<div></div>
|
||||
<?php } ?>
|
||||
<div class="bib-last" style="text-align:center;"><?php echo $range['dernier_bib']; ?></div>
|
||||
|
||||
<div class="bib-used" style="text-align:center;"><?php echo $range['nb_utilises']; ?></div>
|
||||
<div class="bib-dispo" data-dispo="<?php echo $mem_dispo; ?>" style="text-align:center;">
|
||||
<?php echo $mem_dispo; ?>
|
||||
<div class="epr-col-stats">
|
||||
<div class="bib-last"><?php echo $range['dernier_bib']; ?></div>
|
||||
<div class="bib-used"><?php echo $range['nb_utilises']; ?></div>
|
||||
<div class="bib-dispo" data-dispo="<?php echo $mem_dispo; ?>"><?php echo $mem_dispo; ?></div>
|
||||
</div>
|
||||
|
||||
<div class="batch-checkbox" style="text-align:center;">
|
||||
|
||||
@ -13,16 +13,16 @@ INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_gestion_title', 'en', 'Event management', 'Reserved for quantities and settings — coming soon.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_gestion_placeholder', 'fr', 'Quantités et paramètres — à venir.', '', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_gestion_placeholder', 'en', 'Quantities and settings — coming soon.', '', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_view', 'fr', 'View', 'Voir la grille des dossards de cette séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_view', 'en', 'View', 'View the bib grid for this sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_view', 'fr', '', 'Voir la grille des dossards de cette séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_view', 'en', '', 'View the bib grid for this sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_start', 'fr', 'Début', 'Premier numéro de la séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_start', 'en', 'Start', 'First number in the sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_end', 'fr', 'Fin', 'Dernier numéro de la séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_end', 'en', 'End', 'Last number in the sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_ok', 'fr', 'OK', 'Enregistrer cette séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_ok', 'en', 'OK', 'Save this sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_del', 'fr', 'Suppr.', 'Supprimer la séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_del', 'en', 'Del.', 'Delete this sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_ok', 'fr', '', 'Enregistrer cette séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_ok', 'en', '', 'Save this sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_del', 'fr', '', 'Supprimer la séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_del', 'en', '', 'Delete this sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_last', 'fr', 'Dernier', 'Dernier dossard assigné dans la séquence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_last', 'en', 'Last', 'Last bib assigned in the sequence.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_col_used', 'fr', 'Utilisé', 'Nombre de dossards déjà assignés.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
@ -67,3 +67,6 @@ INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_batch_simulate', 'en', 'Simulate', 'Shows who would receive which bib without changing the database.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_batch_go', 'fr', 'GO', 'Lance l''assignation batch pour de vrai.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) VALUES ('bib_v4_batch_go', 'en', 'GO', 'Runs the batch assignment for real.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
|
||||
-- Mise à jour légère (BD déjà importée) — colonnes icône sans libellé, aide (?) inchangée :
|
||||
-- UPDATE info SET info_texte = '' WHERE info_clef IN ('bib_v4_col_view','bib_v4_col_ok','bib_v4_col_del') AND info_prg = 'compte.php';
|
||||
|
||||
@ -25,11 +25,11 @@ ROWS = [
|
||||
"",
|
||||
"Quantities and settings — coming soon.",
|
||||
""),
|
||||
("bib_v4_col_view", "View", "Voir la grille des dossards de cette séquence.", "View", "View the bib grid for this sequence."),
|
||||
("bib_v4_col_view", "", "Voir la grille des dossards de cette séquence.", "", "View the bib grid for this sequence."),
|
||||
("bib_v4_col_start", "Début", "Premier numéro de la séquence.", "Start", "First number in the sequence."),
|
||||
("bib_v4_col_end", "Fin", "Dernier numéro de la séquence.", "End", "Last number in the sequence."),
|
||||
("bib_v4_col_ok", "OK", "Enregistrer cette séquence.", "OK", "Save this sequence."),
|
||||
("bib_v4_col_del", "Suppr.", "Supprimer la séquence.", "Del.", "Delete this sequence."),
|
||||
("bib_v4_col_ok", "", "Enregistrer cette séquence.", "", "Save this sequence."),
|
||||
("bib_v4_col_del", "", "Supprimer la séquence.", "", "Delete this sequence."),
|
||||
("bib_v4_col_last", "Dernier", "Dernier dossard assigné dans la séquence.", "Last", "Last bib assigned in the sequence."),
|
||||
("bib_v4_col_used", "Utilisé", "Nombre de dossards déjà assignés.", "Used", "Number of bibs already assigned."),
|
||||
("bib_v4_col_avail", "Dispo", "Dossards encore disponibles dans la séquence.", "Avail.", "Bibs still available in the sequence."),
|
||||
|
||||
@ -24,15 +24,15 @@ rows = [
|
||||
"",
|
||||
""),
|
||||
("bib_v4_col_view", "Colonne tableau séquences", "colonne",
|
||||
"View", "Voir la grille des dossards de cette séquence.", "View", "View the bib grid for this sequence.", ""),
|
||||
"", "Voir la grille des dossards de cette séquence.", "", "View the bib grid for this sequence.", "info_texte vide — icône œil + ?"),
|
||||
("bib_v4_col_start", "Colonne tableau séquences", "colonne",
|
||||
"Début", "Premier numéro de la plage.", "Start", "First number in the range.", "aide optionnelle"),
|
||||
("bib_v4_col_end", "Colonne tableau séquences", "colonne",
|
||||
"Fin", "Dernier numéro de la plage.", "End", "Last number in the range.", ""),
|
||||
("bib_v4_col_ok", "Colonne tableau séquences", "colonne",
|
||||
"OK", "Enregistrer cette plage.", "OK", "Save this range.", ""),
|
||||
"", "Enregistrer cette plage.", "", "Save this range.", "icône OK + ?"),
|
||||
("bib_v4_col_del", "Colonne tableau séquences", "colonne",
|
||||
"Suppr.", "Supprimer la plage.", "Del.", "Delete this range.", ""),
|
||||
"", "Supprimer la plage.", "", "Delete this range.", "icône poubelle + ?"),
|
||||
("bib_v4_col_last", "Colonne tableau séquences", "colonne",
|
||||
"Dernier", "Dernier dossard assigné dans la plage.", "Last", "Last bib assigned in the range.", ""),
|
||||
("bib_v4_col_used", "Colonne tableau séquences", "colonne",
|
||||
|
||||
Reference in New Issue
Block a user