Skip to content

Commit 22e218f

Browse files
committed
sidebar - sometimes don't show links
Don't show download links on list or results page because user probably expects a filtered download and instead they get a download of everything. Don't show about button on about page ... because you are already there.
1 parent 2a24442 commit 22e218f

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

prefix_finder/frontend/templates/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% load i18n %}
33
{% block main %}
44
<main class="main-wrapper" role="main">
5-
{% include "sidebar.html" %}
5+
{% include "sidebar.html" with sidebar_show_about_link=False %}
66
<div class="main-content single-content about-page">
77
<div>
88
<h1 class="about-page__header">{% trans "About" %}</h1>

prefix_finder/frontend/templates/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
{% block main %}
77
<main class="main-wrapper" role="main">
8-
{% include "sidebar.html" %}
8+
{% include "sidebar.html" with sidebar_show_download_links=False %}
99

1010
<div class="main-content single-content">
1111
<header class="single-content__header">

prefix_finder/frontend/templates/results.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{% block main %}
55
<main class="main-wrapper" role="main">
6-
{% include "sidebar.html" %}
6+
{% include "sidebar.html" with sidebar_show_download_links=False %}
77

88
<div class="main-content">
99
<div class="list-group list-group--suggested">

prefix_finder/frontend/templates/sidebar.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,15 @@
8484
</div>
8585

8686
<footer class="sidebar__footer">
87+
{% if sidebar_show_about_link is None or sidebar_show_about_link is True %}
8788
<a href="/about" class="button button--block">About</a>
89+
{% endif %}
8890

91+
{% if sidebar_show_download_links is None or sidebar_show_download_links is True %}
8992
<h5>Download</h5>
9093
<a href="{% url 'json_download' %}" class="button button--third">JSON</a>
9194
<a href="{% url 'csv_download' %}" class="button button--third">CSV</a>
9295
<a href="{% url 'xml_download' %}" class="button button--third">XML</a>
96+
{% endif %}
9397
</footer>
9498
</div>

0 commit comments

Comments
 (0)