MSIN-4459 — Refactor participant list rendering to improve layout and clarity. Update SQL query for team member sorting and adjust CSS for new styling conventions. Increment version code to 4.72.840.
This commit is contained in:
@ -5067,8 +5067,7 @@ button.inscr-gestion-list-remis:hover{
|
||||
background:#f7faff;
|
||||
}
|
||||
|
||||
.inscr-gestion-list-item__who{ grid-area:name; }
|
||||
.inscr-gestion-list-item__name{ display:flex; }
|
||||
.inscr-gestion-list-item__name{ grid-area:name; }
|
||||
.inscr-gestion-list-item__race{
|
||||
grid-area:race;
|
||||
white-space:normal;
|
||||
|
||||
@ -989,6 +989,7 @@ function fxInscrGestionFetchRows($intEveId, $arrReq) {
|
||||
|
||||
$strWhere = fxInscrGestionBuildWhere($intEveId, $arrReq);
|
||||
// MSIN-4459 — 1 ligne = 1 participant (coéquipiers dans les memes colonnes).
|
||||
// Equipes regroupées (pec / no_equipe, capitaine d'abord) ; solos par nom.
|
||||
// Exclut rol_id 3/4 (benevole / autre) comme le promoteur.
|
||||
$sql = 'SELECT p.no_bib, p.no_bib_remis, p.no_bib_remis_date, p.no_bib_remis_par, p.par_statut_course, p.par_id, p.par_equipe,'
|
||||
. ' p.par_prenom, p.par_nom, e.pec_id_original, e.epr_id, e.eve_id, e.pec_id, e.is_cancelled, e.pec_actif, p.rol_id,'
|
||||
@ -997,7 +998,13 @@ function fxInscrGestionFetchRows($intEveId, $arrReq) {
|
||||
. ' WHERE ' . $strWhere
|
||||
. ' AND p.pec_id = e.pec_id_original'
|
||||
. ' AND p.rol_id NOT IN (3, 4)'
|
||||
. ' ORDER BY p.par_nom, p.par_prenom, p.par_id';
|
||||
. ' ORDER BY'
|
||||
. ' CASE WHEN IFNULL(e.pec_equipe, 0) = 1'
|
||||
. " THEN CONCAT('T', LPAD(CAST(e.pec_id_original AS CHAR), 11, '0'))"
|
||||
. " ELSE CONCAT('P', p.par_nom, '\t', p.par_prenom)"
|
||||
. ' END,'
|
||||
. ' CASE WHEN p.rol_id = 1 THEN 0 ELSE 1 END,'
|
||||
. ' p.par_nom, p.par_prenom, p.par_id';
|
||||
|
||||
return $objDatabase->fxGetResults($sql);
|
||||
}
|
||||
@ -2224,25 +2231,15 @@ function fxInscrGestionRenderList($intEveId, $strLangue, $strBaseUrl, $arrReq) {
|
||||
|
||||
$strRemisLabel = fxInscrGestionT('promoteur_bib_enregistre');
|
||||
$strBibOkLabel = fxInscrGestionT('inscr_gestion_bib_ok');
|
||||
$strTeammateLabel = fxInscrGestionT('inscr_gestion_list_teammate');
|
||||
$strCaptainLabel = trim(fxInscrGestionT('participant-titre-capitaine'));
|
||||
if ($strCaptainLabel === '') {
|
||||
$strCaptainLabel = ($strLangue === 'en') ? 'Captain' : 'Capitaine';
|
||||
}
|
||||
|
||||
for ($j = $intStart; $j <= $intEnd; $j++) {
|
||||
$row = $tabRows[$j];
|
||||
$blnEquipe = (intval($row['pec_equipe']) === 1);
|
||||
$intPecId = (int)$row['pec_id_original'];
|
||||
$intParId = (int)$row['par_id'];
|
||||
$strTeamName = $blnEquipe
|
||||
? trim(fxUnescape(isset($row['pec_nom_equipe']) ? $row['pec_nom_equipe'] : ''))
|
||||
: '';
|
||||
$strTeamNo = $blnEquipe
|
||||
? trim(fxUnescape(isset($row['no_equipe']) ? $row['no_equipe'] : ''))
|
||||
: '';
|
||||
$blnCapitaine = $blnEquipe && ((int)$row['rol_id'] === 1);
|
||||
$blnCoequipier = $blnEquipe && !$blnCapitaine;
|
||||
|
||||
// MSIN-4459 — Fiche cible ce participant (capitaine ou coéquipier).
|
||||
$strFicheUrl = fxInscrGestionBuildUrl($strBaseUrl, $intEveId, $arrReq, array(
|
||||
@ -2267,9 +2264,6 @@ function fxInscrGestionRenderList($intEveId, $strLangue, $strBaseUrl, $arrReq) {
|
||||
isset($row['par_statut_course']) ? $row['par_statut_course'] : ''
|
||||
);
|
||||
$strCardClass = 'inscr-gestion-list-item';
|
||||
if ($blnCoequipier) {
|
||||
$strCardClass .= ' inscr-gestion-list-item--teammate';
|
||||
}
|
||||
$strCancelBadge = '';
|
||||
if ($row['is_cancelled'] == '1') {
|
||||
// MSIN-4405 — Cause derivee en lecture seule (aucune ecriture en base).
|
||||
@ -2281,24 +2275,10 @@ function fxInscrGestionRenderList($intEveId, $strLangue, $strBaseUrl, $arrReq) {
|
||||
|
||||
$blnRemis = (intval($row['no_bib_remis']) === 1);
|
||||
|
||||
// MSIN-4448 / MSIN-4459 — 1 participant = 1 ligne, memes colonnes.
|
||||
// MSIN-4459 — Meme densite que la liste solo : 1 ligne de nom (+ no equipe entre parentheses).
|
||||
echo '<div class="' . $strCardClass . '">';
|
||||
echo '<div class="inscr-gestion-list-item__who">';
|
||||
echo '<a class="inscr-gestion-list-item__name" href="' . $strFicheHref . '">'
|
||||
. fxInscrGestionEsc($strName) . $strCancelBadge . '</a>';
|
||||
if ($blnCapitaine) {
|
||||
echo '<span class="inscr-gestion-list-item__role">'
|
||||
. fxInscrGestionEsc($strCaptainLabel) . '</span>';
|
||||
} elseif ($blnCoequipier) {
|
||||
echo '<span class="inscr-gestion-list-item__role">'
|
||||
. fxInscrGestionEsc($strTeammateLabel) . '</span>';
|
||||
}
|
||||
if ($blnEquipe && $strTeamName !== '') {
|
||||
echo '<span class="inscr-gestion-list-item__team">'
|
||||
. fxInscrGestionEsc(sprintf(fxInscrGestionT('inscr_gestion_list_team_name'), $strTeamName))
|
||||
. '</span>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<a class="inscr-gestion-list-item__race" href="' . $strFicheHref . '" title="'
|
||||
. fxInscrGestionEsc($strRace) . '">' . fxInscrGestionEsc($strRace) . '</a>';
|
||||
echo '<a class="inscr-gestion-list-item__order" href="' . $strFicheHref . '">'
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Constantes *
|
||||
*
|
||||
**************/
|
||||
define('_VERSION_CODE', '4.72.839');
|
||||
define('_VERSION_CODE', '4.72.840');
|
||||
define('_DATE_CODE', '2026-07-20');
|
||||
//MSIN-4290
|
||||
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
||||
|
||||
Reference in New Issue
Block a user