79c2d2b513
Full application redesign using Terminal Design System v1.2 (lt-* class system). Introduces shared layout_header/footer partials, upgrades base.css/base.js to TDS v1.2, and rewrites all views (Dashboard, Ticket, CreateTicket, and all 7 admin views) with lt-frame, lt-table, lt-modal, lt-stats-grid, lt-kv-grid, and data-action event delegation patterns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
46 lines
1.6 KiB
PHP
46 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
* layout_footer.php — Shared bottom-of-page partial for all views.
|
|
*
|
|
* Expected variables available from the including view (set before require):
|
|
* string $nonce CSP nonce from SecurityHeadersMiddleware::getNonce()
|
|
* array|null $pageScripts Optional array of extra JS paths to load after base.js
|
|
* string|null $pageInlineScript Optional raw JS string to run after all scripts load
|
|
*
|
|
* Globals used:
|
|
* $GLOBALS['currentUser'] — user array (user_id, username, is_admin)
|
|
* $GLOBALS['config'] — app config array (TIMEZONE, TIMEZONE_ABBREV)
|
|
* CsrfMiddleware::getToken() — returns current CSRF token string
|
|
*/
|
|
|
|
// layout_footer.php — JS globals + runtime scripts are loaded here
|
|
?>
|
|
|
|
</main><!-- /#main-content / .lt-main -->
|
|
|
|
<!-- base.js + utils.js + globals already loaded in <head> via layout_header.php -->
|
|
|
|
<?php if (!empty($pageScripts)): ?>
|
|
<!-- PAGE-SPECIFIC SCRIPTS -->
|
|
<?php foreach ($pageScripts as $_ltf_script): ?>
|
|
<script nonce="<?= htmlspecialchars($nonce, ENT_QUOTES, 'UTF-8') ?>" src="<?= htmlspecialchars($_ltf_script, ENT_QUOTES, 'UTF-8') ?>"></script>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if (!empty($pageInlineScript)): ?>
|
|
<!-- PAGE INLINE SCRIPT -->
|
|
<script nonce="<?= htmlspecialchars($nonce, ENT_QUOTES, 'UTF-8') ?>">
|
|
<?= $pageInlineScript ?>
|
|
</script>
|
|
<?php endif; ?>
|
|
|
|
<!-- LT INIT — runs boot animation once per session, then sets up UI handlers -->
|
|
<script nonce="<?= htmlspecialchars($nonce, ENT_QUOTES, 'UTF-8') ?>">
|
|
if (window.lt) {
|
|
lt.init({ bootName: 'TINKER TICKETS', skipBoot: false });
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|