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/mobile/discovery/topics.hbs
2015-10-22 07:52:47 +05:30

60 lines
2.1 KiB
Handlebars

<div class='contents'>
{{#if top}}
<div class='top-lists'>
{{period-chooser period=period action="changePeriod"}}
</div>
{{else}}
{{#if topicTrackingState.hasIncoming}}
<div class='alert alert-info' {{action "showInserted"}}>
{{count-i18n key="topic_count_" suffix=topicTrackingState.filter count=topicTrackingState.incomingCount}}
{{i18n 'click_to_show'}}
</div>
{{/if}}
{{/if}}
{{#if hasTopics}}
{{topic-list
showPosters=true
currentUser=currentUser
hideCategory=model.hideCategory
topics=model.topics}}
{{/if}}
</div>
<footer class='topic-list-bottom'>
{{conditional-loading-spinner condition=model.loadingMore}}
{{#if allLoaded}}
{{#if showDismissRead}}
<button title="{{i18n 'topics.bulk.dismiss_tooltip'}}" id='dismiss-topics' class='btn dismiss-read' {{action "dismissReadPosts"}}>{{i18n 'topics.bulk.dismiss_button'}}</button>
{{/if}}
{{#if showResetNew}}
<button id='dismiss-new' class='btn dismiss-read' {{action "resetNew"}}>{{i18n 'topics.bulk.dismiss_new'}}</button>
{{/if}}
{{#if latest}}
<div class="education">
{{{footerEducation}}}
</div>
<h3>
{{footerMessage}}
{{#if model.can_create_topic}}<a href {{action "createTopic"}}>{{i18n 'topic.suggest_create_topic'}}</a>{{/if}}
</h3>
{{else}}
{{#if top}}
<h3>
{{#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'}}
<br/>
{{top-period-buttons period=period action="changePeriod"}}
</h3>
{{else}}
<div class="education">
{{{footerEducation}}}
</div>
<h3>
{{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}}
</h3>
{{/if}}
{{/if}}
{{/if}}
</footer>