FIX: show topic entrance when clicking the # of replies in /categories

This commit is contained in:
Régis Hanol 2016-08-24 22:25:10 +02:00
parent 3e00672c7d
commit 7d600d9fee
3 changed files with 41 additions and 36 deletions

View File

@ -0,0 +1,6 @@
import { showEntrance } from "discourse/components/topic-list-item";
export default Ember.Component.extend({
tagName: "tr",
click: showEntrance,
});

View File

@ -12,42 +12,7 @@
{{else}} {{else}}
{{#if topics}} {{#if topics}}
{{#each topics as |t|}} {{#each topics as |t|}}
<tr> {{latest-topic-list-item topic=t}}
<table>
<tbody>
<tr data-topic-id={{t.id}} class="{{if t.archived 'archived'}}">
<td class="topic-poster">
{{#with t.creator as |op|}}
{{#user-link user=op}}
{{avatar op imageSize="large"}}
{{/user-link}}
{{/with}}
</td>
<td class="main-link">
<tr>
{{topic-status topic=t}}
{{topic-link t}}
{{topic-post-badges newPosts=t.totalUnread unseen=t.unseen url=t.lastUnreadUrl}}
</tr>
<tr>
{{category-link t.category}}
{{#if t.tags}}
{{#each t.visibleListTags as |tag|}}
{{discourse-tag tag}}
{{/each}}
{{/if}}
</tr>
</td>
<td class="topic-stats">
{{raw "list/posts-count-column" topic=t tagName="div"}}
<div class="topic-last-activity">
<a href="{{t.lastPostUrl}}" title="{{t.bumpedAtTitle}}">{{format-date t.bumpedAt format="tiny" noTitle="true"}}</a>
</div>
</td>
</tr>
</tbody>
</table>
</tr>
{{/each}} {{/each}}
<tr class="more-topics"> <tr class="more-topics">
<td> <td>

View File

@ -0,0 +1,34 @@
<table>
<tbody>
<tr data-topic-id={{topic.id}} class="{{if topic.archived 'archived'}}">
<td class="topic-poster">
{{#with topic.creator as |op|}}
{{#user-link user=op}}
{{avatar op imageSize="large"}}
{{/user-link}}
{{/with}}
</td>
<td class="main-link">
<tr>
{{topic-status topic=topic}}
{{topic-link topic}}
{{topic-post-badges newPosts=topic.totalUnread unseen=topic.unseen url=topic.lastUnreadUrl}}
</tr>
<tr>
{{category-link topic.category}}
{{#if topic.tags}}
{{#each topic.visibleListTags as |tag|}}
{{discourse-tag tag}}
{{/each}}
{{/if}}
</tr>
</td>
<td class="topic-stats">
{{raw "list/posts-count-column" topic=topic tagName="div"}}
<div class="topic-last-activity">
<a href="{{topic.lastPostUrl}}" title="{{topic.bumpedAtTitle}}">{{format-date topic.bumpedAt format="tiny" noTitle="true"}}</a>
</div>
</td>
</tr>
</tbody>
</table>