Files
danbooru/app/views/forum_posts/index.html.erb

37 lines
1.2 KiB
Plaintext

<div id="c-forum-posts">
<div id="a-index">
<table width="100%" class="striped">
<thead>
<tr>
<th>Topic</th>
<th>Excerpt</th>
<th>Creator</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<% @forum_posts.each do |forum_post| %>
<% if CurrentUser.is_moderator? || !forum_post.is_deleted? %>
<tr id="forum-post-<%= forum_post.id %>" data-topic-is-deleted="<%= forum_post.topic.is_deleted? %>" data-is-deleted="<%= forum_post.is_deleted? %>">
<td class="forum-post-topic-title"><%= link_to forum_post.topic.title, forum_topic_path(forum_post.topic) %></td>
<td class="forum-post-excerpt">
<%= link_to truncate(forum_post.body, :length => 50), forum_post_path(forum_post) %>
</td>
<td><%= link_to_user forum_post.creator %></td>
<td><%= time_ago_in_words_tagged forum_post.created_at %></td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
<%= numbered_paginator(@forum_posts) %>
</div>
</div>
<%= render "forum_topics/secondary_links" %>
<% content_for(:page_title) do %>
Forum Posts - <%= Danbooru.config.app_name %>
<% end %>