135 lines
4.4 KiB
Handlebars
135 lines
4.4 KiB
Handlebars
{{view Discourse.HtmlView key="top"}}
|
|
|
|
{{#if postStream.loaded}}
|
|
|
|
{{#if postStream.firstPostPresent}}
|
|
<div id='topic-title'>
|
|
<div class='container'>
|
|
<div class='inner'>
|
|
|
|
{{#if showFavoriteButton}}
|
|
<a {{bindAttr class=":star starred:starred"}} {{action toggleStar}} href='#' {{bindAttr title="favoriteTooltip"}}></a>
|
|
{{/if}}
|
|
|
|
{{#if editingTopic}}
|
|
{{categoryChooser valueAttribute="id" value=newCategoryId source=category_id}}
|
|
{{textField id='edit-title' value=newTitle}}
|
|
|
|
<button class='btn btn-primary btn-small' {{action finishedEditingTopic}}><i class='fa fa-check'></i></button>
|
|
<button class='btn btn-small' {{action cancelEditingTopic}}><i class='fa fa-times'></i></button>
|
|
{{else}}
|
|
<h1>
|
|
{{boundCategoryLink category}}
|
|
{{#if details.loaded}}
|
|
{{topicStatus topic=model}}
|
|
<a href='{{unbound url}}'>
|
|
{{#if topicSaving}}
|
|
{{fancy_title}}
|
|
{{else}}
|
|
{{{fancy_title}}}
|
|
{{/if}}
|
|
</a>
|
|
{{/if}}
|
|
|
|
|
|
{{#if details.can_edit}}
|
|
<a href='#' {{action editTopic}} class='edit-topic' title='{{i18n edit}}'><i class="fa fa-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 id}}'>
|
|
<div class='posts-wrapper'>
|
|
<div id='topic-progress-wrapper' {{bindAttr class="dockedCounter:docked"}}>
|
|
<nav id='topic-progress' title="{{i18n topic.progress.title}}" {{bindAttr class="hideProgress:hidden"}}>
|
|
<button id='jump-top' title="{{i18n topic.progress.jump_top}}" {{bindAttr disabled="jumpTopDisabled"}} {{action jumpTop}}><i class="fa fa-arrow-circle-up"></i></button>
|
|
<div class='nums' {{bindAttr title="progressPositionTitle"}}>
|
|
<h4>{{progressPosition}}</h4><span {{bindAttr class="hugeNumberOfPosts:hidden"}}> <span>{{i18n of_value}}</span> <h4>{{postStream.filteredPostsCount}}</h4></span>
|
|
</div>
|
|
<button id='jump-bottom' {{bindAttr title="jumpToBottomTitle"}} {{bindAttr disabled="jumpBottomDisabled"}} {{action jumpBottom}}><i class="fa fa-arrow-circle-down"></i></button>
|
|
<div class='bg'> </div>
|
|
</nav>
|
|
</div>
|
|
|
|
{{#if postStream.loadingAbove}}
|
|
<div class='spinner'>{{i18n loading}}</div>
|
|
{{/if}}
|
|
|
|
{{#unless postStream.loadingFilter}}
|
|
{{cloaked-collection cloakView="post" idProperty="post_number" defaultHeight="200" content=postStream.posts slackRatio=slackRatio}}
|
|
{{/unless}}
|
|
|
|
{{#if postStream.loadingBelow}}
|
|
<div class='spinner'>{{i18n loading}}</div>
|
|
{{/if}}
|
|
</div>
|
|
<div id='topic-bottom'></div>
|
|
|
|
{{#if postStream.loadingFilter}}
|
|
<div class='spinner small'>{{i18n loading}}</div>
|
|
{{else}}
|
|
{{#if postStream.loadedAllPosts}}
|
|
|
|
{{view Discourse.TopicClosingView topicBinding="model"}}
|
|
{{view Discourse.TopicFooterButtonsView topicBinding="model"}}
|
|
|
|
{{#if details.suggested_topics.length}}
|
|
<div id='suggested-topics'>
|
|
<h3>{{i18n suggested_topics.title}}</h3>
|
|
<div class='topics'>
|
|
{{basic-topic-list topics=details.suggested_topics}}
|
|
</div>
|
|
<br/>
|
|
<h3>{{{view.browseMoreMessage}}}</h3>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
|
|
</section>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
{{#if hasError}}
|
|
<div class='container'>
|
|
{{#if errorBodyHtml}}
|
|
{{{errorBodyHtml}}}
|
|
{{/if}}
|
|
|
|
{{#if message}}
|
|
<div class="message">
|
|
<h2>{{message}}</h2>
|
|
</div>
|
|
{{/if}}
|
|
|
|
</div>
|
|
{{else}}
|
|
<div class='container'>
|
|
<div class='spinner'>{{i18n loading}}</div>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
{{render share}}
|
|
{{render posterExpansion}}
|
|
|
|
{{#if currentUser.enable_quoting}}
|
|
{{render quoteButton}}
|
|
{{/if}}
|
|
|
|
{{#if currentUser.staff}}
|
|
{{render topicAdminMenu content}}
|
|
{{/if}}
|
|
|
|
{{view Discourse.HtmlView key="bottom"}}
|