Skip to content

Commit

Permalink
Merge pull request pycontw#1193 from pycontw/ben/category_filter_fix
Browse files Browse the repository at this point in the history
fix(category): fix category filtering not working when order by other…
  • Loading branch information
SivanYeh committed Apr 21, 2024
2 parents 8516ede + 53b0638 commit 0621af7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/templates/default/reviews/_includes/proposal_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<tr>
{% if not verdict %}
<th width="1%">
<a {% if ordering == 'review__count' %}class="active asc" href="?order=-count&category={{ category }}"
{% elif ordering == '-review__count' %}class="active desc" href="?order=count&category={{ category }}"
{% else %}href="?order=count&category={{ category }}"{% endif %}>
<a {% if ordering == 'review__count' %}class="active asc" href="?order=-count&category={{ category|default:'' }}"
{% elif ordering == '-review__count' %}class="active desc" href="?order=count&category={{ category|default:'' }}"
{% else %}href="?order=count&category={{ category|default:'' }}"{% endif %}>
{% trans 'Reviewed' %}
<i class="fa fa-sort fa-lg"></i>
<i class="fa fa-sort-asc fa-lg"></i>
Expand All @@ -15,18 +15,18 @@
</th>
{% endif %}
<th class="proposal-title">
<a {% if ordering == 'title' %}class="active asc" href="?order=-title&category={{ category }}"
{% elif ordering == '-title' %}class="active desc" href="?order=title&category={{ category }}"{% else %}href="?order=title&category={{ category }}"{% endif %}>
<a {% if ordering == 'title' %}class="active asc" href="?order=-title&category={{ category|default:'' }}"
{% elif ordering == '-title' %}class="active desc" href="?order=title&category={{ category|default:'' }}"{% else %}href="?order=title&category={{ category|default:'' }}"{% endif %}>
{% trans 'Title' %}
<i class="fa fa-sort fa-lg"></i>
<i class="fa fa-sort-asc fa-lg"></i>
<i class="fa fa-sort-desc fa-lg"></i>
</a>
</th>
<th width="1%" class="hidden-md hidden-sm hidden-xs">
<a {% if ordering == 'language' %}class="active asc" href="?order=-lang&category={{ category }}"
{% elif ordering == '-language' %}class="active desc" href="?order=lang&category={{ category }}"
{% else %}href="?order=lang&category={{ category }}"{% endif %}>
<a {% if ordering == 'language' %}class="active asc" href="?order=-lang&category={{ category|default:'' }}"
{% elif ordering == '-language' %}class="active desc" href="?order=lang&category={{ category|default:'' }}"
{% else %}href="?order=lang&category={{ category|default:'' }}"{% endif %}>
{% trans 'Lang' %}
<i class="fa fa-sort fa-lg"></i>
<i class="fa fa-sort-asc fa-lg"></i>
Expand Down

0 comments on commit 0621af7

Please sign in to comment.