Category boxes with feature topics will show pins and locks as bullet for pinned and closed/archived topics

This commit is contained in:
Neil Lalonde 2017-03-21 12:23:10 -04:00
parent df246c79b6
commit 2836d548fb
4 changed files with 20 additions and 5 deletions

View File

@ -0,0 +1,14 @@
import computed from 'ember-addons/ember-computed-decorators';
export default Ember.Component.extend({
tagName: "li",
classNameBindings: ['topicStatusIcon'],
@computed('topic.pinned', 'topic.closed', 'topic.archived')
topicStatusIcon() {
if(this.get('topic.pinned')) { return 'topic-pinned'; }
if(this.get('topic.closed')) { return 'topic-closed'; }
if(this.get('topic.archived')) { return 'topic-archived'; }
return 'topic-open';
}
});

View File

@ -0,0 +1,3 @@
<a class='title' href="{{unbound topic.lastUnreadUrl}}">
{{text-overflow class="overflow" text=topic.fancyTitle}}
</a>

View File

@ -20,11 +20,7 @@
{{#if c.topics}} {{#if c.topics}}
<ul> <ul>
{{#each c.topics as |topic|}} {{#each c.topics as |topic|}}
<li> {{categories-boxes-topic topic=topic}}
<a class='title' href="{{unbound topic.lastUnreadUrl}}">
{{text-overflow class="overflow" text=topic.fancyTitle}}
</a>
</li>
{{/each}} {{/each}}
</ul> </ul>
{{/if}} {{/if}}

View File

@ -309,5 +309,7 @@
float: left; float: left;
margin-left: -1.5em; margin-left: -1.5em;
} }
li.topic-pinned:before { content: '\f08d'; }
li.topic-closed:before, li.topic-archived:before { content: '\f023'; }
} }
} }