Commit 56b6d45d authored by Administrator's avatar Administrator

Update 3 files via Son of Anton

parent c74a9e19
This diff is collapsed.
<?php
/**
* Main application layout — RTL Arabic-first.
* All authenticated pages use this layout.
*/
use App\Core\App;
use App\Core\CSRF;
$app = App::getInstance();
$employee = $app->currentEmployee();
$employeeName = $employee ? ($employee->full_name_ar ?? 'مستخدم') : 'زائر';
$currentPath = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH);
?>
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="<?= \App\Core\CSRF::token() ?>">
<title><?= $__template->yield('title', 'نادي النادي شيراتون') ?></title>
<meta name="csrf-token" content="<?= e(CSRF::token()) ?>">
<title><?= $__template->yield('title', 'لوحة التحكم') ?> — نادي النادي شيراتون</title>
<link rel="stylesheet" href="<?= url('assets/css/main.css') ?>">
<?= $__template->yield('styles', '') ?>
</head>
<body>
<aside class="sidebar" id="sidebar">
<?php $__template->include('Shared.Components.sidebar', ['app' => $app]); ?>
</aside>
<div class="main-wrapper">
<header class="topbar">
<?php $__template->include('Shared.Components.header', ['app' => $app]); ?>
</header>
<div class="content-area">
<div class="breadcrumb-area">
<?= $__template->yield('breadcrumbs', '') ?>
</div>
<div class="page-header-row">
<h1 class="page-title"><?= $__template->yield('title', '') ?></h1>
<div class="page-actions">
<?= $__template->yield('page_actions', '') ?>
</div>
</div>
<!-- Sidebar -->
<aside class="sidebar" id="sidebar">
<?php $__template->include('Shared.Components.sidebar'); ?>
</aside>
<?php $__template->include('Shared.Components.alerts', ['app' => $app]); ?>
<!-- Main Wrapper -->
<div class="main-wrapper" id="main-wrapper">
<main class="main-content">
<?= $__template->yield('content', '') ?>
</main>
<!-- Top Header -->
<header class="top-header">
<div class="header-right">
<button class="sidebar-toggle-btn" onclick="toggleSidebar()"></button>
<div class="header-title">
<h1><?= $__template->yield('title', 'لوحة التحكم') ?></h1>
</div>
</div>
<div class="header-left">
<?= $__template->yield('page_actions', '') ?>
<div class="header-user">
<span class="header-user-name"><?= e($employeeName) ?></span>
<a href="/logout" class="header-logout" title="تسجيل الخروج">🚪</a>
</div>
</div>
</header>
<!-- Alerts -->
<?php $__template->include('Shared.Components.alerts'); ?>
<footer class="footer">
<span>نادي النادي شيراتون &copy; <?= date('Y') ?></span>
<span>الإصدار <?= e($app->config('app.version', '1.0.0')) ?></span>
<span><?= arabic_date(today()) ?></span>
</footer>
</div>
<!-- Page Content -->
<main class="page-content">
<?= $__template->yield('content', '') ?>
</main>
<div id="modal-container"></div>
<div id="toast-container" class="toast-container"></div>
<!-- Footer -->
<footer class="page-footer">
<span>نادي النادي شيراتون &copy; <?= date('Y') ?></span>
<span>الإصدار 1.0.0</span>
<span><?= arabic_date(date('Y-m-d')) ?></span>
</footer>
</div>
<script src="<?= url('assets/js/app.js') ?>"></script>
<?= $__template->yield('scripts', '') ?>
<?= $__template->stack('scripts') ?>
<script src="<?= url('assets/js/app.js') ?>"></script>
<script>
function toggleSidebar() {
var sb = document.getElementById('sidebar');
var mw = document.getElementById('main-wrapper');
sb.classList.toggle('collapsed');
mw.classList.toggle('sidebar-collapsed');
}
function toggleSubmenu(el) {
var parent = el.parentElement;
var submenu = parent.querySelector('.sidebar-submenu');
if (submenu) {
var isOpen = submenu.style.display === 'block';
submenu.style.display = isOpen ? 'none' : 'block';
parent.classList.toggle('open', !isOpen);
}
}
</script>
<?= $__template->yield('scripts', '') ?>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment