142 lines
5.2 KiB
Handlebars
142 lines
5.2 KiB
Handlebars
{{#if content}}
|
|
{{#if loaded}}
|
|
|
|
{{#if view.firstPostLoaded}}
|
|
<div id='topic-title'>
|
|
<div class='container'>
|
|
<div class='inner'>
|
|
{{#if view.showFavoriteButton}}
|
|
<a {{bindAttr class=":star view.topic.starred:starred"}} {{action toggleStar target="controller"}} href='#' title="{{i18n favorite.help}}"></a>
|
|
{{/if}}
|
|
{{#if view.editingTopic}}
|
|
<input id='edit-title' type='text' {{bindAttr value="view.topic.title"}}>
|
|
{{view Discourse.ComboboxViewCategory valueAttribute="name" contentBinding="view.categories" valueBinding="view.topic.categoryName"}}
|
|
<button class='btn btn-primary btn-small' {{action finishedEdit target="view"}}><i class='icon-ok'></i></button>
|
|
<button class='btn btn-small' {{action cancelEdit target="view"}}><i class='icon-remove'></i></button>
|
|
{{else}}
|
|
<h1>
|
|
{{#if view.topic.fancy_title}}
|
|
{{view Discourse.TopicStatusView topicBinding="view.topic"}}
|
|
<a href='{{unbound view.topic.url}}'>{{{unbound view.topic.fancy_title}}}</a>
|
|
{{else}}
|
|
{{#if view.topic.missing}}
|
|
{{i18n topic.not_found.title}}
|
|
{{else}}
|
|
{{i18n topic.loading}}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{categoryLink view.topic.category}}
|
|
|
|
{{#if view.topic.can_edit}}
|
|
<a href='#' {{action editTopic target="view"}} class='edit-topic' title='{{i18n edit}}'><i class="icon-pencil"></i></a>
|
|
{{/if}}
|
|
</h1>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="container posts">
|
|
|
|
{{view Discourse.SelectedPostsView}}
|
|
<div class="row">
|
|
<section class="topic-area" id='topic' data-topic-id='{{unbound content.id}}'>
|
|
<div class='posts-wrapper'>
|
|
<div id='topic-progress-wrapper'>
|
|
<nav id='topic-progress' title="{{i18n topic.progress.title}}" {{bindAttr class="controller.hideProgress:hidden"}}>
|
|
<button id='jump-top' title="{{i18n topic.progress.jump_top}}" {{action jumpTop target="controller"}}><i class="icon-circle-arrow-up"></i></button>
|
|
<div class='nums'>
|
|
<h4 title="{{i18n topic.progress.current}}">{{view.progressPosition}}</h4> <span>{{i18n of_value}}</span> <h4>{{content.highest_post_number}}</h4>
|
|
</div>
|
|
<button id='jump-bottom' title="{{i18n topic.progress.jump_bottom}}" {{action jumpBottom target="controller"}}><i class="icon-circle-arrow-down"></i></button>
|
|
<div class='bg'> </div>
|
|
</nav>
|
|
</div>
|
|
|
|
{{#if view.loadingAbove}}
|
|
<div class='spinner'>{{i18n loading}}</div>
|
|
{{/if}}
|
|
{{view Discourse.TopicPostsView contentBinding="content.posts" topicViewBinding="view"}}
|
|
|
|
{{#if view.loadingBelow}}
|
|
<div class='spinner'>{{i18n loading}}</div>
|
|
{{/if}}
|
|
</div>
|
|
<div id='topic-bottom'></div>
|
|
|
|
{{#if view.loading}}
|
|
{{#unless view.loadingBelow}}
|
|
<div class='spinner small'>{{i18n loading}}</div>
|
|
{{/unless}}
|
|
{{else}}
|
|
{{#if view.fullyLoaded}}
|
|
{{view Discourse.TopicFooterButtonsView topicBinding="controller.content"}}
|
|
|
|
{{#if controller.content.suggested_topics}}
|
|
<div id='suggested-topics'>
|
|
|
|
<h3>{{i18n suggested_topics.title}}</h3>
|
|
|
|
<div class='topics'>
|
|
<table id="topic-list">
|
|
<tr>
|
|
<th>
|
|
{{i18n topic.title}}
|
|
</th>
|
|
<th>{{i18n category_title}}</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>
|
|
|
|
{{each controller.content.suggested_topics tagName="tbody" itemTagName="tr" itemViewClass="Discourse.SuggestedTopicView"}}
|
|
</table>
|
|
</div>
|
|
<br/>
|
|
<h3>{{{unbound view.browseMoreMessage}}}</h3>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
|
|
</section>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
{{#if message}}
|
|
<div class='container'>
|
|
<div class='message'>
|
|
|
|
<h2>{{message}}</h2>
|
|
|
|
<p>
|
|
{{#linkTo list.popular}}{{i18n topic.back_to_list}}{{/linkTo}}
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class='container'>
|
|
<div class='spinner'>{{i18n loading}}</div>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
{{#if controller.filter}}
|
|
<div id='topic-filter'>
|
|
{{filterDesc}}
|
|
<a href='#' {{action cancelFilter target="controller"}}>{{i18n topic.filters.cancel}}</a>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{render share}}
|
|
{{render quoteButton}}
|
|
|
|
{{#if Discourse.currentUser.admin}}
|
|
{{render topicAdminMenu controller.content}}
|
|
{{/if}}
|