recommendations: add search form, allow searching by username.

This commit is contained in:
evazion
2019-12-02 02:04:46 -06:00
parent ae46f7a665
commit efda9f37e1
11 changed files with 57 additions and 40 deletions

View File

@@ -3,7 +3,7 @@
<%= subnav_link_to "Upload", new_upload_path %>
<%= subnav_link_to "Hot", posts_path(:tags => "order:rank", :d => "1") %>
<% if RecommenderService.available_for_user?(CurrentUser.user) %>
<%= subnav_link_to "Recommended", recommended_posts_path(user_id: CurrentUser.id) %>
<%= subnav_link_to "Recommended", recommended_posts_path(search: { user_name: CurrentUser.name }) %>
<% end %>
<% unless CurrentUser.is_anonymous? %>
<%= subnav_link_to "Favorites", posts_path(tags: "ordfav:#{CurrentUser.user.name}") %>