Files
danbooru/app/views/forum_topics/index.html.erb
evazion db63b6d44f pundit: convert forum topics / forum posts to pundit.
Fix it being possible for users to delete or undelete their own forum
posts and topics, even if they were deleted by a mod.
2020-03-20 18:03:00 -05:00

25 lines
805 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 %>,
<%= link_to "New", forum_topics_path(search: { is_read: false }) %>,
<% if policy(ForumTopic).moderate? %>
<%= 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>
<%= render "listing", forum_topics: @forum_topics %>
<%= numbered_paginator(@forum_topics) %>
</div>
</div>