Add floating top navigation for workspace dashboards

This commit is contained in:
A R R R Associates
2026-07-06 13:07:49 +05:30
parent 1b07580c74
commit 9efdb968d3
3 changed files with 113 additions and 6 deletions
+24 -1
View File
@@ -101,8 +101,25 @@
{% set domain_context = get_domain_context(request) %}
{% set is_system_admin_user = full_auth and ("System Admin" in ui_roles) %}
{% set can_manage_local_storage_agent = full_auth and can_view_documents(current_user, ui_perms, ui_roles) and can_upload_documents(current_user, ui_perms, ui_roles) and (ui_roles|select("in", ["Firm Admin", "Partner", "Branch Manager"])|list|length > 0) %}
{% set clean_workspace_paths = [
'/system-admin/dashboard',
'/firm-admin/dashboard',
'/partner/dashboard',
'/manager/dashboard',
'/employee/dashboard',
'/client/dashboard',
'/consultant/dashboard',
'/workspaces'
] %}
{% set clean_nav_state = namespace(enabled=False) %}
{% for clean_path in clean_workspace_paths %}
{% if current_path.startswith(clean_path) %}{% set clean_nav_state.enabled = True %}{% endif %}
{% endfor %}
{% set use_clean_top_nav = full_auth and clean_nav_state.enabled %}
<div class="min-h-screen lg:grid lg:grid-cols-[260px_minmax(0,1fr)]">
<div class="min-h-screen {% if not use_clean_top_nav %}lg:grid lg:grid-cols-[260px_minmax(0,1fr)]{% endif %}">
{% if not use_clean_top_nav %}
<aside class="border-b border-slate-200 bg-slate-900 text-slate-100 lg:min-h-screen lg:border-b-0 lg:border-r lg:border-slate-800">
<div class="flex items-center gap-3 px-5 py-5">
{% if firm_branding.logo_url %}<img src="{{ firm_branding.logo_url }}" alt="{{ current_firm_name }} logo" class="h-11 w-11 rounded-2xl bg-white object-contain p-1 shadow-soft" />{% else %}<div class="flex h-11 w-11 items-center justify-center rounded-2xl bg-brand-500 font-bold text-white shadow-soft">{{ (current_firm_name[:2] if current_firm_name else 'AF')|upper }}</div>{% endif %}
@@ -386,7 +403,12 @@
{% endif %}
</aside>
{% endif %}
<div class="min-h-screen">
{% if use_clean_top_nav %}
{% include "ui/templates/components/top_workspace_bar.html" %}
{% else %}
<header class="border-b border-slate-200 bg-white/90 backdrop-blur">
<div class="mx-auto max-w-7xl px-4 py-4 sm:px-6 lg:px-8">
<div class="flex items-start justify-between gap-4">
@@ -482,6 +504,7 @@
{% endif %}
</div>
</header>
{% endif %}
<main class="mx-auto max-w-7xl px-4 py-6 sm:px-6 lg:px-8">
{% if flash %}