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

77 lines
2.3 KiB
Handlebars

{{#unless controller.loading}}
{{#if loaded}}
<div class='contents'>
{{#if topics.length}}
{{#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' {{bindAttr class="controller.category:filter-category"}}>
<thead>
<tr>
{{#if Discourse.currentUser}}
<th>&nbsp;</th>
{{/if}}
<th>
{{i18n topic.title}}
</th>
<th>{{i18n category_title}}</th>
<th>{{i18n top_contributors}}</th>
<th class='num'>{{i18n posts}}</th>
<th class='num'>{{i18n likes}}</th>
<th class='num'>{{i18n views}}</th>
<th class='num activity' colspan='2'>{{i18n activity}}</th>
</tr>
</thead>
{{#if view.rollUp}}
<tbody>
<tr>
<td colspan="9">
<div class='alert alert-info'>
{{countI18n new_topics_inserted countBinding="view.insertedCount"}}
<a href='#' {{action showInserted target="controller"}}>{{i18n show_new_topics}}</a>
</div>
</td>
</tr>
</tbody>
{{else}}
{{#group}}
{{collection contentBinding="inserted" tagName="tbody" itemViewClass="Discourse.TopicListItemView"}}
{{/group}}
{{/if}}
{{#group}}
{{collection contentBinding="topics" tagName="tbody" itemViewClass="Discourse.TopicListItemView"}}
{{/group}}
</table>
{{/if}}
</div>
<footer id='topic-list-bottom'>
{{#if view.loading}}
<div class='topics-loading'>{{i18n topic.loading_more}}</div>
{{/if}}
</footer>
<h3>
{{view.footerMessage}}
{{#if view.allLoaded}}
{{#if controller.latest}}
{{#if view.canCreateTopic}}
<a href='#' {{action createTopic}}>{{i18n topic.suggest_create_topic}}</a>
{{/if}}
{{else}}
{{#linkTo list.categories}}{{i18n topic.browse_all_categories}}{{/linkTo}} {{i18n or}} {{#linkTo list.latest}}{{i18n topic.view_latest_topics}}{{/linkTo}}
{{/if}}
{{/if}}
</h3>
{{/if}}
{{/unless}}