Skip to content

Commit 0621af7

Browse files
authored
Merge pull request #1193 from pycontw/ben/category_filter_fix
fix(category): fix category filtering not working when order by other…
2 parents 8516ede + 53b0638 commit 0621af7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/templates/default/reviews/_includes/proposal_table.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<tr>
55
{% if not verdict %}
66
<th width="1%">
7-
<a {% if ordering == 'review__count' %}class="active asc" href="?order=-count&category={{ category }}"
8-
{% elif ordering == '-review__count' %}class="active desc" href="?order=count&category={{ category }}"
9-
{% else %}href="?order=count&category={{ category }}"{% endif %}>
7+
<a {% if ordering == 'review__count' %}class="active asc" href="?order=-count&category={{ category|default:'' }}"
8+
{% elif ordering == '-review__count' %}class="active desc" href="?order=count&category={{ category|default:'' }}"
9+
{% else %}href="?order=count&category={{ category|default:'' }}"{% endif %}>
1010
{% trans 'Reviewed' %}
1111
<i class="fa fa-sort fa-lg"></i>
1212
<i class="fa fa-sort-asc fa-lg"></i>
@@ -15,18 +15,18 @@
1515
</th>
1616
{% endif %}
1717
<th class="proposal-title">
18-
<a {% if ordering == 'title' %}class="active asc" href="?order=-title&category={{ category }}"
19-
{% elif ordering == '-title' %}class="active desc" href="?order=title&category={{ category }}"{% else %}href="?order=title&category={{ category }}"{% endif %}>
18+
<a {% if ordering == 'title' %}class="active asc" href="?order=-title&category={{ category|default:'' }}"
19+
{% elif ordering == '-title' %}class="active desc" href="?order=title&category={{ category|default:'' }}"{% else %}href="?order=title&category={{ category|default:'' }}"{% endif %}>
2020
{% trans 'Title' %}
2121
<i class="fa fa-sort fa-lg"></i>
2222
<i class="fa fa-sort-asc fa-lg"></i>
2323
<i class="fa fa-sort-desc fa-lg"></i>
2424
</a>
2525
</th>
2626
<th width="1%" class="hidden-md hidden-sm hidden-xs">
27-
<a {% if ordering == 'language' %}class="active asc" href="?order=-lang&category={{ category }}"
28-
{% elif ordering == '-language' %}class="active desc" href="?order=lang&category={{ category }}"
29-
{% else %}href="?order=lang&category={{ category }}"{% endif %}>
27+
<a {% if ordering == 'language' %}class="active asc" href="?order=-lang&category={{ category|default:'' }}"
28+
{% elif ordering == '-language' %}class="active desc" href="?order=lang&category={{ category|default:'' }}"
29+
{% else %}href="?order=lang&category={{ category|default:'' }}"{% endif %}>
3030
{% trans 'Lang' %}
3131
<i class="fa fa-sort fa-lg"></i>
3232
<i class="fa fa-sort-asc fa-lg"></i>

0 commit comments

Comments
 (0)