admin dashboard

This commit is contained in:
r888888888
2014-09-24 14:03:42 -07:00
parent 5a153221c5
commit 7195c0b5fd
15 changed files with 222 additions and 156 deletions

View 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>

View File

@@ -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>