Make the category in the discussion hero a link

This commit is contained in:
Toby Zerner 2015-06-03 18:03:16 +09:30
parent 39c7dd5165
commit 0b12752be3

View File

@ -134,7 +134,11 @@ app.initializers.add('categories', function() {
extend(DiscussionHero.prototype, 'items', function(items) {
var category = this.props.discussion.category();
if (category) {
items.add('category', categoryLabel(category), {before: 'title'});
items.add('category', m('a', {
href: app.route('category', {categories: category.slug()}),
config: m.route
}, categoryLabel(category)), {before: 'title'});
items.title.content.wrapperClass = 'block-item';
}
});