From 91f79f694e3de03fc37f43417e52ba4c198322fa Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Tue, 20 Aug 2024 12:19:09 -0700 Subject: [PATCH 1/2] update webmanifest url to fix broken link --- app/assets/error_pages/5xx.html | 2 +- app/templates/new/components/head.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/error_pages/5xx.html b/app/assets/error_pages/5xx.html index d9d58530fc..b84e0f7292 100644 --- a/app/assets/error_pages/5xx.html +++ b/app/assets/error_pages/5xx.html @@ -17,7 +17,7 @@ href="/static/images/apple-touch-icon.png?a0f7e1b728a42016b247dc54ee40d055"> - + diff --git a/app/templates/new/components/head.html b/app/templates/new/components/head.html index 3e99f73f59..44c476b274 100644 --- a/app/templates/new/components/head.html +++ b/app/templates/new/components/head.html @@ -16,7 +16,7 @@ - + From 10b65efe1fc145f2ddb11b8ae99777ad148a63a9 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Tue, 20 Aug 2024 13:17:01 -0700 Subject: [PATCH 2/2] removed new folder and moved components to components folder --- app/templates/base.html | 10 +- .../{new => }/components/flash_messages.html | 0 .../{new => }/components/footer.html | 0 app/templates/{new => }/components/head.html | 2 +- .../{new => }/components/header.html | 0 .../{new => }/components/main_nav.html | 0 .../{new => }/components/org_nav.html | 0 .../components/org_nav_breadcrumb.html | 0 .../{new => }/components/service_nav.html | 0 .../{new => }/components/settings_nav.html | 0 .../{new => }/components/usa_banner.html | 0 app/templates/old/admin_template.html | 302 ------------------ app/templates/old/content_template.html | 28 -- app/templates/old/main_nav.html | 32 -- app/templates/old/main_template.html | 70 ---- app/templates/old/org_nav.html | 12 - app/templates/old/org_template.html | 35 -- app/templates/old/service_navigation.html | 20 -- app/templates/old/settings_nav.html | 17 - app/templates/old/settings_template.html | 35 -- app/templates/old/withnav_template.html | 36 --- app/templates/old/withoutnav_template.html | 17 - app/templates/{new => }/templates_glossary.md | 0 app/templates/views/manage-users.html | 2 +- .../views/platform-admin/_base_template.html | 2 +- app/templates/views/service-settings.html | 2 +- app/templates/views/user-profile.html | 2 +- app/templates/withnav_template.html | 25 +- 28 files changed, 15 insertions(+), 634 deletions(-) rename app/templates/{new => }/components/flash_messages.html (100%) rename app/templates/{new => }/components/footer.html (100%) rename app/templates/{new => }/components/head.html (97%) rename app/templates/{new => }/components/header.html (100%) rename app/templates/{new => }/components/main_nav.html (100%) rename app/templates/{new => }/components/org_nav.html (100%) rename app/templates/{new => }/components/org_nav_breadcrumb.html (100%) rename app/templates/{new => }/components/service_nav.html (100%) rename app/templates/{new => }/components/settings_nav.html (100%) rename app/templates/{new => }/components/usa_banner.html (100%) delete mode 100644 app/templates/old/admin_template.html delete mode 100644 app/templates/old/content_template.html delete mode 100644 app/templates/old/main_nav.html delete mode 100644 app/templates/old/main_template.html delete mode 100644 app/templates/old/org_nav.html delete mode 100644 app/templates/old/org_template.html delete mode 100644 app/templates/old/service_navigation.html delete mode 100644 app/templates/old/settings_nav.html delete mode 100644 app/templates/old/settings_template.html delete mode 100644 app/templates/old/withnav_template.html delete mode 100644 app/templates/old/withoutnav_template.html rename app/templates/{new => }/templates_glossary.md (100%) diff --git a/app/templates/base.html b/app/templates/base.html index 4a6421afbf..efa6c7408a 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -10,7 +10,7 @@ {% block per_page_title %}{% endblock %} – Notify.gov {% endblock %} - {% include "new/components/head.html" %} + {% include "components/head.html" %} @@ -32,8 +32,8 @@ {% block header %} - {% include 'new/components/usa_banner.html' %} - {% include 'new/components/header.html' %} + {% include 'components/usa_banner.html' %} + {% include 'components/header.html' %} {% endblock %} {% block main %} @@ -47,7 +47,7 @@ {% endblock %} {% block content %} {% block flash_messages %} - {% include 'new/components/flash_messages.html' %} + {% include 'components/flash_messages.html' %} {% endblock %} {% block maincolumn_content %}
@@ -78,7 +78,7 @@ {% set meta_suffix = "Built by the " + long_link + commit_hash %} {% endif %} - {% include "new/components/footer.html" %} + {% include "components/footer.html" %} {% if current_user.is_authenticated %} {% block sessionUserWarning %} diff --git a/app/templates/new/components/flash_messages.html b/app/templates/components/flash_messages.html similarity index 100% rename from app/templates/new/components/flash_messages.html rename to app/templates/components/flash_messages.html diff --git a/app/templates/new/components/footer.html b/app/templates/components/footer.html similarity index 100% rename from app/templates/new/components/footer.html rename to app/templates/components/footer.html diff --git a/app/templates/new/components/head.html b/app/templates/components/head.html similarity index 97% rename from app/templates/new/components/head.html rename to app/templates/components/head.html index 44c476b274..d057cd201e 100644 --- a/app/templates/new/components/head.html +++ b/app/templates/components/head.html @@ -30,7 +30,7 @@ {# google #} - + {# pragma: allowlist secret #} {% if g.hide_from_search_engines %} {% endif %} diff --git a/app/templates/new/components/header.html b/app/templates/components/header.html similarity index 100% rename from app/templates/new/components/header.html rename to app/templates/components/header.html diff --git a/app/templates/new/components/main_nav.html b/app/templates/components/main_nav.html similarity index 100% rename from app/templates/new/components/main_nav.html rename to app/templates/components/main_nav.html diff --git a/app/templates/new/components/org_nav.html b/app/templates/components/org_nav.html similarity index 100% rename from app/templates/new/components/org_nav.html rename to app/templates/components/org_nav.html diff --git a/app/templates/new/components/org_nav_breadcrumb.html b/app/templates/components/org_nav_breadcrumb.html similarity index 100% rename from app/templates/new/components/org_nav_breadcrumb.html rename to app/templates/components/org_nav_breadcrumb.html diff --git a/app/templates/new/components/service_nav.html b/app/templates/components/service_nav.html similarity index 100% rename from app/templates/new/components/service_nav.html rename to app/templates/components/service_nav.html diff --git a/app/templates/new/components/settings_nav.html b/app/templates/components/settings_nav.html similarity index 100% rename from app/templates/new/components/settings_nav.html rename to app/templates/components/settings_nav.html diff --git a/app/templates/new/components/usa_banner.html b/app/templates/components/usa_banner.html similarity index 100% rename from app/templates/new/components/usa_banner.html rename to app/templates/components/usa_banner.html diff --git a/app/templates/old/admin_template.html b/app/templates/old/admin_template.html deleted file mode 100644 index 75e6505cfe..0000000000 --- a/app/templates/old/admin_template.html +++ /dev/null @@ -1,302 +0,0 @@ -{% extends "main_template.html" %} -{% from "components/banner.html" import banner %} - -{% block headIcons %} - - - - -{% endblock %} - -{% block head %} - - {% block extra_stylesheets %} - {% endblock %} - {% if g.hide_from_search_engines %} - - {% endif %} - - {% block meta_format_detection %} - - {% endblock %} - {% block meta %} - - - {% endblock %} - -{% endblock %} - -{% block pageTitle %} - {% block per_page_title %}{% endblock %} – Notify.gov -{% endblock %} - -{% block bodyStart %} - {% block extra_javascripts_before_body %} - - - - {% endblock %} -{% endblock %} - -{% block header %} - {% if current_user.is_authenticated %} - {% if current_user.platform_admin %} - {% set navigation = [ - { - "href": url_for("main.show_accounts_or_dashboard"), - "text": "Current service", - "active": header_navigation.is_selected('accounts-or-dashboard') - }, - { - "href": url_for('main.get_started'), - "text": "Using Notify", - "active": header_navigation.is_selected('using_notify') - }, - { - "href": url_for('main.features'), - "text": "Features", - "active": header_navigation.is_selected('features') - }, - { - "href": url_for('main.platform_admin_splash_page'), - "text": "Platform admin", - "active": header_navigation.is_selected('platform-admin') - }, - { - "href": url_for('main.support'), - "text": "Contact us", - "active": header_navigation.is_selected('support') - } - ] %} - {% if current_service %} - {% set secondaryNavigation = [ - { - "href": url_for('main.service_settings', service_id=current_service.id), - "text": "Settings", - "active": secondary_navigation.is_selected('settings') - }, - { - "href": url_for('main.sign_out'), - "text": "Sign out" - } - ] %} - {% else %} - {% set secondaryNavigation = [ - { - "href": url_for('main.sign_out'), - "text": "Sign out" - } - ] %} - {% endif %} - {% else %} - {% set navigation = [ - { - "href": url_for("main.show_accounts_or_dashboard"), - "text": "Current service", - "active": header_navigation.is_selected('accounts-or-dashboard') - }, - { - "href": url_for('main.get_started'), - "text": "Using Notify", - "active": header_navigation.is_selected('using_notify') - }, - { - "href": url_for('main.features'), - "text": "Features", - "active": header_navigation.is_selected('features') - }, - { - "href": url_for('main.support'), - "text": "Contact us", - "active": header_navigation.is_selected('support') - }, - { - "href": url_for('main.user_profile'), - "text": "User profile", - "active": header_navigation.is_selected('user-profile') - } - ] %} - {% if current_service %} - {% set secondaryNavigation = [ - { - "href": url_for('main.service_settings', service_id=current_service.id), - "text": "Settings", - "active": secondary_navigation.is_selected('settings') - }, - { - "href": url_for('main.sign_out'), - "text": "Sign out" - } - ] %} - {% else %} - {% set secondaryNavigation = [ - { - "href": url_for('main.sign_out'), - "text": "Sign out" - } - ] %} - {% endif %} - {% endif %} - {% else %} - - {# {% set navigation = [ - { - "href": url_for('main.get_started'), - "text": "Using Notify", - "active": header_navigation.is_selected('using_notify') - }, - { - "href": url_for('main.features'), - "text": "Features", - "active": header_navigation.is_selected('features') - }, - { - "href": url_for('main.support'), - "text": "Contact us", - "active": header_navigation.is_selected('support') - }, - { - "href": url_for('main.sign_in'), - "text": "Sign in", - "active": header_navigation.is_selected('sign-in') - } - ] %} #} - {% endif %} - - {{ usaHeader({ - "homepageUrl": url_for('main.show_accounts_or_dashboard'), - "productName": "Notify", - "navigation": navigation, - "navigationClasses": "govuk-header__navigation--end", - "secondaryNavigation": secondaryNavigation, - "assetsPath": asset_path + "images" - }) }} -{% endblock %} - -{% block footer %} - - {% if current_service and current_service.research_mode %} - {% set meta_suffix = 'Built by the Technology Transformation Servicesresearch mode' %} - {% else %} - {% set commit_hash = ", Latest version: " + config['COMMIT_HASH'] %} - {% set long_link = 'Technology Transformation Services' %} - {% set meta_suffix = "Built by the " + long_link + commit_hash %} - {% endif %} - - {{ usaFooter({ - "classes": "js-footer", - "navigation": [ - { - "title": "About Notify", - "columns": 1, - "items": [ - { - "href": url_for("main.features"), - "text": "Features" - }, - { - "href": url_for("main.roadmap"), - "text": "Roadmap" - }, - { - "href": url_for("main.security"), - "text": "Security" - }, - ] - }, - { - "title": "Using Notify", - "columns": 1, - "items": [ - { - "href": url_for("main.get_started"), - "text": "Get started" - }, - { - "href": url_for("main.pricing"), - "text": "Pricing" - }, - { - "href": url_for("main.trial_mode_new"), - "text": "Trial mode" - }, - { - "href": url_for("main.message_status"), - "text": "Delivery status" - }, - { - "href": url_for("main.guidance_index"), - "text": "Guidance" - }, - { - "href": url_for("main.documentation"), - "text": "API documentation" - } - ] - }, - { - "title": "Support", - "columns": 1, - "items": [ - { - "href": url_for('main.support'), - "text": "Contact us" - } - ] - }, - ], - "meta": { - "items": meta_items, - "html": meta_suffix - } - }) }} - {% if current_user.is_authenticated %} - {% block sessionUserWarning %} - -
-
-

- Your session will end soon. - Please choose to extend your session or sign out. Your session will expire in 5 minutes or less. -

-
-

You have been inactive for too long. - Your session will expire in . -

-
- -
-
-
- {% endblock %} - {% endif %} - -{% endblock %} - - -{% block bodyEnd %} - {% block extra_javascripts %} - - {% endblock %} - - - - - - -{% endblock %} diff --git a/app/templates/old/content_template.html b/app/templates/old/content_template.html deleted file mode 100644 index 5f45027b32..0000000000 --- a/app/templates/old/content_template.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "base.html" %} -{% from "components/sub-navigation.html" import sub_navigation %} -{% from "components/page-header.html" import page_header %} - -{% block per_page_title %} - {{ content_page_title }} -{% endblock %} - -{% block maincolumn_content %} - -
- - {% if navigation_links %} -
- {{ sub_navigation(navigation_links) }} -
-
- {% else %} -
- {% endif %} - - {% block content_column_content %} - {% endblock %} - -
-
- -{% endblock %} diff --git a/app/templates/old/main_nav.html b/app/templates/old/main_nav.html deleted file mode 100644 index 4357dc6548..0000000000 --- a/app/templates/old/main_nav.html +++ /dev/null @@ -1,32 +0,0 @@ -{# This template is an old version #} -{% if help %} - {% include 'partials/tour.html' %} -{% else %} - -{% endif %} diff --git a/app/templates/old/main_template.html b/app/templates/old/main_template.html deleted file mode 100644 index 20ab3eef94..0000000000 --- a/app/templates/old/main_template.html +++ /dev/null @@ -1,70 +0,0 @@ -{% from "./components/components/skip-link/macro.njk" import usaSkipLink -%} -{% from "./components/components/header/macro.njk" import usaHeader -%} -{% from "./components/components/footer/macro.njk" import usaFooter -%} -{# specify absolute url for the static assets folder e.g. http://wwww.domain.com/assets #} -{%- set assetUrl = assetUrl | default(assetPath) -%} - - - - - {% block pageTitle %}Notify.gov{% endblock %} - - - - {% if config['NR_MONITOR_ON'] %} - {% include "partials/newrelic.html" -%} - {% endif %} - - {# Ensure that older IE versions always render with the correct rendering engine #} - - - {% block headIcons %} - - - - - - - - - - {% endblock %} - - {% block head %}{% endblock %} - {# The default og:image is added below head so that scrapers see any custom metatags first, and this is just a fallback #} - {% block meta %} - - - {% endblock %} - - - - {% block bodyStart %}{% endblock %} - - {% block skipLink %} - {{ usaSkipLink({ - "href": '#main-content', - "text": 'Skip to main content' - }) }} - {% endblock %} - - {% block header %} - {{ usaHeader({}) }} - {% endblock %} - - {% block main %} -
- {% block beforeContent %}{% endblock %} -
- {% block content %}{% endblock %} -
-
- {% endblock %} - - {% block footer %} - {{ usaFooter({}) }} - {% endblock %} - - {% block bodyEnd %}{% endblock %} - - diff --git a/app/templates/old/org_nav.html b/app/templates/old/org_nav.html deleted file mode 100644 index 0511eb9ff0..0000000000 --- a/app/templates/old/org_nav.html +++ /dev/null @@ -1,12 +0,0 @@ -{# This template is an old version #} - diff --git a/app/templates/old/org_template.html b/app/templates/old/org_template.html deleted file mode 100644 index 5e04003fd4..0000000000 --- a/app/templates/old/org_template.html +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "base.html" %} - -{% block per_page_title %} - {% block org_page_title %}{% endblock %} – {{ current_org.name }} -{% endblock %} - -{% block main %} -
- -
-
- {% include "org_nav.html" %} -
-
- {% block beforeContent %} - {% block backLink %}{% endblock %} - {% endblock %} -
- {% block content %} - {% include 'flash_messages.html' %} - {% block maincolumn_content %}{% endblock %} - {% endblock %} -
-
-
-
-{% endblock %} diff --git a/app/templates/old/service_navigation.html b/app/templates/old/service_navigation.html deleted file mode 100644 index 69e5b2ed31..0000000000 --- a/app/templates/old/service_navigation.html +++ /dev/null @@ -1,20 +0,0 @@ -{# This template is an old version #} -{% macro navigation_service_name(service) %} -
- {{ service.name }} - {% if not service.active %} - Suspended - {% endif %} -
-{% endmacro %} - - diff --git a/app/templates/old/settings_nav.html b/app/templates/old/settings_nav.html deleted file mode 100644 index 27c1020547..0000000000 --- a/app/templates/old/settings_nav.html +++ /dev/null @@ -1,17 +0,0 @@ -{# This template is an old version #} -{% if help %} -{% include 'partials/tour.html' %} -{% else %} - -{% endif %} diff --git a/app/templates/old/settings_template.html b/app/templates/old/settings_template.html deleted file mode 100644 index 08fa09f007..0000000000 --- a/app/templates/old/settings_template.html +++ /dev/null @@ -1,35 +0,0 @@ -{# This template is an old version #} -{% extends "admin_template.html" %} - -{% block per_page_title %} - {% block service_page_title %}{% endblock %} – {{ current_service.name }} -{% endblock %} - -{% block main %} -
-
- {% if help %} -
- {% else %} -
- {% endif %} - {% include "settings_nav.html" %} -
- {% if help %} -
- {% else %} -
- {% endif %} - {% block beforeContent %} - {% block backLink %}{% endblock %} - {% endblock %} -
- {% block content %} - {% include 'flash_messages.html' %} - {% block maincolumn_content %}{% endblock %} - {% endblock %} -
-
-
-
-{% endblock %} diff --git a/app/templates/old/withnav_template.html b/app/templates/old/withnav_template.html deleted file mode 100644 index b1f83c989f..0000000000 --- a/app/templates/old/withnav_template.html +++ /dev/null @@ -1,36 +0,0 @@ -{# This template is an old version #} -{% extends "admin_template.html" %} - -{% block per_page_title %} - {% block service_page_title %}{% endblock %} – {{ current_service.name }} -{% endblock %} - -{% block main %} -
- {% include "service_navigation.html" %} -
- {% if help %} -
- {% else %} -
- {% endif %} - {% include "main_nav.html" %} -
- {% if help %} -
- {% else %} -
- {% endif %} - {% block beforeContent %} - {% block backLink %}{% endblock %} - {% endblock %} -
- {% block content %} - {% include 'flash_messages.html' %} - {% block maincolumn_content %}{% endblock %} - {% endblock %} -
-
-
-
-{% endblock %} diff --git a/app/templates/old/withoutnav_template.html b/app/templates/old/withoutnav_template.html deleted file mode 100644 index b6b77088ee..0000000000 --- a/app/templates/old/withoutnav_template.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "base.html" %} - -{% set mainClasses = "margin-top-5 padding-bottom-5" %} - -{% block beforeContent %} - {% if current_service and current_service.active and current_user.is_authenticated and current_user.belongs_to_service(current_service.id) %} - - {% endif %} - {% block backLink %}{% endblock %} -{% endblock %} - -{% block content %} - {% include 'flash_messages.html' %} - {% block maincolumn_content %}{% endblock %} -{% endblock %} diff --git a/app/templates/new/templates_glossary.md b/app/templates/templates_glossary.md similarity index 100% rename from app/templates/new/templates_glossary.md rename to app/templates/templates_glossary.md diff --git a/app/templates/views/manage-users.html b/app/templates/views/manage-users.html index edf78c4e0b..38c87c3bff 100644 --- a/app/templates/views/manage-users.html +++ b/app/templates/views/manage-users.html @@ -10,7 +10,7 @@ {% block serviceNavigation %}{% endblock %} {% block sideNavigation %} - {% include "/new/components/settings_nav.html" %} + {% include "components/settings_nav.html" %} {% endblock %} {% block maincolumn_content %} diff --git a/app/templates/views/platform-admin/_base_template.html b/app/templates/views/platform-admin/_base_template.html index d4c35eca60..ac75e14f75 100644 --- a/app/templates/views/platform-admin/_base_template.html +++ b/app/templates/views/platform-admin/_base_template.html @@ -45,7 +45,7 @@ {% block backLink %}{% endblock %}
{% block content %} - {% include 'new/components/flash_messages.html' %} + {% include 'components/flash_messages.html' %} {% block platform_admin_content %}{% endblock %} {% endblock %}
diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index 5609986856..b905450301 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -9,7 +9,7 @@ {% block serviceNavigation %}{% endblock %} {% block sideNavigation %} - {% include "/new/components/settings_nav.html" %} + {% include "components/settings_nav.html" %} {% endblock %} {% block maincolumn_content %} diff --git a/app/templates/views/user-profile.html b/app/templates/views/user-profile.html index a03eeab508..6f243d7a82 100644 --- a/app/templates/views/user-profile.html +++ b/app/templates/views/user-profile.html @@ -9,7 +9,7 @@ {% block serviceNavigation %}{% endblock %} {% block sideNavigation %} - {% include "/new/components/settings_nav.html" %} + {% include "components/settings_nav.html" %} {% endblock %} {% block maincolumn_content %} diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html index 93b7d973e8..eb6a422444 100644 --- a/app/templates/withnav_template.html +++ b/app/templates/withnav_template.html @@ -13,35 +13,20 @@ {% block serviceNavigation %} {% if current_org.name %} {% else %} - {% include "new/components/service_nav.html" %} + {% include "components/service_nav.html" %} {% endif %} {% endblock %} - {# - The withnav_template can serve as a replacement for both settings_template and org_template.html. - - The file service_navigation.html is included only in withnav_template. It's not used in settings_template. That is one out of the two differences between settings template and withnav template. As a result, when other templates extend settings_template, they include the serviceNavigation block but keep it empty. The settings_template.html is specifically used for these pages in the app: manage-users.html, service-settings.html, and user-profile.html. - - In addition, serviceNavigation should be empty on templates that previously extended org_template. For templates that previously extended org_template.html, there's an addition of the orgNavBreadcrumb block. - {% block orgNavBreadcrumb %} - {% include "/new/components/org_nav_breadcrumb.html" %} - {% endblock %} - #} {% if current_org.name %} - {% block orgNavBreadcrumb %}{% include "/new/components/org_nav_breadcrumb.html" %}{% endblock %} + {% block orgNavBreadcrumb %}{% include "components/org_nav_breadcrumb.html" %}{% endblock %} {% endif %}
{% block sideNavigation %} {% if current_org.name %} - {% include "/new/components/org_nav.html" %} + {% include "components/org_nav.html" %} {% else %} - {% include "/new/components/main_nav.html" %} + {% include "components/main_nav.html" %} {% endif %} - {# - Include settings_nav.html for child templates that previously extended settings_template. - - Include "org_nav.html" for child templates that previously extended org_template html - #} {% endblock %}
@@ -50,7 +35,7 @@ {% endblock %}
{% block content %} - {% include 'new/components/flash_messages.html' %} + {% include 'components/flash_messages.html' %} {% block maincolumn_content %}{% endblock %} {% endblock %}