diff --git a/app/assets/javascripts/discourse/components/latest-topic-list-item.js.es6 b/app/assets/javascripts/discourse/components/latest-topic-list-item.js.es6 new file mode 100644 index 00000000000..07a4c53b2f5 --- /dev/null +++ b/app/assets/javascripts/discourse/components/latest-topic-list-item.js.es6 @@ -0,0 +1,6 @@ +import { showEntrance } from "discourse/components/topic-list-item"; + +export default Ember.Component.extend({ + tagName: "tr", + click: showEntrance, +}); diff --git a/app/assets/javascripts/discourse/templates/components/categories-and-latest-topics.hbs b/app/assets/javascripts/discourse/templates/components/categories-and-latest-topics.hbs index f766b04994a..d252e6388a2 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-and-latest-topics.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-and-latest-topics.hbs @@ -12,42 +12,7 @@ {{else}} {{#if topics}} {{#each topics as |t|}} - - - - - - - {{topic-status topic=t}} - {{topic-link t}} - {{topic-post-badges newPosts=t.totalUnread unseen=t.unseen url=t.lastUnreadUrl}} - - - {{category-link t.category}} - {{#if t.tags}} - {{#each t.visibleListTags as |tag|}} - {{discourse-tag tag}} - {{/each}} - {{/if}} - - - - - -
- {{#with t.creator as |op|}} - {{#user-link user=op}} - {{avatar op imageSize="large"}} - {{/user-link}} - {{/with}} -
- {{raw "list/posts-count-column" topic=t tagName="div"}} - -
- + {{latest-topic-list-item topic=t}} {{/each}} diff --git a/app/assets/javascripts/discourse/templates/components/latest-topic-list-item.hbs b/app/assets/javascripts/discourse/templates/components/latest-topic-list-item.hbs new file mode 100644 index 00000000000..8a64a53e898 --- /dev/null +++ b/app/assets/javascripts/discourse/templates/components/latest-topic-list-item.hbs @@ -0,0 +1,34 @@ + + + + + + {{topic-status topic=topic}} + {{topic-link topic}} + {{topic-post-badges newPosts=topic.totalUnread unseen=topic.unseen url=topic.lastUnreadUrl}} + + + {{category-link topic.category}} + {{#if topic.tags}} + {{#each topic.visibleListTags as |tag|}} + {{discourse-tag tag}} + {{/each}} + {{/if}} + + + + + +
+ {{#with topic.creator as |op|}} + {{#user-link user=op}} + {{avatar op imageSize="large"}} + {{/user-link}} + {{/with}} +
+ {{raw "list/posts-count-column" topic=topic tagName="div"}} + +