/favorite_groups: add search, creators, timestamps, edit/delete links.

This commit is contained in:
evazion
2020-01-22 01:35:56 -06:00
parent 1aadd19663
commit edaf6323fd
8 changed files with 45 additions and 16 deletions

View File

@@ -7,7 +7,7 @@
<% end %>
<% unless CurrentUser.is_anonymous? %>
<%= subnav_link_to "Favorites", posts_path(tags: "ordfav:#{CurrentUser.user.name}") %>
<%= subnav_link_to "Fav groups", user_favorite_groups_path(CurrentUser.id) %>
<%= subnav_link_to "Fav groups", favorite_groups_path(search: { creator_name: CurrentUser.name }) %>
<%= subnav_link_to "Saved searches", posts_path(tags: "search:all") %>
<% end %>
<%= subnav_link_to "Changes", post_versions_path %>

View File

@@ -9,7 +9,7 @@
<% end %>
<% if CurrentUser.user.favorite_groups.for_post(post.id).present? %>
<%= render "posts/partials/show/favorite_groups", post: post, favgroups: CurrentUser.user.favorite_groups.for_post(post.id) %>
<%= render "posts/partials/show/favorite_groups", post: post, favgroups: CurrentUser.user.favorite_groups.for_post(post.id).order(name: :asc) %>
<% end %>
</div>
<% end %>