From 85f73db416ff3ca2179bf2f883b98b26ffc835f9 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Thu, 11 Apr 2024 12:18:25 -0700 Subject: [PATCH] revised withnav_templates to include org_template --- .../new/components/org_nav_breadcrumb.html | 11 ++++++ .../new/layouts/withnav_template.html | 37 +++++++++++-------- 2 files changed, 33 insertions(+), 15 deletions(-) create mode 100644 app/templates/new/components/org_nav_breadcrumb.html diff --git a/app/templates/new/components/org_nav_breadcrumb.html b/app/templates/new/components/org_nav_breadcrumb.html new file mode 100644 index 000000000..320f28fac --- /dev/null +++ b/app/templates/new/components/org_nav_breadcrumb.html @@ -0,0 +1,11 @@ + diff --git a/app/templates/new/layouts/withnav_template.html b/app/templates/new/layouts/withnav_template.html index 412a004d0..c9aed27dc 100644 --- a/app/templates/new/layouts/withnav_template.html +++ b/app/templates/new/layouts/withnav_template.html @@ -1,7 +1,8 @@ -{% extends "base.html" %} +{% extends "/new/base.html" %} {% block per_page_title %} - {% block service_page_title %}{% endblock %} – {{ current_service.name }} + {% block service_page_title %}{% endblock %}{% if current_service.name %} – {{ current_service.name }}{% endif %} + {% block org_page_title %}{% endblock %}{% if current_org.name %} – {{ current_org.name }}{% endif %} {% endblock %} {% block main %} @@ -9,23 +10,29 @@ {% block serviceNavigation %} {% include "service_navigation.html" %} {% 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, 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 %} + #} + {% block orgNavBreadcrumb %}{% endblock %}
- {% if help %} -
- {% else %} -
- {% endif %} +
{% block sideNavigation %} {% include "main_nav.html" %} - + {# + 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 %} -
- {% if help %} -
- {% else %} -
- {% endif %} +
+
{% block beforeContent %} {% block backLink %}{% endblock %} {% endblock %}