mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 03:59:39 +08:00
Make the category in the discussion hero a link
This commit is contained in:
parent
39c7dd5165
commit
0b12752be3
6
extensions/tags/js/bootstrap.js
vendored
6
extensions/tags/js/bootstrap.js
vendored
@ -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';
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user