admin dashboard
This commit is contained in:
38
app/views/forum_topics/_listing.html.erb
Normal file
38
app/views/forum_topics/_listing.html.erb
Normal file
@@ -0,0 +1,38 @@
|
||||
<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 class="forum-topic-row forum-topic-category-<%= topic.category_id %>">
|
||||
<td>
|
||||
<% if topic.is_sticky? %>
|
||||
<span class="sticky">Sticky:</span>
|
||||
<% end %>
|
||||
|
||||
<% unless topic.read_by?(CurrentUser.user) %>
|
||||
<span class="new">NEW</span>
|
||||
<% end %>
|
||||
|
||||
<%= link_to topic.title, forum_topic_path(topic) %>
|
||||
|
||||
<% if topic.response_count > Danbooru.config.posts_per_page %>
|
||||
<%= link_to "page #{topic.last_page}", forum_topic_path(topic, :page => topic.last_page), :class => "last-page" %>
|
||||
<% end %>
|
||||
|
||||
<% if topic.is_locked? %>
|
||||
<span class="locked-topic">(locked)</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= link_to_user topic.creator %></td>
|
||||
<td><%= link_to_user topic.updater %></td>
|
||||
<td><%= compact_time topic.updated_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -7,44 +7,7 @@
|
||||
<%= link_to "All", forum_topics_path %>, <%= ForumTopic::CATEGORIES.map {|id, name| link_to_unless_current(name, forum_topics_path(:search => {:category_id => id}))}.join(", ").html_safe %>
|
||||
</p>
|
||||
|
||||
<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 class="forum-topic-row forum-topic-category-<%= topic.category_id %>">
|
||||
<td>
|
||||
<% if topic.is_sticky? %>
|
||||
<span class="sticky">Sticky:</span>
|
||||
<% end %>
|
||||
|
||||
<% unless topic.read_by?(CurrentUser.user) %>
|
||||
<span class="new">NEW</span>
|
||||
<% end %>
|
||||
|
||||
<%= link_to topic.title, forum_topic_path(topic) %>
|
||||
|
||||
<% if topic.response_count > Danbooru.config.posts_per_page %>
|
||||
<%= link_to "page #{topic.last_page}", forum_topic_path(topic, :page => topic.last_page), :class => "last-page" %>
|
||||
<% end %>
|
||||
|
||||
<% if topic.is_locked? %>
|
||||
<span class="locked-topic">(locked)</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td><%= link_to_user topic.creator %></td>
|
||||
<td><%= link_to_user topic.updater %></td>
|
||||
<td><%= compact_time topic.updated_at %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= render "listing", :forum_topics => @forum_topics %>
|
||||
|
||||
<%= numbered_paginator(@forum_topics) %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user