mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-28 01:56:01 -05:00
FIX: Regression on topic list for best of links.
This commit is contained in:
parent
c86b06e3fa
commit
ec7298d548
2 changed files with 26 additions and 20 deletions
|
@ -75,11 +75,17 @@ DiscourseGroupedEach.prototype = {
|
|||
var content = this.content,
|
||||
contentLength = Em.get(content, 'length'),
|
||||
data = this.options.data,
|
||||
template = this.template;
|
||||
template = this.template,
|
||||
keyword = this.options.hash.keyword;
|
||||
|
||||
data.insideEach = true;
|
||||
for (var i = 0; i < contentLength; i++) {
|
||||
template(content.objectAt(i), { data: data });
|
||||
var row = content.objectAt(i);
|
||||
if (keyword) {
|
||||
data.keywords = data.keywords || {};
|
||||
data.keywords[keyword] = row;
|
||||
}
|
||||
template(row, { data: data });
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -13,50 +13,50 @@
|
|||
<th class='num activity' colspan='2'>{{i18n activity}}</th>
|
||||
</tr>
|
||||
|
||||
{{#each view.topics}}
|
||||
{{#groupedEach topic in view.topics}}
|
||||
<tr {{bindAttr class="archived"}}>
|
||||
<td class='main-link'>
|
||||
{{topicStatus topic=this}}
|
||||
<a class='title' href="{{unbound lastUnreadUrl}}">{{{unbound fancy_title}}}</a>
|
||||
{{topicStatus topic=topic}}
|
||||
<a class='title' href="{{unbound topic.lastUnreadUrl}}">{{{unbound topic.fancy_title}}}</a>
|
||||
{{#if unread}}
|
||||
<a href="{{unbound lastUnreadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts count="unread"}}'>{{unbound unread}}</a>
|
||||
<a href="{{unbound topic.lastUnreadUrl}}" class='badge unread badge-notification' title='{{i18n topic.unread_posts count="unread"}}'>{{unbound topic.unread}}</a>
|
||||
{{/if}}
|
||||
{{#if new_posts}}
|
||||
<a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts count="new_posts"}}'>{{unbound new_posts}}</a>
|
||||
{{#if topic.new_posts}}
|
||||
<a href="{{unbound topic.lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new_posts count="new_posts"}}'>{{unbound topic.new_posts}}</a>
|
||||
{{/if}}
|
||||
{{#if unseen}}
|
||||
<a href="{{unbound lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new}}'><i class='icon icon-asterisk'></i></a>
|
||||
{{#if topic.unseen}}
|
||||
<a href="{{unbound topic.lastUnreadUrl}}" class='badge new-posts badge-notification' title='{{i18n topic.new}}'><i class='icon icon-asterisk'></i></a>
|
||||
{{/if}}
|
||||
</td>
|
||||
{{#unless controller.hideCategories}}
|
||||
<td class='category'>
|
||||
{{categoryLink category}}
|
||||
{{categoryLink topic.category}}
|
||||
</td>
|
||||
{{/unless}}
|
||||
<td class='num posts'><a href="{{unbound lastUnreadUrl}}" class='badge-posts'>{{number posts_count numberKey="posts_long"}}</a></td>
|
||||
<td class='num posts'><a href="{{unbound topic.lastUnreadUrl}}" class='badge-posts'>{{number topic.posts_count numberKey="posts_long"}}</a></td>
|
||||
|
||||
<td class='num likes'>
|
||||
{{#if like_count}}
|
||||
<a href='{{unbound url}}{{#if has_best_of}}?filter=best_of{{/if}}'>{{unbound like_count}} <i class='icon-heart'></i></a>
|
||||
{{#if topic.like_count}}
|
||||
<a href='{{unbound topic.url}}{{#if topic.has_best_of}}?filter=best_of{{/if}}'>{{unbound topic.like_count}} <i class='icon-heart'></i></a>
|
||||
{{/if}}
|
||||
</td>
|
||||
|
||||
<td {{bindAttr class=":num :views viewsHeat"}}>{{number views numberKey="views_long"}}</td>
|
||||
{{#if bumped}}
|
||||
<td {{bindAttr class=":num :views topic.viewsHeat"}}>{{number topic.views numberKey="views_long"}}</td>
|
||||
{{#if topic.bumped}}
|
||||
<td class='num activity'>
|
||||
<a href="{{unbound url}}" {{{bindAttr class=":age ageCold"}}} title='{{i18n first_post}}: {{{unboundDate created_at}}}' >{{unboundAge created_at}}</a>
|
||||
<a href="{{topic.unbound url}}" {{{bindAttr class=":age topic.ageCold"}}} title='{{i18n first_post}}: {{{unboundDate topic.created_at}}}' >{{unboundAge topic.created_at}}</a>
|
||||
</td>
|
||||
<td class='num activity last'>
|
||||
<a href="{{unbound lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{unboundDate bumped_at}}}'>{{unboundAge bumped_at}}</a>
|
||||
<a href="{{unbound topic.lastPostUrl}}" class='age' title='{{i18n last_post}}: {{{unboundDate topic.bumped_at}}}'>{{unboundAge topic.bumped_at}}</a>
|
||||
</td>
|
||||
{{else}}
|
||||
<td class='num activity'>
|
||||
<a href="{{unbound url}}" class='age' title='{{i18n first_post}}: {{{unboundDate created_at}}}'>{{unboundAge created_at}}</a>
|
||||
<a href="{{unbound topic.url}}" class='age' title='{{i18n first_post}}: {{{unboundDate topic.created_at}}}'>{{unboundAge topic.created_at}}</a>
|
||||
</td>
|
||||
<td class="activity"></td>
|
||||
{{/if}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{/groupedEach}}
|
||||
|
||||
</table>
|
||||
{{else}}
|
||||
|
|
Loading…
Reference in a new issue