102 lines
4.4 KiB
Handlebars
102 lines
4.4 KiB
Handlebars
{{#if selected}}
|
|
<div id='bulk-select'>
|
|
<button class='btn no-text' {{action showBulkActions}}><i class="fa fa-wrench"></i></button>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class='contents'>
|
|
{{#if top}}
|
|
{{#if yearly}}<h2><i class="fa fa-calendar-o"></i> {{i18n filters.top.this_year}}</h2>{{/if}}
|
|
{{#if monthly}}<h2><i class="fa fa-calendar-o"></i> {{i18n filters.top.this_month}}</h2>{{/if}}
|
|
{{#if weekly}}<h2><i class="fa fa-calendar-o"></i> {{i18n filters.top.this_week}}</h2>{{/if}}
|
|
{{#if daily}}<h2><i class="fa fa-calendar-o"></i> {{i18n filters.top.today}}</h2>{{/if}}
|
|
{{/if}}
|
|
{{#if showTable}}
|
|
<table id='topic-list'>
|
|
<thead>
|
|
<tr>
|
|
{{#if currentUser}}
|
|
<th>
|
|
{{#if canBulkSelect}}
|
|
<button class='btn bulk-select' {{action toggleBulkSelect}} title="{{i18n topics.bulk.toggle}}"><i class='fa fa-list'></i></button>
|
|
{{/if}}
|
|
</th>
|
|
{{/if}}
|
|
{{#sortable-heading sortBy="default" action="changeSort" order=order ascending=ascending}}
|
|
{{i18n topic.title}}
|
|
{{/sortable-heading}}
|
|
{{#unless controller.hideCategory}}
|
|
{{#sortable-heading sortBy="category" action="changeSort" order=order ascending=ascending}}
|
|
{{i18n category_title}}
|
|
{{/sortable-heading}}
|
|
{{/unless}}
|
|
{{#sortable-heading sortBy="posters" action="changeSort" order=order ascending=ascending}}
|
|
{{i18n users}}
|
|
{{/sortable-heading}}
|
|
{{#sortable-heading sortBy="posts" number=true action="changeSort" order=order ascending=ascending}}
|
|
{{i18n posts}}
|
|
{{/sortable-heading}}
|
|
{{#sortable-heading sortBy="likes" number=true action="changeSort" order=order ascending=ascending}}
|
|
{{i18n likes}}
|
|
{{/sortable-heading}}
|
|
{{#sortable-heading sortBy="views" number=true action="changeSort" order=order ascending=ascending}}
|
|
{{i18n views}}
|
|
{{/sortable-heading}}
|
|
{{#sortable-heading sortBy="activity" number=true colspan="2" action="changeSort" order=order ascending=ascending}}
|
|
{{i18n activity}}
|
|
{{/sortable-heading}}
|
|
</tr>
|
|
</thead>
|
|
|
|
{{#if topicTrackingState.hasIncoming}}
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="9">
|
|
<div class='alert alert-info clickable' {{action showInserted}}>
|
|
{{countI18n new_topics_inserted count=topicTrackingState.incomingCount}}
|
|
{{i18n show_new_topics}}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
{{/if}}
|
|
|
|
<tbody>
|
|
{{each topics itemController="topic-list-item" itemViewClass="Discourse.TopicListItemView"}}
|
|
</tbody>
|
|
|
|
</table>
|
|
{{/if}}
|
|
</div>
|
|
|
|
<footer id='topic-list-bottom'>
|
|
{{#if loadingMore}}
|
|
<div class='topics-loading'>{{i18n topic.loading_more}}</div>
|
|
{{/if}}
|
|
{{#if allLoaded}}
|
|
{{#if showDismissRead}}
|
|
<button class='btn dismiss-read' {{action dismissRead}}>{{i18n topics.bulk.dismiss_read}}</button>
|
|
{{/if}}
|
|
{{#if showResetNew}}
|
|
<button class='btn dismiss-read' {{action resetNew}}>{{i18n topics.bulk.dismiss_new}}</button>
|
|
{{/if}}
|
|
|
|
<h3>
|
|
{{#if latest}}
|
|
{{footerMessage}}
|
|
{{#if can_create_topic}}<a href='#' {{action createTopic}}>{{i18n topic.suggest_create_topic}}</a>{{/if}}
|
|
{{else}}
|
|
{{#if top}}
|
|
{{#link-to "discovery.categories"}}{{i18n topic.browse_all_categories}}{{/link-to}}, {{#link-to 'discovery.latest'}}{{i18n topic.view_latest_topics}}{{/link-to}} {{i18n or}} {{i18n filters.top.other_periods}}
|
|
{{#unless yearly}}<a href="{{unbound showMoreYearlyUrl}}" class='btn'><i class="fa fa-calendar-o"></i>{{i18n filters.top.this_year}}</a>{{/unless}}
|
|
{{#unless monthly}}<a href="{{unbound showMoreMonthlyUrl}}" class='btn'><i class="fa fa-calendar-o"></i>{{i18n filters.top.this_month}}</a>{{/unless}}
|
|
{{#unless weekly}}<a href="{{unbound showMoreWeeklyUrl}}" class='btn'><i class="fa fa-calendar-o"></i>{{i18n filters.top.this_week}}</a>{{/unless}}
|
|
{{#unless daily}}<a href="{{unbound showMoreDailyUrl}}" class='btn'><i class="fa fa-calendar-o"></i>{{i18n filters.top.today}}</a>{{/unless}}
|
|
{{else}}
|
|
{{footerMessage}}{{#link-to "discovery.categories"}} {{i18n topic.browse_all_categories}}{{/link-to}} {{i18n or}} {{#link-to 'discovery.latest'}}{{i18n topic.view_latest_topics}}{{/link-to}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</h3>
|
|
{{/if}}
|
|
</footer>
|