posts: show search navbar for all users.

Include the "q" URL param (as in `/posts/1234?q=<search>`) on thumbnails
for all users. Previously it was only for logged in users. This lets the
next/previous post navbar beneath posts be used by logged out users.
This commit is contained in:
evazion
2021-01-14 14:29:02 -06:00
parent 966a7aa71c
commit c48ee9d390
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,11 @@
## Unreleased
### Changes
* The next/previous post navbar is now available to logged out users. This is
the navbar beneath posts that lets you move to the next or previous post in a
tag search. Previously this was only available to logged-in users.
## 2021-01-12 ## 2021-01-12
### Changes ### Changes

View File

@@ -34,7 +34,7 @@ class PostPreviewComponent < ApplicationComponent
def link_params def link_params
link_params = {} link_params = {}
link_params["q"] = tags if tags.present? && !current_user.is_anonymous? link_params["q"] = tags if tags.present?
link_params["pool_id"] = pool_id if pool_id link_params["pool_id"] = pool_id if pool_id
link_params["favgroup_id"] = favgroup_id if favgroup_id link_params["favgroup_id"] = favgroup_id if favgroup_id