FIX: Missing topic status icons in header

This commit is contained in:
Robin Ward 2016-04-25 13:47:57 -04:00
parent 8bad3c0eb5
commit 6978171f46
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D

View File

@ -11,6 +11,8 @@ function renderIcon(name, key, canAct) {
}
export default createWidget('topic-status', {
tagName: 'div.topic-statuses',
html(attrs) {
const topic = attrs.topic;
const canAct = this.currentUser && !attrs.disableActions;
@ -26,13 +28,13 @@ export default createWidget('topic-status', {
if (topic.get('closed') && topic.get('archived')) {
renderIcon('lock', 'locked_and_archived');
} else {
renderIconIf('topic.closed', 'lock', 'locked');
renderIconIf('topic.archived', 'lock', 'archived');
renderIconIf('closed', 'lock', 'locked');
renderIconIf('archived', 'lock', 'archived');
}
renderIconIf('topic.pinned', 'thumb-tack', 'pinned');
renderIconIf('topic.unpinned', 'thumb-tack', 'unpinned');
renderIconIf('topic.invisible', 'eye-slash', 'invisible');
renderIconIf('pinned', 'thumb-tack', 'pinned');
renderIconIf('unpinned', 'thumb-tack', 'unpinned');
renderIconIf('invisible', 'eye-slash', 'invisible');
return result;
}