checkbox column

This commit is contained in:
Rachid Mrad 2024-12-05 18:25:17 -05:00
parent 4b547b40b3
commit cd41b233df
No known key found for this signature in database
18 changed files with 211 additions and 24 deletions

View file

@ -99,7 +99,7 @@ def portfolio_permissions(request):
def is_widescreen_mode(request):
widescreen_paths = []
widescreen_paths = [] # If this list is meant to include specific paths, populate it.
portfolio_widescreen_paths = [
"/domains/",
"/requests/",
@ -108,10 +108,20 @@ def is_widescreen_mode(request):
"/no-organization-domains/",
"/domain-request/",
]
exclude_paths = [
"/domains/edit",
]
# Check if the current path matches a widescreen path or the root path.
is_widescreen = any(path in request.path for path in widescreen_paths) or request.path == "/"
is_portfolio_widescreen = bool(
# Check if the user is an organization user and the path matches portfolio paths.
is_portfolio_widescreen = (
hasattr(request.user, "is_org_user")
and request.user.is_org_user(request)
and any(path in request.path for path in portfolio_widescreen_paths)
and not any(exclude_path in request.path for exclude_path in exclude_paths)
)
# Return a dictionary with the widescreen mode status.
return {"is_widescreen_mode": is_widescreen or is_portfolio_widescreen}