157 lines
4.9 KiB
Handlebars
157 lines
4.9 KiB
Handlebars
<div class='container'>
|
|
{{custom-html "top"}}
|
|
{{Discourse.globalNotice}}
|
|
{{discourse-banner user=currentUser banner=Discourse.banner overlay=view.hasScrolled}}
|
|
</div>
|
|
|
|
{{#if postStream.loaded}}
|
|
|
|
{{#if postStream.firstPostPresent}}
|
|
<div id='topic-title'>
|
|
<div class='container'>
|
|
<div class='inner'>
|
|
|
|
{{#if showStarButton}}
|
|
<a {{bind-attr class=":star starred:starred"}} {{action toggleStar}} href='#' {{bind-attr title="starTooltip"}}></a>
|
|
{{/if}}
|
|
|
|
{{#if editingTopic}}
|
|
{{#if isPrivateMessage}}
|
|
<span class="private-message-glyph">{{icon envelope}}</span>
|
|
{{else}}
|
|
{{category-chooser valueAttribute="id" value=newCategoryId source=category_id}}
|
|
{{/if}}
|
|
{{text-field id='edit-title' value=newTitle maxLength=maxTitleLength}}
|
|
|
|
<button class='btn btn-primary btn-small no-text' {{action finishedEditingTopic}}><i class='fa fa-check'></i></button>
|
|
<button class='btn btn-small no-text' {{action cancelEditingTopic}}><i class='fa fa-times'></i></button>
|
|
{{else}}
|
|
<h1>
|
|
<span class="private-message-glyph"><i class='fa fa-envelope'></i></span>
|
|
{{#unless isPrivateMessage}}
|
|
{{#if category.parentCategory}}
|
|
{{bound-category-link category.parentCategory}}
|
|
{{/if}}
|
|
{{bound-category-link category}}
|
|
{{/unless}}
|
|
{{#if details.loaded}}
|
|
{{topic-status topic=model}}
|
|
<a href='{{unbound url}}' {{action jumpTop}}>
|
|
{{#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}}
|
|
{{plugin-outlet "topic-title"}}
|
|
</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'>
|
|
|
|
{{render 'topic-progress'}}
|
|
|
|
{{#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="15"
|
|
loadingHTML=controller.loadingHTML
|
|
preservesContext="true"
|
|
uncloakDefault="true"
|
|
offsetFixedTop="header"
|
|
offsetFixedBottom="#reply-control"}}
|
|
{{/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 'topic-closing' topic=model}}
|
|
{{view 'topic-footer-buttons' topic=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>
|
|
<h3>{{{view.browseMoreMessage}}}</h3>
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
|
|
|
|
</section>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{else}}
|
|
{{#if hasError}}
|
|
<div class='container'>
|
|
<div class="topic-error">
|
|
{{{errorBodyHtml}}}
|
|
|
|
{{#if message}}
|
|
{{message}}
|
|
{{/if}}
|
|
{{#if noRetry}}
|
|
{{#unless currentUser}}
|
|
<button {{action showLogin}} class='btn btn-primary topic-retry'><i class="fa fa-user"></i>{{i18n log_in}}</button>
|
|
{{/unless}}
|
|
{{else}}
|
|
<button class="btn btn-primary topic-retry" {{action retryLoading}}>{{i18n errors.buttons.again}}</button>
|
|
{{/if}}
|
|
</div>
|
|
{{#if retrying}}
|
|
<div class='spinner'>{{i18n loading}}</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 "quote-button"}}
|
|
{{/if}}
|
|
|
|
{{#if currentUser.canManageTopic}}
|
|
{{render "topicAdminMenu" content}}
|
|
{{/if}}
|