Skip to content

Commit

Permalink
Add widescreen to no-org, and added portfolio specific page rule
Browse files Browse the repository at this point in the history
  • Loading branch information
zandercymatics committed Nov 12, 2024
1 parent 15d3a7f commit e1f6e21
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/registrar/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit e1f6e21

Please sign in to comment.