diff --git a/css/style.css b/css/style.css index 08593f3e..eaffd98f 100644 --- a/css/style.css +++ b/css/style.css @@ -1068,6 +1068,11 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active { outline:2px dashed rgba(224,168,0,.55); outline-offset:4px; } +.ms1-perm-inspect-slot{ + display:inline-block; + margin:2px 6px 2px 0; + vertical-align:middle; +} .epr-wrapper{ display:flex; diff --git a/inc_tableau_gestion_epreuves.php b/inc_tableau_gestion_epreuves.php index 171ad951..935f2d7b 100644 --- a/inc_tableau_gestion_epreuves.php +++ b/inc_tableau_gestion_epreuves.php @@ -64,9 +64,6 @@ if (isset($_POST['btn_cancel_event_promo'])) { diff --git a/inc_tableau_promoteur.php b/inc_tableau_promoteur.php index a88228e3..0ed72ecf 100644 --- a/inc_tableau_promoteur.php +++ b/inc_tableau_promoteur.php @@ -247,6 +247,8 @@ if ($intEveId != 0) { ? 'Gestion des quantités et dossards' : $strMenuGestionQteDossards; ?> + + /compte/inc_tableau_inscriptions_gestion?promoteur_eve_id=&lng="> + + diff --git a/php/inc_fx_eve_acces.php b/php/inc_fx_eve_acces.php index 681200b2..50afdab1 100644 --- a/php/inc_fx_eve_acces.php +++ b/php/inc_fx_eve_acces.php @@ -1796,3 +1796,20 @@ function fxEveAccesPermInspectZoneAttr($strPermKey) return ' class="ms1-perm-inspect-zone" data-ms1-perm="' . htmlspecialchars($strPermKey, ENT_QUOTES, 'UTF-8') . '"'; } + +/** + * En mode inspecteur : badge apres un controle visible, ou seul si le controle est masque. + */ +function fxEveAccesPermInspectMark($strPermKey, $strHtml = '', $strContext = 'v2') +{ + if (!function_exists('fxAdminPermInspectModeActive') || !fxAdminPermInspectModeActive()) { + return $strHtml; + } + + $strBadge = fxEveAccesPermInspectBadge($strPermKey, $strContext); + if ($strHtml === '') { + return '' . $strBadge . ''; + } + + return $strHtml . ' ' . $strBadge; +} diff --git a/php/inc_fx_inscriptions_gestion.php b/php/inc_fx_inscriptions_gestion.php index 7d89373f..89820a7a 100644 --- a/php/inc_fx_inscriptions_gestion.php +++ b/php/inc_fx_inscriptions_gestion.php @@ -63,6 +63,27 @@ function fxInscrGestionCanDo($intComId, $intEveId, $strActionPerm) { return false; } +/** Badge cadenas (mode inspecteur super admin) sur la fiche de gestion. */ +function fxInscrGestionPermInspectEcho($strPermKey) { + if (!function_exists('fxAdminPermInspectModeActive') || !fxAdminPermInspectModeActive()) { + return; + } + fxInscrGestionLoadEveAcces(); + echo ' ' . fxEveAccesPermInspectBadge($strPermKey, 'inscr_gestion'); +} + +/** Badge + libelle pour un controle masque par les droits (mode inspecteur). */ +function fxInscrGestionPermInspectEchoHidden($strPermKey, $strLabel) { + if (!function_exists('fxAdminPermInspectModeActive') || !fxAdminPermInspectModeActive()) { + return; + } + fxInscrGestionLoadEveAcces(); + echo ''; + echo fxEveAccesPermInspectBadge($strPermKey, 'inscr_gestion'); + echo ' ' . fxInscrGestionEsc($strLabel) . ''; + echo ' '; +} + function fxInscrGestionLoadEveAcces() { require_once __DIR__ . '/inc_fx_eve_acces.php'; } @@ -1365,6 +1386,7 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq, $blnCanRefund = fxInscrGestionCanDo($intComId, $intRowEveId, 'inscriptions_gestion.refund'); $blnHasEditable = ($blnCanStatut || $blnCanBib || $blnCanRemis); $blnHasGestion = ($blnCanEdit || $blnCanCancel || $blnCanRestore || $blnCanRefund); + $blnInspect = function_exists('fxAdminPermInspectModeActive') && fxAdminPermInspectModeActive(); $strListUrl = fxInscrGestionBuildUrl($strBaseUrl, $intEveId, $arrReq, array('pec_id' => null, 'pg' => $arrReq['pg'])); $strEveCode = fxGetEvenementsUrl($arrRow['eve_id']); @@ -1429,7 +1451,7 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq, // Libelle du bouton de renvoi (facture/invitation) : passe par la table info pour etre editable. $strRenvoi = fxInscrGestionT('inscr_gestion_renvoi'); - if ($blnHasGestion) { + if ($blnHasGestion || $blnInspect) { fxInscrGestionRenderFicheSectionStart('gestion', fxInscrGestionT('inscr_gestion_section_management'), 'fa-cog', !$blnFromQr); echo '