change layout
This commit is contained in:
parent
863bd1cca9
commit
a3d27b0ee3
@ -7,8 +7,8 @@ if (session_status() === PHP_SESSION_NONE) {
|
|||||||
session_start();
|
session_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
$lang = $_GET['lang'] ?? ($_SESSION['lang'] ?? 'en');
|
$lang = $_GET['lang'] ?? ($_SESSION['lang'] ?? 'ar');
|
||||||
$lang = $lang === 'ar' ? 'ar' : 'en';
|
$lang = $lang === 'en' ? 'en' : 'ar';
|
||||||
$_SESSION['lang'] = $lang;
|
$_SESSION['lang'] = $lang;
|
||||||
$dir = $lang === 'ar' ? 'rtl' : 'ltr';
|
$dir = $lang === 'ar' ? 'rtl' : 'ltr';
|
||||||
|
|
||||||
@ -109,6 +109,12 @@ $translations = [
|
|||||||
'language' => 'Language',
|
'language' => 'Language',
|
||||||
'all_rights_reserved' => 'All rights reserved.',
|
'all_rights_reserved' => 'All rights reserved.',
|
||||||
'dashboard' => 'Dashboard',
|
'dashboard' => 'Dashboard',
|
||||||
|
'shipments' => 'Shipments',
|
||||||
|
'reports' => 'Reports',
|
||||||
|
'analytics' => 'Analytics',
|
||||||
|
'shipper_shipments' => 'Shipper Shipments',
|
||||||
|
'truck_owners_statements' => 'Truck Owners Statements',
|
||||||
|
'nav_platform_users' => 'Platform Users',
|
||||||
'settings' => 'Settings',
|
'settings' => 'Settings',
|
||||||
'company_setting' => 'Company Setting',
|
'company_setting' => 'Company Setting',
|
||||||
'integrations' => 'Integrations',
|
'integrations' => 'Integrations',
|
||||||
@ -295,6 +301,12 @@ $translations = [
|
|||||||
'language' => 'اللغة',
|
'language' => 'اللغة',
|
||||||
'all_rights_reserved' => 'جميع الحقوق محفوظة.',
|
'all_rights_reserved' => 'جميع الحقوق محفوظة.',
|
||||||
'dashboard' => 'لوحة القيادة',
|
'dashboard' => 'لوحة القيادة',
|
||||||
|
'shipments' => 'الشحنات',
|
||||||
|
'reports' => 'التقارير',
|
||||||
|
'analytics' => 'التحليلات',
|
||||||
|
'shipper_shipments' => 'شحنات الشاحنين',
|
||||||
|
'truck_owners_statements' => 'كشوف حساب أصحاب الشاحنات',
|
||||||
|
'nav_platform_users' => 'مستخدمو المنصة',
|
||||||
'settings' => 'الإعدادات',
|
'settings' => 'الإعدادات',
|
||||||
'company_setting' => 'إعدادات الشركة',
|
'company_setting' => 'إعدادات الشركة',
|
||||||
'integrations' => 'التكاملات',
|
'integrations' => 'التكاملات',
|
||||||
|
|||||||
@ -262,42 +262,6 @@ function render_admin_sidebar(string $active = 'dashboard'): void
|
|||||||
<i class="bi bi-box2-fill me-2"></i><?= e(t('shipments')) ?>
|
<i class="bi bi-box2-fill me-2"></i><?= e(t('shipments')) ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a class="nav-link fw-bold text-muted text-uppercase mt-2 d-flex justify-content-between align-items-center p-2 rounded" style="cursor: pointer; font-size: 0.85rem;" data-bs-toggle="collapse" data-bs-target="#collapseReports" aria-expanded="<?= $reportsActive ? 'true' : 'false' ?>">
|
|
||||||
<span><i class="bi bi-file-earmark-bar-graph-fill me-2"></i><?= e(t('reports')) ?></span>
|
|
||||||
<i class="bi bi-chevron-down small"></i>
|
|
||||||
</a>
|
|
||||||
<div class="collapse <?= $reportsActive ? 'show' : '' ?>" id="collapseReports">
|
|
||||||
<div class="nav flex-column gap-1 ms-3 border-start ps-2 border-2">
|
|
||||||
<a class="admin-nav-link <?= $active === 'reports_summary' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_reports_summary.php')) ?>">
|
|
||||||
<i class="bi bi-pie-chart-fill me-2"></i><?= e(t('analytics')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="admin-nav-link <?= $active === 'reports_shippers' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_reports_shippers.php')) ?>">
|
|
||||||
<i class="bi bi-people me-2"></i><?= e(t('shipper_shipments')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="admin-nav-link <?= $active === 'reports_truck_owners' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_reports_truck_owners.php')) ?>">
|
|
||||||
<i class="bi bi-truck me-2"></i><?= e(t('truck_owners_statements')) ?>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a class="nav-link fw-bold text-muted text-uppercase mt-2 d-flex justify-content-between align-items-center p-2 rounded" style="cursor: pointer; font-size: 0.85rem;" data-bs-toggle="collapse" data-bs-target="#collapseSettings" aria-expanded="<?= $settingsActive ? 'true' : 'false' ?>">
|
|
||||||
<span><i class="bi bi-gear-fill me-2"></i><?= e(t('settings')) ?></span>
|
|
||||||
<i class="bi bi-chevron-down small"></i>
|
|
||||||
</a>
|
|
||||||
<div class="collapse <?= $settingsActive ? 'show' : '' ?>" id="collapseSettings">
|
|
||||||
<div class="nav flex-column gap-1 ms-3 border-start ps-2 border-2">
|
|
||||||
<a class="admin-nav-link <?= $active === 'company_profile' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_company_profile.php')) ?>">
|
|
||||||
<i class="bi bi-building me-2"></i><?= e(t('company_setting')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="admin-nav-link <?= $active === 'integrations' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_integrations.php')) ?>">
|
|
||||||
<i class="bi bi-plug me-2"></i><?= e(t('integrations')) ?>
|
|
||||||
</a>
|
|
||||||
<a class="admin-nav-link <?= $active === 'notification_templates' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_notification_templates.php')) ?>">
|
|
||||||
<i class="bi bi-bell-fill me-2"></i><?= e(t('notification_templates')) ?>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a class="nav-link fw-bold text-muted text-uppercase mt-2 d-flex justify-content-between align-items-center p-2 rounded" style="cursor: pointer; font-size: 0.85rem;" data-bs-toggle="collapse" data-bs-target="#collapseLocations" aria-expanded="<?= $locationsActive ? 'true' : 'false' ?>">
|
<a class="nav-link fw-bold text-muted text-uppercase mt-2 d-flex justify-content-between align-items-center p-2 rounded" style="cursor: pointer; font-size: 0.85rem;" data-bs-toggle="collapse" data-bs-target="#collapseLocations" aria-expanded="<?= $locationsActive ? 'true' : 'false' ?>">
|
||||||
<span><i class="bi bi-geo-alt-fill me-2"></i><?= e(t('locations')) ?></span>
|
<span><i class="bi bi-geo-alt-fill me-2"></i><?= e(t('locations')) ?></span>
|
||||||
<i class="bi bi-chevron-down small"></i>
|
<i class="bi bi-chevron-down small"></i>
|
||||||
@ -349,6 +313,42 @@ function render_admin_sidebar(string $active = 'dashboard'): void
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<a class="nav-link fw-bold text-muted text-uppercase mt-2 d-flex justify-content-between align-items-center p-2 rounded" style="cursor: pointer; font-size: 0.85rem;" data-bs-toggle="collapse" data-bs-target="#collapseReports" aria-expanded="<?= $reportsActive ? 'true' : 'false' ?>">
|
||||||
|
<span><i class="bi bi-file-earmark-bar-graph-fill me-2"></i><?= e(t('reports')) ?></span>
|
||||||
|
<i class="bi bi-chevron-down small"></i>
|
||||||
|
</a>
|
||||||
|
<div class="collapse <?= $reportsActive ? 'show' : '' ?>" id="collapseReports">
|
||||||
|
<div class="nav flex-column gap-1 ms-3 border-start ps-2 border-2">
|
||||||
|
<a class="admin-nav-link <?= $active === 'reports_summary' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_reports_summary.php')) ?>">
|
||||||
|
<i class="bi bi-pie-chart-fill me-2"></i><?= e(t('analytics')) ?>
|
||||||
|
</a>
|
||||||
|
<a class="admin-nav-link <?= $active === 'reports_shippers' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_reports_shippers.php')) ?>">
|
||||||
|
<i class="bi bi-people me-2"></i><?= e(t('shipper_shipments')) ?>
|
||||||
|
</a>
|
||||||
|
<a class="admin-nav-link <?= $active === 'reports_truck_owners' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_reports_truck_owners.php')) ?>">
|
||||||
|
<i class="bi bi-truck me-2"></i><?= e(t('truck_owners_statements')) ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a class="nav-link fw-bold text-muted text-uppercase mt-2 d-flex justify-content-between align-items-center p-2 rounded" style="cursor: pointer; font-size: 0.85rem;" data-bs-toggle="collapse" data-bs-target="#collapseSettings" aria-expanded="<?= $settingsActive ? 'true' : 'false' ?>">
|
||||||
|
<span><i class="bi bi-gear-fill me-2"></i><?= e(t('settings')) ?></span>
|
||||||
|
<i class="bi bi-chevron-down small"></i>
|
||||||
|
</a>
|
||||||
|
<div class="collapse <?= $settingsActive ? 'show' : '' ?>" id="collapseSettings">
|
||||||
|
<div class="nav flex-column gap-1 ms-3 border-start ps-2 border-2">
|
||||||
|
<a class="admin-nav-link <?= $active === 'company_profile' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_company_profile.php')) ?>">
|
||||||
|
<i class="bi bi-building me-2"></i><?= e(t('company_setting')) ?>
|
||||||
|
</a>
|
||||||
|
<a class="admin-nav-link <?= $active === 'integrations' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_integrations.php')) ?>">
|
||||||
|
<i class="bi bi-plug me-2"></i><?= e(t('integrations')) ?>
|
||||||
|
</a>
|
||||||
|
<a class="admin-nav-link <?= $active === 'notification_templates' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_notification_templates.php')) ?>">
|
||||||
|
<i class="bi bi-bell-fill me-2"></i><?= e(t('notification_templates')) ?>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="mt-4 pt-4 border-top text-center">
|
<div class="mt-4 pt-4 border-top text-center">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user