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/components/topic-status.hbs
Blake Erickson 1c7305c0f1 DEV: Remove buffered rendering from topic-status
This is another refactoring in the multi-step process to remove all uses
of our custom Render Buffer.

Previous commit: 006e5904be in this
series.

This commit affects the icons next to the topic title that indicate if
it is closed, unlisted, pinned, etc. It is just a refactor and should
not change any functionality.

Originally I was going to continue to use the existing
topic-status-icons arrayProxy helper but this would require using
observers, so I opted instead to use computed properties and have a bit
larger hbs template.
2019-12-17 10:35:05 -07:00

30 lines
1.0 KiB
Handlebars

{{~#if topicClosedArchived~}}
<span class='topic-status' title={{closedArchivedTitle}}>{{closedArchivedIcon}}</span>
{{~/if~}}
{{~#if closedIcon~}}
<span class='topic-status' title={{closedTitle}}>{{closedIcon}}</span>
{{~/if~}}
{{~#if archivedIcon~}}
<span class='topic-status' title={{archivedTitle}}>{{archivedIcon}}</span>
{{~/if~}}
{{~#if topicWarning~}}
<span class='topic-status' title={{warningTitle}}>{{warningIcon}}</span>
{{~/if~}}
{{~#if topicPinned~}}
{{~#if canAct~}}
<a href="" class='topic-status' title={{pinnedTitle}}>{{pinnedIcon}}</a>
{{~else~}}
<span class='topic-status' title={{pinnedTitle}}>{{pinnedIcon}}</span>
{{~/if~}}
{{~/if~}}
{{~#if topicUnpinned~}}
{{~#if canAct~}}
<a href="" class='topic-status' title={{unpinnedTitle}}>{{unpinnedIcon}}</a>
{{~else~}}
<span class='topic-status' title={{unpinnedTitle}}>{{unpinnedIcon}}</span>
{{~/if~}}
{{~/if~}}
{{~#if topicInvisible~}}
<span class='topic-status' title={{invisibleTitle}}>{{invisibleIcon}}</span>
{{~/if~}}