From ef2c5b9bea9e1835562fe3588a039b9d92b76e9a Mon Sep 17 00:00:00 2001 From: A R R R Associates Date: Mon, 6 Jul 2026 13:40:58 +0530 Subject: [PATCH] Restore floating top menu and hide sidebar for non-system-admin users --- app/ui/templates/base/layout.html | 32 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/app/ui/templates/base/layout.html b/app/ui/templates/base/layout.html index f1baa6b..87163d3 100644 --- a/app/ui/templates/base/layout.html +++ b/app/ui/templates/base/layout.html @@ -100,11 +100,16 @@ {% set current_branch_name = firm_branding.branch_name if firm_branding else "" %} {% set domain_context = get_domain_context(request) %} {% set is_system_admin_user = full_auth and ("System Admin" in ui_roles) %} - {% set show_legacy_sidebar = full_auth and is_system_admin_user %} {% 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) %} + {# Navigation UI Cleanup V2.1 + Sidebar is retained only for System Admin users. + All other authenticated users use the floating top workspace bar on every page. + Existing routes and old sidebar code are kept intact. #} + {% set use_clean_top_nav = full_auth and not is_system_admin_user %} -
- {% if show_legacy_sidebar %} + +
+ {% if not use_clean_top_nav %} + {% endif %}
+ {% if use_clean_top_nav %} + {% include "ui/templates/components/top_workspace_bar.html" %} + {% else %}
-
- {% if not show_legacy_sidebar and full_auth %} - {% if firm_branding.logo_url %} - {{ current_firm_name }} logo - {% else %} -
{{ (current_firm_name[:2] if current_firm_name else 'AF')|upper }}
- {% endif %} - {% endif %} -
-

{{ title or "Module Workspace" }}

- {% if not show_legacy_sidebar and full_auth %} -
{{ current_firm_name }}{% if current_branch_name and current_branch_name != "-" %} • {{ current_branch_name }}{% endif %}{% if active_financial_year %} • FY {{ active_financial_year }}{% endif %}
- {% endif %} -
+
+

{{ title or "Module Workspace" }}

{% if full_auth %} @@ -497,6 +494,7 @@ {% endif %}
+ {% endif %}
{% if flash %}