forum: make status labels into clickable filters.

* Make it so that you can click the stickied / locked / deleted icons or
  the new / approved / pending / rejected labels to filter topics by
  that status.

* Replace the `mod_only` search param with `is_private`.
This commit is contained in:
evazion
2020-03-16 17:32:26 -05:00
parent 95d65b25e2
commit 8253df84d9
6 changed files with 54 additions and 20 deletions

View File

@@ -10,8 +10,9 @@
<p>
Categories:
<%= link_to "All", forum_topics_path %>,
<%= link_to "New", forum_topics_path(search: { is_read: false }) %>,
<% if CurrentUser.is_moderator? %>
<%= link_to "Mod+", forum_topics_path(:search => {:mod_only => true}) %>,
<%= link_to "Private", forum_topics_path(search: { is_private: true }) %>,
<% end %>
<%= ForumTopic::CATEGORIES.map {|id, name| link_to_unless_current(name, forum_topics_path(:search => {:category_id => id}))}.join(", ").html_safe %>
</p>