Disallow removing filters from sort by column

This commit is contained in:
syeopite 2021-04-12 01:52:53 -07:00
parent 752e58be48
commit 937f64ef6c
No known key found for this signature in database
GPG key ID: 6FA616E5A5294A82

View file

@ -119,10 +119,7 @@
<% ["relevance", "rating", "date", "views"].each do |sort| %>
<div class="pure-u-1 pure-md-1-5">
<% if operator_hash.fetch("sort", "relevance") == sort %>
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&sort=[a-z]+/, "")}"%>">
<b><%= translate(locale, sort) %></b>
<i class="remove-filter icon ion-md-close"></i>
</a>
<b><%= translate(locale, sort) %></b>
<% else %>
<a href="<%= base_url + "#{filter_params.gsub(/&sort=[a-z]+/, "")}&sort=#{sort}"%>">
<%= translate(locale, sort) %>