From e1f6e2112cde3153060fb1b3256cefb00776ede1 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 12 Nov 2024 09:11:12 -0700 Subject: [PATCH] Add widescreen to no-org, and added portfolio specific page rule --- src/registrar/context_processors.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 7ae07e0fc..015772b9f 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -97,5 +97,18 @@ def portfolio_permissions(request): def is_widescreen_mode(request): - widescreen_paths = ["/domains/", "/requests/", "/members/", "/request/"] - return {"is_widescreen_mode": any(path in request.path for path in widescreen_paths) or request.path == "/"} + widescreen_paths = [] + portfolio_widescreen_paths = [ + "/domains/", + "/requests/", + "/request/", + "/no-organization-requests/", + "/no-organization-domains/", + "/domain-request/", + ] + is_widescreen = any(path in request.path for path in widescreen_paths) or request.path == "/" + is_portfolio_widescreen = bool( + request.user.is_org_user(request) and + any(path in request.path for path in portfolio_widescreen_paths) + ) + return {"is_widescreen_mode": is_widescreen or is_portfolio_widescreen}