|
26 | 26 | </span> |
27 | 27 |
|
28 | 28 | <div class="button-list is-gutterless has-margin-2"> |
29 | | - <%= link_to 'Activity', request.params.merge(sort: 'activity'), |
| 29 | + <%= link_to 'Activity', query_url(sort: 'activity'), |
30 | 30 | class: "button is-muted is-outlined #{(params[:sort].nil?) && !current_page?(questions_lottery_path) || |
31 | 31 | params[:sort] == 'activity' ? 'is-active' : ''}", |
32 | 32 | title: 'most recent changes: new posts, edits, close/open, delete/undelete' %> |
33 | | - <%= link_to 'Age', request.params.merge(sort: 'age'), |
| 33 | + <%= link_to 'Age', query_url(sort: 'age'), |
34 | 34 | class: "button is-muted is-outlined #{params[:sort] == 'age' ? 'is-active' : ''}", |
35 | 35 | title: 'newest posts (ignores other activity)' %> |
36 | | - <%= link_to 'Score', request.params.merge(sort: 'score'), |
| 36 | + <%= link_to 'Score', query_url(sort: 'score'), |
37 | 37 | class: "button is-muted is-outlined #{params[:sort] == 'score' ? 'is-active' : ''}", |
38 | 38 | title: 'highest score first (not the same as net votes)' %> |
39 | 39 | <% if SiteSetting['AllowContentTransfer'] %> |
40 | | - <%= link_to 'Native', request.params.merge(sort: 'native'), |
| 40 | + <%= link_to 'Native', query_url(sort: 'native'), |
41 | 41 | class: "button is-muted is-outlined #{params[:sort] == 'native' ? 'is-active' : ''}", |
42 | 42 | title: 'exclude imported posts' %> |
43 | 43 | <% end %> |
44 | | - <%= link_to 'Random', request.params.merge(sort: 'lottery'), |
| 44 | + <%= link_to 'Random', query_url(sort: 'lottery'), |
45 | 45 | class: "button is-muted is-outlined #{params[:sort] == 'lottery' ? 'is-active' : ''}", |
46 | 46 | title: 'random set of questions, usually older ones' %> |
47 | 47 | </div> |
48 | 48 | </div> |
49 | 49 |
|
50 | 50 | <details class="category-filters"> |
51 | | - <summary>Filters (<%= @filtered ? @active_filter[:name].empty? ? 'Custom' : @active_filter[:name] : 'None' %>)</summary> |
| 51 | + <summary>Filters (<%= @filtered ? @active_filter[:name].blank? ? 'Custom' : @active_filter[:name] : 'None' %>)</summary> |
52 | 52 | <% if @active_filter[:default] == :user %> |
53 | 53 | <div class="notice is-info"> |
54 | 54 | You are currently filtering by <strong><%= @active_filter[:name] %></strong> because it is set as your default for this category |
|
0 commit comments