120 lines
8.3 KiB
PHP
120 lines
8.3 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="<?= $lang ?? 'en' ?>" dir="<?= ($lang ?? 'en') === 'ar' ? 'rtl' : 'ltr' ?>">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?= $this->escape($title ?? ($t['dashboard'] ?? 'Admin')) ?> - ScoutIQ</title>
|
|
<link rel="stylesheet" href="/assets/css/app.css">
|
|
<link rel="stylesheet" href="/assets/css/admin.css">
|
|
<?php if (($lang ?? 'en') === 'ar'): ?>
|
|
<style>
|
|
body { font-family: 'Tajawal', 'Inter', sans-serif; }
|
|
.sidebar { border-right: none; border-left: 1px solid var(--border-color); }
|
|
.sidebar .brand { flex-direction: row-reverse; }
|
|
.nav-menu { padding-right: 0; }
|
|
.nav-item a { flex-direction: row-reverse; text-align: right; }
|
|
.nav-item a svg { margin-right: 0; margin-left: 14px; }
|
|
.top-bar { flex-direction: row-reverse; }
|
|
.user-info { flex-direction: row-reverse; }
|
|
.dashboard-header { text-align: right; }
|
|
.metric-card { text-align: right; }
|
|
.metric-card::before { left: auto; right: 0; }
|
|
.metric-footer { flex-direction: row-reverse; }
|
|
.chart-card { text-align: right; }
|
|
.data-table th, .data-table td { text-align: right; }
|
|
.form-group { text-align: right; }
|
|
.form-label { text-align: right; }
|
|
.btn { flex-direction: row-reverse; gap: 8px; }
|
|
.alert { text-align: right; flex-direction: row-reverse; }
|
|
.page-header { flex-direction: row-reverse; text-align: right; }
|
|
.detail-row { flex-direction: row-reverse; }
|
|
.detail-row span:first-child { text-align: right; }
|
|
.form-control { text-align: right; }
|
|
</style>
|
|
<?php endif; ?>
|
|
<link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap" rel="stylesheet">
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="admin-container">
|
|
<!-- Sidebar -->
|
|
<aside class="sidebar">
|
|
<div class="brand">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" style="color: var(--accent);"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"></polyline></svg>
|
|
<span>ScoutIQ</span>
|
|
</div>
|
|
|
|
<nav style="flex: 1;">
|
|
<ul class="nav-menu">
|
|
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/dashboard') ? 'active' : '' ?>">
|
|
<a href="/admin/dashboard">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="9"></rect><rect x="14" y="3" width="7" height="5"></rect><rect x="14" y="12" width="7" height="9"></rect><rect x="3" y="16" width="7" height="5"></rect></svg>
|
|
<span><?= $t['dashboard'] ?? 'Dashboard' ?></span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/organizations') ? 'active' : '' ?>">
|
|
<a href="/admin/organizations">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>
|
|
<span><?= $t['organizations'] ?? 'Organizations' ?></span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/contacts') ? 'active' : '' ?>">
|
|
<a href="/admin/contacts">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
|
|
<span><?= $t['contacts'] ?? 'Contacts' ?></span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/opportunities') ? 'active' : '' ?>">
|
|
<a href="/admin/opportunities">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>
|
|
<span><?= $t['opportunities'] ?? 'Opportunities' ?></span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/sources') ? 'active' : '' ?>">
|
|
<a href="/admin/sources">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg>
|
|
<span><?= $t['sources'] ?? 'Data Sources' ?></span>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item <?= str_contains($_SERVER['REQUEST_URI'] ?? '', '/settings') ? 'active' : '' ?>">
|
|
<a href="/admin/settings">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
|
|
<span><?= $t['settings'] ?? 'Settings' ?></span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<div class="nav-menu">
|
|
<li class="nav-item">
|
|
<a href="/logout" style="color: var(--error);">
|
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
|
|
<span><?= $t['logout'] ?? 'Logout' ?></span>
|
|
</a>
|
|
</li>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Main Content -->
|
|
<main class="main-content">
|
|
<!-- Top bar -->
|
|
<header class="top-bar">
|
|
<div style="color: var(--text-muted); font-size: 0.9rem;">
|
|
<?= $t['platform_mode'] ?? 'Platform Mode' ?>: <span style="color: var(--accent); font-weight: 600; text-transform: uppercase;"><?= $this->escape($_ENV['APP_ENV'] ?? ($t['local'] ?? 'local')) ?></span>
|
|
</div>
|
|
<div class="user-info">
|
|
<span style="font-weight: 500; font-size: 0.95rem;"><?= $this->escape($user['name'] ?? 'User') ?></span>
|
|
<div class="avatar">
|
|
<?= strtoupper(substr($user['name'] ?? 'U', 0, 1)) ?>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- View content body -->
|
|
<div class="content-body">
|
|
<?= $content ?>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</body>
|
|
</html>
|