update
This commit is contained in:
@@ -51,10 +51,10 @@ window.PTA_PAGE_CONFIG = <?= json_encode([
|
||||
'params' => $pageConfig,
|
||||
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE) ?>;
|
||||
</script>
|
||||
<script src="assets/js/core.js?v=7.16"></script>
|
||||
<script src="assets/js/core.js?v=7.23"></script>
|
||||
<?php foreach ($scripts as $script): ?>
|
||||
<script src="assets/js/<?= htmlspecialchars($script) ?>?v=7.16"></script>
|
||||
<script src="assets/js/<?= htmlspecialchars($script) ?>?v=7.23"></script>
|
||||
<?php endforeach; ?>
|
||||
<script src="assets/js/page-bootstrap.js?v=7.16"></script>
|
||||
<script src="assets/js/page-bootstrap.js?v=7.23"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -24,6 +24,11 @@
|
||||
/** @var string $csrfToken */
|
||||
|
||||
$isAgent = ($accessProfile['role'] ?? '') === 'AGENT';
|
||||
// Service Enfance et DSI ouvrent leur session avec un mot de passe (V7.12) :
|
||||
// eux seuls ont quelque chose à changer. La liste des rôles concernés vit en
|
||||
// base (v_acces_compte.mot_de_passe_requis) ; elle est recopiée ici pour un
|
||||
// simple affichage, jamais pour décider d'un droit.
|
||||
$peutChangerMotDePasse = in_array($accessProfile['role'] ?? '', ['SERVICE_ENFANCE', 'DSI'], true);
|
||||
|
||||
$navigation = [
|
||||
'dashboard' => ['dashboard.php', 'Tableau de bord'],
|
||||
@@ -36,7 +41,10 @@ $navigation = [
|
||||
'pta' => ['pta.php', 'PTA détaillé'],
|
||||
'teams' => ['teams.php', 'Équipes'],
|
||||
'vacations' => ['vacations.php', 'Vacances'],
|
||||
'manage_agents' => ['manage_agents.php', 'Agents'],
|
||||
'manage_structures' => ['manage_structures.php', 'Lieux d’affectation'],
|
||||
'administration' => ['administration.php', 'Administration'],
|
||||
'dsi' => ['dsi.php', 'Accès & journaux'],
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -49,7 +57,11 @@ $navigationGroups = [
|
||||
'Piloter' => ['dashboard', 'pending', 'coverage'],
|
||||
'Planifier' => ['planning', 'teams'],
|
||||
'Consulter' => ['agents', 'structures', 'annual', 'pta'],
|
||||
'Paramétrer' => ['vacations', 'administration'],
|
||||
// « Management » regroupe l'administration des personnes et des lieux : ce
|
||||
// qu'on crée et corrige au fil de l'eau, à distinguer des paramètres qu'on
|
||||
// règle une fois pour l'année.
|
||||
'Management' => ['manage_agents', 'manage_structures'],
|
||||
'Paramétrer' => ['vacations', 'administration', 'dsi'],
|
||||
];
|
||||
|
||||
$visibleGroups = [];
|
||||
@@ -92,7 +104,7 @@ $showHelpTab = in_array('faq', $allowedPages, true);
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= htmlspecialchars($pageTitle) ?> — PTA</title>
|
||||
<link rel="stylesheet" href="assets/style.css?v=7.16">
|
||||
<link rel="stylesheet" href="assets/style.css?v=7.23">
|
||||
</head>
|
||||
<body>
|
||||
<main class="app-shell">
|
||||
@@ -113,12 +125,15 @@ $showHelpTab = in_array('faq', $allowedPages, true);
|
||||
<small><?= htmlspecialchars((string) $accessProfile['structure_name']) ?></small>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<a class="button button-ghost switch-role-link" href="role.php?action=reset&csrf_token=<?= htmlspecialchars(urlencode($csrfToken), ENT_QUOTES) ?>">Changer de rôle</a>
|
||||
<?php if ($peutChangerMotDePasse): ?>
|
||||
<a class="button button-ghost switch-role-link" href="role.php?action=mot_de_passe">Mot de passe</a>
|
||||
<?php endif; ?>
|
||||
<a class="button button-ghost switch-role-link" href="role.php?action=reset&csrf_token=<?= htmlspecialchars(urlencode($csrfToken), ENT_QUOTES) ?>">Se déconnecter</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<?php if (!empty($_GET['access_denied'])): ?>
|
||||
<div class="message message-warning role-access-warning">Cette page n’est pas disponible avec votre rôle actuel.</div>
|
||||
<div class="message message-warning role-access-warning">Cette page n'est pas disponible avec votre rôle actuel.</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<nav class="view-tabs<?= $showGroupLabels ? ' view-tabs-grouped' : '' ?>" aria-label="Navigation principale">
|
||||
|
||||
Reference in New Issue
Block a user