{{#if model}}
{{discourse-banner user=currentUser banner=site.banner overlay=view.hasScrolled hide=model.errorLoading}}
{{/if}} {{plugin-outlet "topic-above-post-stream"}} {{#if model.postStream.loaded}} {{#if model.postStream.firstPostPresent}}
{{#if editingTopic}} {{#if model.isPrivateMessage}} {{fa-icon "envelope"}} {{/if}} {{text-field id="edit-title" value=buffered.title maxlength=siteSettings.max_topic_title_length autofocus="true"}} {{#if showCategoryChooser}}
{{category-chooser valueAttribute="id" value=buffered.category_id source=buffered.category_id}} {{/if}} {{plugin-outlet "edit-topic"}} {{d-button action="finishedEditingTopic" class="btn-primary btn-small submit-edit" icon="check"}} {{d-button action="cancelEditingTopic" class="btn-small cancel-edit" icon="times"}} {{else}}

{{#unless model.is_warning}} {{fa-icon "envelope"}} {{/unless}} {{#if model.details.loaded}} {{topic-status topic=model}} {{{model.fancyTitle}}} {{/if}} {{#if model.details.can_edit}} {{fa-icon "pencil"}} {{/if}}

{{#unless model.isPrivateMessage}} {{topic-category topic=model}} {{/unless}} {{/if}}
{{plugin-outlet "topic-title"}}
{{/if}}
{{view "selected-posts"}}
{{render "topic-progress"}} {{conditional-loading-spinner condition=model.postStream.loadingAbove}} {{#unless model.postStream.loadingFilter}} {{scrolling-post-stream posts=postsToRender canCreatePost=model.details.can_create_post multiSelect=multiSelect selectedPostsCount=selectedPostsCount selectedQuery=selectedQuery gaps=model.postStream.gaps showFlags="showFlags" editPost="editPost" showHistory="showHistory" showRawEmail="showRawEmail" deletePost="deletePost" recoverPost="recoverPost" expandHidden="expandHidden" newTopicAction="replyAsNewTopic" expandFirstPost="expandFirstPost" toggleBookmark="toggleBookmark" togglePostType="togglePostType" rebakePost="rebakePost" changePostOwner="changePostOwner" unhidePost="unhidePost" replyToPost="replyToPost" toggleWiki="toggleWiki" toggleParticipant="toggleParticipant" toggleSummary="toggleSummary" removeAllowedUser="removeAllowedUser" showInvite="showInvite" topVisibleChanged="topVisibleChanged" bottomVisibleChanged="bottomVisibleChanged" selectPost="toggledSelectedPost" selectReplies="toggledSelectedPostReplies" fillGapBefore="fillGapBefore" fillGapAfter="fillGapAfter"}} {{/unless}}
{{#conditional-loading-spinner condition=model.postStream.loadingFilter}} {{#if loadedAllPosts}} {{view "topic-closing" topic=model}} {{#if session.showSignupCta}} {{! replace "Log In to Reply" with the infobox }} {{signup-cta}} {{else}} {{view "topic-footer-buttons" topic=model}} {{/if}} {{#if model.pending_posts_count}}
{{{i18n "queue.has_pending_posts" count=model.pending_posts_count}}} {{#if currentUser.show_queued_posts}} {{#link-to "queued-posts"}} {{fa-icon "check"}} {{i18n "queue.view_pending"}} {{/link-to}} {{/if}}
{{/if}} {{plugin-outlet "topic-above-suggested"}} {{#if model.details.suggested_topics.length}}

{{{view.suggestedTitle}}}

{{#if model.isPrivateMessage}} {{basic-topic-list hideCategory="true" showPosters="true" topics=model.details.suggested_topics postsAction="showTopicEntrance"}} {{else}} {{basic-topic-list topics=model.details.suggested_topics postsAction="showTopicEntrance"}} {{/if}}

{{{view.browseMoreMessage}}}

{{/if}} {{/if}} {{/conditional-loading-spinner}}
{{else}}
{{#conditional-loading-spinner condition=noErrorYet}} {{#if model.notFoundHtml}}
{{{model.notFoundHtml}}}
{{else}}
{{model.message}}
{{#if model.noRetry}} {{#unless currentUser}} {{d-button action="showLogin" class="btn-primary topic-retry" icon="user" label="log_in"}} {{/unless}} {{else}} {{d-button action="retryLoading" class="btn-primary topic-retry" icon="refresh" label="errors.buttons.again"}} {{/if}}
{{conditional-loading-spinner condition=retrying}} {{/if}} {{/conditional-loading-spinner}}
{{/if}} {{render "share"}} {{#if currentUser.enable_quoting}} {{render "quote-button"}} {{/if}} {{#if currentUser.canManageTopic}} {{show-popup-button action="showTopicAdminMenu" class="show-topic-admin" title="topic_admin_menu" icon="wrench"}} {{#popup-menu visible=adminMenuVisible hide="hideTopicAdminMenu" title="admin_title" extraClasses="topic-admin-popup-menu"}}
  • {{d-button action="toggleMultiSelect" icon="tasks" label="topic.actions.multi_select"}}
  • {{#if model.details.can_delete}}
  • {{d-button action="deleteTopic" icon="trash-o" label="topic.actions.delete" class="btn-danger"}}
  • {{/if}} {{#if showRecover}}
  • {{d-button action="recoverTopic" icon="undo" label="topic.actions.recover"}}
  • {{/if}}
  • {{#if model.closed}} {{d-button action="toggleClosed" icon="unlock" label="topic.actions.open"}} {{else}} {{d-button action="toggleClosed" icon="lock" label="topic.actions.close"}} {{d-button action="showAutoClose" icon="clock-o" label="topic.actions.auto_close"}} {{/if}}
  • {{#unless model.isPrivateMessage}} {{#if model.visible}}
  • {{#if isFeatured}} {{d-button action="showFeatureTopic" icon="thumb-tack" label="topic.actions.unpin"}} {{else}} {{d-button action="showFeatureTopic" icon="thumb-tack" label="topic.actions.pin"}} {{/if}}
  • {{/if}} {{/unless}}
  • {{d-button action="showChangeTimestamp" icon="calendar" label="topic.change_timestamp.title"}}
  • {{#if model.archived}} {{d-button action="toggleArchived" icon="folder" label="topic.actions.unarchive"}} {{else}} {{#unless model.isPrivateMessage}} {{d-button action="toggleArchived" icon="folder" label="topic.actions.archive"}} {{/unless}} {{/if}}
  • {{#if model.visible}} {{d-button action="toggleVisibility" icon="eye-slash" label="topic.actions.invisible"}} {{else}} {{d-button action="toggleVisibility" icon="eye" label="topic.actions.visible"}} {{/if}}
  • {{plugin-outlet "topic-admin-menu-buttons"}} {{/popup-menu}} {{/if}}