From ed3d5bd39247e5f65eeef32fe4b29c5d5b7abd43 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:35:00 -0700 Subject: [PATCH 1/5] readd context fix --- src/registrar/context_processors.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 7ae07e0fc..32022aa34 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -96,6 +96,20 @@ def portfolio_permissions(request): return portfolio_context + 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} From 9be154261b1d6eacdfae9bc76a8ac27320d87d32 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:57:21 -0700 Subject: [PATCH 2/5] Add padding top 6 --- src/registrar/assets/sass/_theme/_base.scss | 4 ++-- src/registrar/templates/domain_request_done.html | 2 +- .../templates/domain_request_withdraw_confirmation.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/registrar/assets/sass/_theme/_base.scss b/src/registrar/assets/sass/_theme/_base.scss index 1b8f34290..442c5c862 100644 --- a/src/registrar/assets/sass/_theme/_base.scss +++ b/src/registrar/assets/sass/_theme/_base.scss @@ -29,8 +29,8 @@ body { padding-bottom: units(6) * 2 ; //Workaround because USWDS units jump from 10 to 15 } -#wrapper.wrapper--padding-top-4 { - padding-top: units(4); +#wrapper.wrapper--padding-top-6 { + padding-top: units(6); } #wrapper.dashboard { diff --git a/src/registrar/templates/domain_request_done.html b/src/registrar/templates/domain_request_done.html index 50cdc1634..0d38309d8 100644 --- a/src/registrar/templates/domain_request_done.html +++ b/src/registrar/templates/domain_request_done.html @@ -7,7 +7,7 @@ {% comment %} Same as the old wrapper implementation but with padding-top-4 {% endcomment %} {% block wrapperdiv %} -
+
{% endblock wrapperdiv %} {% block content %} diff --git a/src/registrar/templates/domain_request_withdraw_confirmation.html b/src/registrar/templates/domain_request_withdraw_confirmation.html index 03cb06b51..e1a5f0c2a 100644 --- a/src/registrar/templates/domain_request_withdraw_confirmation.html +++ b/src/registrar/templates/domain_request_withdraw_confirmation.html @@ -4,7 +4,7 @@ {% load static url_helpers %} {% block wrapperdiv %} -
+
{% endblock wrapperdiv %} {% block content %} From 7089977c16f2a5ede439e09cd6f6f9b2695a9cb1 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:19:44 -0700 Subject: [PATCH 3/5] add portfolio name --- src/registrar/templates/domain_request_requesting_entity.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/domain_request_requesting_entity.html b/src/registrar/templates/domain_request_requesting_entity.html index d09e8ab89..3ce792531 100644 --- a/src/registrar/templates/domain_request_requesting_entity.html +++ b/src/registrar/templates/domain_request_requesting_entity.html @@ -2,7 +2,7 @@ {% load field_helpers url_helpers %} {% block form_instructions %} -

To help with our review, we need to understand whether the domain you're requesting will be used by the Department of Energy or by one of its suborganizations.

+

To help with our review, we need to understand whether the domain you're requesting will be used by {{ portfolio }} or by one of its suborganizations.

We define a suborganization as any entity (agency, bureau, office) that falls under the overarching organization.

{% endblock %} From 425e7e995b9198beddc6e58009019ea34bccfee3 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:20:55 -0700 Subject: [PATCH 4/5] fix test --- src/registrar/context_processors.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 32022aa34..10a4fcb89 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -109,6 +109,7 @@ def is_widescreen_mode(request): ] is_widescreen = any(path in request.path for path in widescreen_paths) or request.path == "/" is_portfolio_widescreen = bool( + 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) ) From 23702ab0bb0aef9ad9d1ec61366a616772c28f2f Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 12 Nov 2024 15:29:42 -0700 Subject: [PATCH 5/5] fix test and lint --- src/registrar/context_processors.py | 7 +++---- src/registrar/tests/test_views_portfolio.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index 10a4fcb89..ae35a8865 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -96,7 +96,6 @@ def portfolio_permissions(request): return portfolio_context - def is_widescreen_mode(request): widescreen_paths = [] portfolio_widescreen_paths = [ @@ -109,8 +108,8 @@ def is_widescreen_mode(request): ] is_widescreen = any(path in request.path for path in widescreen_paths) or request.path == "/" is_portfolio_widescreen = bool( - 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) + 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) ) return {"is_widescreen_mode": is_widescreen or is_portfolio_widescreen} diff --git a/src/registrar/tests/test_views_portfolio.py b/src/registrar/tests/test_views_portfolio.py index 402d23b70..775cb04e6 100644 --- a/src/registrar/tests/test_views_portfolio.py +++ b/src/registrar/tests/test_views_portfolio.py @@ -1658,7 +1658,7 @@ class TestRequestingEntity(WebTest): self.assertContains(response, "Add suborganization information") # We expect to see the portfolio name in two places: # the header, and as one of the radio button options. - self.assertContains(response, self.portfolio.organization_name, count=2) + self.assertContains(response, self.portfolio.organization_name, count=3) # We expect the dropdown list to contain the suborganizations that currently exist on this portfolio self.assertContains(response, self.suborganization.name, count=1)