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/list/topics.js.handlebars

73 lines
2.2 KiB
Handlebars

{{#unless loading}}
{{#if loaded}}
<div class='contents'>
{{#if view.showTable}}
{{#if canViewRankDetails}}
<button class='btn' {{action toggleRankDetails}} style='margin-bottom: 10px'>
<i class='icon icon-beaker'></i>
{{i18n rank_details.toggle}}
</button>
{{/if}}
<table id='topic-list'>
<thead>
<tr>
{{#if currentUser}}
<th>&nbsp;</th>
{{/if}}
<th class='main-link'>
{{i18n topic.title}}
</th>
{{#unless category}}
<th class='category'>{{i18n category_title}}</th>
{{/unless}}
<th class='posters'>{{i18n top_contributors}}</th>
<th class='num posts'>{{i18n posts}}</th>
<th class='num likes'>{{i18n likes}}</th>
<th class='num views'>{{i18n views}}</th>
<th class='num activity' colspan='2'>{{i18n activity}}</th>
</tr>
</thead>
{{#if view.topicTrackingState.hasIncoming}}
<tbody>
<tr>
<td colspan="9">
<div class='alert alert-info clickable' {{action showInserted}}>
{{countI18n new_topics_inserted countBinding="view.topicTrackingState.incomingCount"}}
{{i18n show_new_topics}}
</div>
</td>
</tr>
</tbody>
{{/if}}
{{collection contentBinding="topics" tagName="tbody" itemViewClass="Discourse.TopicListItemView"}}
</table>
{{/if}}
</div>
<footer id='topic-list-bottom'>
{{#if loadingMore}}
<div class='topics-loading'>{{i18n topic.loading_more}}</div>
{{/if}}
<h3>
{{footerMessage}}
{{#if allLoaded}}
{{#if latest}}
{{#if canCreateTopic}}
<a href='#' {{action createTopic}}>{{i18n topic.suggest_create_topic}}</a>
{{/if}}
{{else}}
{{#link-to "list.categories"}}{{i18n topic.browse_all_categories}}{{/link-to}} {{i18n or}} {{#link-to 'list.latest'}}{{i18n topic.view_latest_topics}}{{/link-to}}
{{/if}}
{{/if}}
</h3>
</footer>
{{/if}}
{{/unless}}