mirror of
https://github.com/flarum/core.git
synced 2025-08-10 18:35:56 +02:00
Make the category in the discussion hero a link
This commit is contained in:
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) {
|
extend(DiscussionHero.prototype, 'items', function(items) {
|
||||||
var category = this.props.discussion.category();
|
var category = this.props.discussion.category();
|
||||||
if (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';
|
items.title.content.wrapperClass = 'block-item';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user