Files
danbooru/app/views/forum_topics/index.html.erb
2011-10-23 16:55:57 -04:00

53 lines
1.5 KiB
Plaintext

<div id="c-forum-topics">
<div id="a-index">
<h1>Forum</h1>
<table width="100%" class="striped">
<thead>
<tr>
<th>Title</th>
<th>Creator</th>
<th>Updated by</th>
<th>Updated at</th>
</tr>
</thead>
<tbody>
<% @forum_topics.each do |topic| %>
<tr>
<td>
<% if topic.is_sticky? %>
<span class="sticky">Sticky:</span>
<% end %>
<%= link_to topic.title, forum_topic_path(topic) %>
<% if topic.response_count > 30 %>
<%= link_to "last", forum_topic_path(topic, :page => (topic.response_count / 30.0).ceil), :class => "last-page" %>
<% end %>
<% if topic.is_locked? %>
<span class="locked-topic">(locked)</span>
<% end %>
</td>
<td><%= link_to topic.creator.name, user_path(topic.creator) %></td>
<td><%= link_to topic.updater.name, user_path(topic.updater) %></td>
<td><%= compact_time topic.updated_at %></td>
</tr>
<% end %>
</tbody>
</table>
<%= numbered_paginator(@forum_topics) %>
</div>
</div>
<%= render "secondary_links" %>
<%= content_for(:html_header) do %>
<meta name="last-forum-read-at" content="<%= CurrentUser.last_forum_read_at.to_date %>">
<% end %>
<% content_for(:page_title) do %>
Forum - <%= Danbooru.config.app_name %>
<% end %>