July 4 - Update responsive menu
This commit is contained in:
+55
-32
@@ -75,7 +75,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
<nav class="navbar navbar-expand-xl navbar-dark bg-primary">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="{{ url_for('dashboard.index') }}">
|
<a class="navbar-brand" href="{{ url_for('dashboard.index') }}">
|
||||||
{% if tenant_branding and tenant_branding.logo_url %}
|
{% if tenant_branding and tenant_branding.logo_url %}
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
{{ tenant_branding.display_name if tenant_branding else 'Janitorial QC' }}
|
{{ tenant_branding.display_name if tenant_branding else 'Janitorial QC' }}
|
||||||
</a>
|
</a>
|
||||||
<!-- ── Bell + toggler always visible on mobile/tablet ── -->
|
<!-- ── Bell + toggler always visible on mobile/tablet ── -->
|
||||||
<div class="d-flex align-items-center gap-2 ms-auto me-2 d-lg-none">
|
<div class="d-flex align-items-center gap-2 ms-auto me-2 d-xl-none">
|
||||||
<!-- Notification bell (always visible) -->
|
<!-- Notification bell (always visible) -->
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a class="nav-link position-relative notif-bell-wrapper text-white"
|
<a class="nav-link position-relative notif-bell-wrapper text-white"
|
||||||
@@ -177,11 +177,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.role == 'admin' %}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link {{ 'active' if request.endpoint and request.endpoint.startswith('auth.') and 'user' in request.endpoint }}" href="{{ url_for('auth.list_users') }}">Users</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if current_user.role in ['admin', 'director'] %}
|
{% if current_user.role in ['admin', 'director'] %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link {{ 'active' if request.endpoint and request.endpoint.startswith('customers.') }}" href="{{ url_for('customers.index') }}">Customers</a>
|
<a class="nav-link {{ 'active' if request.endpoint and request.endpoint.startswith('customers.') }}" href="{{ url_for('customers.index') }}">Customers</a>
|
||||||
@@ -219,38 +214,66 @@
|
|||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.role == 'admin' %}
|
{% if current_user.role == 'admin' %}
|
||||||
<li class="nav-item">
|
{% set admin_active = request.endpoint and (
|
||||||
<a class="nav-link {{ 'active' if request.endpoint and request.endpoint.startswith('audit.') }}" href="{{ url_for('audit.index') }}">Audit Trail</a>
|
(request.endpoint.startswith('auth.') and 'user' in request.endpoint)
|
||||||
</li>
|
or request.endpoint.startswith('audit.')
|
||||||
<li class="nav-item">
|
or request.endpoint == 'auth.notification_matrix'
|
||||||
<a class="nav-link {{ 'active' if request.endpoint == 'auth.notification_matrix' }}" href="{{ url_for('auth.notification_matrix') }}">
|
or request.endpoint.startswith('broadcast.')
|
||||||
<i class="bi bi-grid-3x3-gap-fill"></i> Notif. Matrix
|
or request.endpoint.startswith('devices.')
|
||||||
</a>
|
or request.endpoint.startswith('tenant_settings.')
|
||||||
</li>
|
) %}
|
||||||
<li class="nav-item">
|
<li class="nav-item dropdown">
|
||||||
<a class="nav-link {{ 'active' if request.endpoint and request.endpoint.startswith('broadcast.') }}"
|
<a class="nav-link dropdown-toggle {{ 'active' if admin_active }}"
|
||||||
href="{{ url_for('broadcast.index') }}">
|
href="#" id="adminMenu" role="button"
|
||||||
<i class="bi bi-megaphone-fill"></i> Broadcast
|
data-bs-toggle="dropdown" aria-expanded="false">
|
||||||
</a>
|
<i class="bi bi-sliders me-1"></i>Admin
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link {{ 'active' if request.endpoint and request.endpoint.startswith('devices.') }}"
|
|
||||||
href="{{ url_for('devices.index') }}">
|
|
||||||
<i class="bi bi-tablet"></i> Devices
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a class="dropdown-item {{ 'active' if request.endpoint and request.endpoint.startswith('tenant_settings.') else '' }}"
|
|
||||||
href="{{ url_for('tenant_settings.branding') }}">
|
|
||||||
<i class="bi bi-gear me-1"></i> Workspace Settings
|
|
||||||
</a>
|
</a>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="adminMenu">
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item {{ 'active' if request.endpoint and request.endpoint.startswith('auth.') and 'user' in request.endpoint }}"
|
||||||
|
href="{{ url_for('auth.list_users') }}">
|
||||||
|
<i class="bi bi-people me-2"></i>Users
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item {{ 'active' if request.endpoint and request.endpoint.startswith('audit.') }}"
|
||||||
|
href="{{ url_for('audit.index') }}">
|
||||||
|
<i class="bi bi-clipboard-data me-2"></i>Audit Trail
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item {{ 'active' if request.endpoint == 'auth.notification_matrix' }}"
|
||||||
|
href="{{ url_for('auth.notification_matrix') }}">
|
||||||
|
<i class="bi bi-grid-3x3-gap-fill me-2"></i>Notification Matrix
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item {{ 'active' if request.endpoint and request.endpoint.startswith('broadcast.') }}"
|
||||||
|
href="{{ url_for('broadcast.index') }}">
|
||||||
|
<i class="bi bi-megaphone-fill me-2"></i>Broadcast
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item {{ 'active' if request.endpoint and request.endpoint.startswith('devices.') }}"
|
||||||
|
href="{{ url_for('devices.index') }}">
|
||||||
|
<i class="bi bi-tablet me-2"></i>Devices
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li><hr class="dropdown-divider"></li>
|
||||||
|
<li>
|
||||||
|
<a class="dropdown-item {{ 'active' if request.endpoint and request.endpoint.startswith('tenant_settings.') }}"
|
||||||
|
href="{{ url_for('tenant_settings.branding') }}">
|
||||||
|
<i class="bi bi-gear me-2"></i>Workspace Settings
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="navbar-nav align-items-center">
|
<ul class="navbar-nav align-items-center">
|
||||||
|
|
||||||
<!-- ── Notification Bell (desktop lg+ only) ── -->
|
<!-- ── Notification Bell (desktop lg+ only) ── -->
|
||||||
<li class="nav-item dropdown me-2 d-none d-lg-block">
|
<li class="nav-item dropdown me-2 d-none d-xl-block">
|
||||||
<a class="nav-link position-relative notif-bell-wrapper"
|
<a class="nav-link position-relative notif-bell-wrapper"
|
||||||
href="#"
|
href="#"
|
||||||
id="notifDropdown"
|
id="notifDropdown"
|
||||||
|
|||||||
Reference in New Issue
Block a user