add category name as a css class to topic list item (props to @lagwagon) - closes #3129

This commit is contained in:
Régis Hanol 2015-01-26 18:43:55 +01:00
parent ab4eb353af
commit 3b3c0d7088
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@ export default Discourse.View.extend(StringBuffer, {
var classes = [];
var topic = this.get('topic');
if (topic.get('category')) {
classes.push("category-" + topic.get('category.slug'));
}
if(topic.get('hasExcerpt')){
classes.push('has-excerpt');
}