Files
pta/app/Views/layouts/footer.php
PTA 66cc8c8ade Base de travail V7.8 reprise du répertoire de travail
Commit technique : reproduit à l'identique l'état non commité de la copie
de travail (sécurisation V7.8, CSP à nonce, Session, migration des droits)
afin que le travail d'ergonomie qui suit soit isolable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 16:32:10 +02:00

38 lines
1.4 KiB
PHP

<?php
/** @var string $csrfToken */
/** @var array $motifs */
/** @var array $scripts */
/** @var array $modules */
/** @var array $pageConfig */
/** @var array $accessProfile */
/** @var array $permissions */
/** @var string $cspNonce */
?>
</main>
<script nonce="<?= htmlspecialchars($cspNonce, ENT_QUOTES) ?>">
window.PTA_CONFIG = {
csrfToken: <?= json_encode($csrfToken, JSON_THROW_ON_ERROR) ?>,
access: <?= json_encode($accessProfile, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE) ?>,
permissions: <?= json_encode($permissions, JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE) ?>,
motifs: <?= json_encode(array_map(static function (array $motif): array {
return [
'id' => (int) $motif['id_motif'],
'code' => (string) $motif['code'],
'label' => (string) $motif['libelle'],
'quota' => (int) $motif['compte_dans_quota'] === 1,
];
}, $motifs), JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE) ?>
};
window.PTA_PAGE_CONFIG = <?= json_encode([
'modules' => $modules,
'params' => $pageConfig,
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE) ?>;
</script>
<script src="assets/js/core.js?v=7.8"></script>
<?php foreach ($scripts as $script): ?>
<script src="assets/js/<?= htmlspecialchars($script) ?>?v=7.8"></script>
<?php endforeach; ?>
<script src="assets/js/page-bootstrap.js?v=7.8"></script>
</body>
</html>