change layout
This commit is contained in:
parent
863bd1cca9
commit
a3d27b0ee3
@ -7,8 +7,8 @@ if (session_status() === PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
$lang = $_GET['lang'] ?? ($_SESSION['lang'] ?? 'en');
|
||||
$lang = $lang === 'ar' ? 'ar' : 'en';
|
||||
$lang = $_GET['lang'] ?? ($_SESSION['lang'] ?? 'ar');
|
||||
$lang = $lang === 'en' ? 'en' : 'ar';
|
||||
$_SESSION['lang'] = $lang;
|
||||
$dir = $lang === 'ar' ? 'rtl' : 'ltr';
|
||||
|
||||
@ -108,7 +108,13 @@ $translations = [
|
||||
'privacy_policy' => 'Privacy Policy',
|
||||
'language' => 'Language',
|
||||
'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',
|
||||
'company_setting' => 'Company Setting',
|
||||
'integrations' => 'Integrations',
|
||||
@ -294,7 +300,13 @@ $translations = [
|
||||
'privacy_policy' => 'سياسة الخصوصية',
|
||||
'language' => 'اللغة',
|
||||
'all_rights_reserved' => 'جميع الحقوق محفوظة.',
|
||||
'dashboard' => 'لوحة القيادة',
|
||||
'dashboard' => 'لوحة القيادة',
|
||||
'shipments' => 'الشحنات',
|
||||
'reports' => 'التقارير',
|
||||
'analytics' => 'التحليلات',
|
||||
'shipper_shipments' => 'شحنات الشاحنين',
|
||||
'truck_owners_statements' => 'كشوف حساب أصحاب الشاحنات',
|
||||
'nav_platform_users' => 'مستخدمو المنصة',
|
||||
'settings' => 'الإعدادات',
|
||||
'company_setting' => 'إعدادات الشركة',
|
||||
'integrations' => 'التكاملات',
|
||||
@ -597,4 +609,4 @@ function has_permission(string $permissionSlug, ?int $userId = null): bool
|
||||
function format_currency(float $amount): string
|
||||
{
|
||||
return number_format($amount, 3) . ' OMR';
|
||||
}
|
||||
}
|
||||
@ -261,43 +261,7 @@ function render_admin_sidebar(string $active = 'dashboard'): void
|
||||
<a class="admin-nav-link <?= $active === 'shipments' ? 'active' : '' ?>" href="<?= e(url_with_lang('admin_shipments.php')) ?>">
|
||||
<i class="bi bi-box2-fill me-2"></i><?= e(t('shipments')) ?>
|
||||
</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' ?>">
|
||||
<span><i class="bi bi-geo-alt-fill me-2"></i><?= e(t('locations')) ?></span>
|
||||
<i class="bi bi-chevron-down small"></i>
|
||||
@ -348,6 +312,42 @@ function render_admin_sidebar(string $active = 'dashboard'): void
|
||||
</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="#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>
|
||||
|
||||
@ -358,4 +358,4 @@ function render_admin_sidebar(string $active = 'dashboard'): void
|
||||
</div>
|
||||
</aside>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user