This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/templates/components/basic-topic-list.hbs
2014-11-05 10:08:20 -05:00

61 lines
2.0 KiB
Handlebars

{{#if loaded}}
{{#if topics}}
<table class="topic-list">
<thead>
<tr>
<th class="default">{{i18n topic.title}}</th>
{{#unless controller.hideCategory}}
<th class="category">{{i18n category_title}}</th>
{{/unless}}
<th class="num posts">{{i18n posts}}</th>
{{#if controller.showParticipants}}
<th class="posters">{{i18n users}}</th>
{{/if}}
<th class="num views">{{i18n views}}</th>
<th class="num activity">{{i18n activity}}</th>
</tr>
</thead>
<tbody>
{{#grouped-each topic in topics}}
<tr {{bind-attr class="archived"}}>
<td class='main-link'>
{{topic-status topic=topic}}
<a class='title' href="{{unbound topic.lastUnreadUrl}}">{{{unbound topic.fancy_title}}}</a>
{{topic-post-badges unread=topic.unread
newPosts=topic.new_posts
unseen=topic.unseen
url=topic.lastUnreadUrl}}
</td>
{{raw "list/category-column" hideCategory=controller.hideCategory category=topic.category}}
{{posts-count-column topic=topic class="num" action="clickedPosts"}}
{{#if controller.showParticipants}}
<td class='participants'>
{{#each topic.participants}}
<a href="{{user.path}}" class="{{extras}}">{{avatar this usernamePath="user.username" imageSize="small"}}</a>
{{/each}}
</td>
{{/if}}
<td {{bind-attr class=":num :views topic.viewsHeat"}}>
{{number topic.views numberKey="views_long"}}
</td>
{{raw "list/activity-column" topic=topic class="num" tagName="td"}}
</tr>
{{/grouped-each}}
</tbody>
</table>
{{else}}
<div class='alert alert-info'>
{{i18n choose_topic.none_found}}
</div>
{{/if}}
{{else}}
{{loading-spinner}}
{{/if}}