Skip to content

Instantly share code, notes, and snippets.

@plcosta
Created Jul 31, 2018
Embed
What would you like to do?
Discourse - Custom Categories Topics List
<script type='text/x-handlebars' data-template-name='components/latest-topic-list-item'>
<table>
<tbody>
<tr data-topic-id={{topic.id}} class="{{if topic.archived 'archived'}}">
<td class="main-link">
<tr>
{{raw "topic-status" topic=topic}}
{{topic-link topic}}
{{#if topic.featured_link}}
{{topic-featured-link topic}}
{{/if}}
posters
</tr>
<tr>
{{category-link topic.category}}
{{#if topic.tags}}
<div class="discourse-tags">
{{#each topic.visibleListTags as |tag|}}
{{discourse-tag tag}}
{{/each}}
</div>
{{/if}}
</tr>
</td>
{{raw "list/posters-column" posters=topic.posters}}
<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>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment