From f4ec13a5bf84cdc444dc6abafdbaab6617a2a826 Mon Sep 17 00:00:00 2001 From: David Moreau Simard <moi@dmsimard.com> Date: Fri, 29 Jan 2021 09:40:14 -0500 Subject: [PATCH] ui: discard search arguments in links to index and playbooks The intent when clicking on these is to return to the full unfiltered index. Change-Id: I1908acb6ab8d7a446b924bbe1d80627bf7901a35 --- ara/ui/templates/base.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ara/ui/templates/base.html b/ara/ui/templates/base.html index 8c2a6790..6d29f3d1 100644 --- a/ara/ui/templates/base.html +++ b/ara/ui/templates/base.html @@ -19,7 +19,11 @@ <div class="pf-c-page"> <header role="banner" class="pf-c-page__header"> <div class="pf-c-page__header-brand"> + {% if static_generation %} <a class="pf-c-page__header-brand-link" href="{% if page != "index" %}../{% endif %}"> + {% else %} + <a class="pf-c-page__header-brand-link" href="{% url 'ui:index' %}"> + {% endif %} <img class="pf-c-brand" src="{% if page != "index" %}../{% endif %}static/images/logo.svg" alt="ARA Records Ansible"> </a> </div> @@ -31,9 +35,9 @@ <ul class="pf-c-nav__horizontal-list"> <li class="pf-c-nav__item"> {% if page == "index" %} - <a href="" class="pf-c-nav__link pf-m-current" aria-current="page">Playbooks</a> + <a href="{% if not static_generation %}{% url 'ui:index' %}{% endif %}" class="pf-c-nav__link pf-m-current" aria-current="page">Playbooks</a> {% else %} - <a href="../" class="pf-c-nav__link">Playbooks</a> + <a href="{% if not static_generation %}{% url 'ui:index' %}{% else %}../{% endif %}" class="pf-c-nav__link">Playbooks</a> {% endif %} </li> {% include "partials/api_link.html" %}