improvements to topic listing

This commit is contained in:
albert
2011-09-30 12:14:19 -04:00
parent 3b1775fb74
commit 1c3b094e81
2 changed files with 25 additions and 3 deletions

View File

@@ -1011,6 +1011,14 @@ div#c-forum-topics {
border-top: 1px solid #AAA;
}
}
a.last-page {
color: #666;
}
span.locked-topic {
color: #666;
}
}

View File

@@ -14,9 +14,23 @@
<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) %></td>
<td><%= topic.creator.name %></td>
<td><%= topic.updater.name %></td>
<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 %>