From 9a13eb2a9204d99dce449e279fe411c66020c83a Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Wed, 9 Oct 2019 15:05:25 +0200 Subject: [PATCH 1/2] Fix inactive version list not showing when no resuts returned Previously it would hide the UI when users search for a term with no matching versions --- readthedocs/templates/projects/project_version_list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/templates/projects/project_version_list.html b/readthedocs/templates/projects/project_version_list.html index 30be91e3398..b5fb925e4a4 100644 --- a/readthedocs/templates/projects/project_version_list.html +++ b/readthedocs/templates/projects/project_version_list.html @@ -76,7 +76,7 @@

{% trans "Active Versions" %}

- {% if inactive_versions %} + {% if inactive_versions or request.GET.version_filter %}

{% trans "Activate a version" %}

{% trans "Active versions are built whenever new code is pushed to that branch or tag." %}

From 5fb10705a9b89aace6de4304131f1be1585ebada Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Wed, 9 Oct 2019 15:12:46 +0200 Subject: [PATCH 2/2] Add empty block for no results found --- readthedocs/templates/projects/project_version_list.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readthedocs/templates/projects/project_version_list.html b/readthedocs/templates/projects/project_version_list.html index b5fb925e4a4..5f475e614e6 100644 --- a/readthedocs/templates/projects/project_version_list.html +++ b/readthedocs/templates/projects/project_version_list.html @@ -126,6 +126,8 @@

{% trans "Activate a version" %}

{% endblock inactive-versions %} + {% empty %} +
  • {% trans "No versions found" %}
  • {% endfor %}