Skip to content

Instantly share code, notes, and snippets.

@plcosta
Created July 31, 2018 04:06
Show Gist options
  • Save plcosta/38497d2b1585655e69cfe4e1eea72426 to your computer and use it in GitHub Desktop.
Save plcosta/38497d2b1585655e69cfe4e1eea72426 to your computer and use it in GitHub Desktop.
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