Skip to content

Commit 631f83e

Browse files
committed
Add a "Clear search and filters" link when filters are active #413
Signed-off-by: Thomas Druez <[email protected]>
1 parent 6016b95 commit 631f83e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ v31.0.0 (next)
5353
- Creation date displayed under the project name
5454
- Add ability to sort by date and name
5555
- Add ability to filter by pipeline type
56+
- Add ability to filter by run status
5657

5758
https://github.com/nexB/scancode.io/issues/413
5859

scanpipe/templates/scanpipe/project_list.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
<div>
2222
{% include 'scanpipe/includes/breadcrumb.html' %}
2323
{{ filter.form.is_archived }}
24+
{% if filter.is_active %}
25+
<a class="is-grey-link" href="{% url 'project_list' %}">
26+
<i class="fas fa-times"></i> Clear search and filters
27+
</a>
28+
{% endif %}
2429
</div>
2530
<a href="{% url 'project_add' %}" class="button is-link">New Project</a>
2631
</div>
@@ -42,8 +47,8 @@
4247
<div class="tile is-ancestor">
4348
<div class="tile is-parent">
4449
<article class="tile is-child box has-text-centered border-dashed">
45-
{% if filter.form.search.value %}
46-
No Projects found. <a href="{% url 'project_list' %}">Clear the search</a>
50+
{% if filter.is_active %}
51+
No Projects found. <a href="{% url 'project_list' %}">Clear search and filters</a>
4752
{% else %}
4853
<a href="{% url 'project_add' %}">New Project</a>
4954
{% endif %}

0 commit comments

Comments
 (0)