Files
danbooru/app/views/forum_topics/index.html.erb
evazion c36c0b9e7a views: refactor atom feed links.
* Fix comment & forum feeds to include search params.
* Remove global post feeds (only include post feeds on post index).
2020-01-26 19:16:38 -06:00

24 lines
726 B
Plaintext

<% page_title "Forum" %>
<% atom_feed_tag "Forum Topics", forum_topics_url(:atom, search: params.fetch(:search, {}).permit!) %>
<%= render "secondary_links" %>
<div id="c-forum-topics">
<div id="a-index">
<h1>Forum</h1>
<p>
Categories:
<%= link_to "All", forum_topics_path %>,
<% if CurrentUser.is_moderator? %>
<%= link_to "Mod+", forum_topics_path(:search => {:mod_only => true}) %>,
<% end %>
<%= ForumTopic::CATEGORIES.map {|id, name| link_to_unless_current(name, forum_topics_path(:search => {:category_id => id}))}.join(", ").html_safe %>
</p>
<%= render "listing", forum_topics: @forum_topics %>
<%= numbered_paginator(@forum_topics) %>
</div>
</div>