minor styling changes, kill n+1 query

This commit is contained in:
Sam 2013-10-18 11:23:08 +11:00
parent e82d975279
commit 6f32cb52d6
3 changed files with 9 additions and 3 deletions

View File

@ -33,7 +33,7 @@
<td class='num'>{{number topic_count}}</td>
<td class='num'>{{number post_count}}</td>
{{#with latestTopic}}
<td {{bindAttr class="archived"}}>
<td {{bindAttr class="archived :latest"}}>
{{topicStatus topic=this}}
<a class='title' href="{{unbound lastUnreadUrl}}">{{{unbound fancy_title}}}</a>
{{#if unread}}

View File

@ -193,6 +193,12 @@
#topic-list.categories {
th.latest, td.latest {
padding-left: 12px;
}
th.num {
width: 45px;
}
.last-user-info {
font-size: 12px;
margin-top: 3px;
@ -205,7 +211,7 @@
width: 55%;
.featured-users {
position: absolute;
right: 5px;
right: 18px;
top: 3px;
}
.category-description {

View File

@ -53,7 +53,7 @@ class CategoryList
.order('COALESCE(categories.topics_year, 0) DESC')
if latest_post_only?
@categories = @categories.includes(:latest_post => :topic )
@categories = @categories.includes(:latest_post => {:topic => :last_poster} )
end
@categories = @categories.to_a