Skip to content

Commit

Permalink
fix: fix sort in display results
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Sep 25, 2023
1 parent 4c82f3d commit dfa952a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/templates/display_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@
<div>
<button href="#" data-dropdown="drop_sort" aria-controls="drop_sort" aria-expanded="false" class="button round dropdown small secondary unmarged">
<span class="material-icons">swap_vert</span>
{% if not sort_by %}Relevance{% elif sort_by == "unique_scans_n" %}Most scanned products{% elif sort_by == "nutriscore_score" %}Products with the best Nutri-Score{% elif sort_by == "-ecoscore_score" %}Products with the best Eco-Score{% elif sort_by == "created_t" %}Recently added products{% elif sort_by == "last_modified_t" %}Recently modified products{% endif %}
{% if not sort_by %}Relevance{% elif sort_by == "-unique_scans_n" %}Most scanned products{% elif sort_by == "nutriscore_score" %}Products with the best Nutri-Score{% elif sort_by == "-ecoscore_score" %}Products with the best Eco-Score{% elif sort_by == "created_t" %}Recently added products{% elif sort_by == "last_modified_t" %}Recently modified products{% endif %}
</button>
<ul id="drop_sort" data-dropdown-content="" class="f-dropdown" aria-hidden="true" style="position: absolute; left: -99999px; top: 38px;">
<li>
<a href="/?q={{ q|urlencode }}&amp;page_size={{ results.page_size }}">Relevance</a>
</li>
<li>
<a href="/?q={{ q|urlencode }}&amp;sort_by=unique_scans_n&amp;page_size={{ results.page_size }}">Most scanned products</a>
<a href="/?q={{ q|urlencode }}&amp;sort_by=-unique_scans_n&amp;page_size={{ results.page_size }}">Most scanned products</a>
</li>

<li>
Expand Down

0 comments on commit dfa952a

Please sign in to comment.