Add header-topic-info:after-tags extension point
This commit is contained in:
parent
bcbe474856
commit
7d8a11f636
|
@ -9,7 +9,7 @@ import { topicFeaturedLinkNode } from 'discourse/lib/render-topic-featured-link'
|
||||||
export default createWidget('header-topic-info', {
|
export default createWidget('header-topic-info', {
|
||||||
tagName: 'div.extra-info-wrapper',
|
tagName: 'div.extra-info-wrapper',
|
||||||
|
|
||||||
html(attrs) {
|
html(attrs, state) {
|
||||||
const topic = attrs.topic;
|
const topic = attrs.topic;
|
||||||
|
|
||||||
const heading = [];
|
const heading = [];
|
||||||
|
@ -45,13 +45,16 @@ export default createWidget('header-topic-info', {
|
||||||
title.push(this.attach('category-link', { category }));
|
title.push(this.attach('category-link', { category }));
|
||||||
}
|
}
|
||||||
|
|
||||||
const extra = [];
|
let extra = [];
|
||||||
if (this.siteSettings.tagging_enabled) {
|
if (this.siteSettings.tagging_enabled) {
|
||||||
const tags = topic.get('tags') || [];
|
const tags = topic.get('tags') || [];
|
||||||
if (tags.length) {
|
if (tags.length) {
|
||||||
extra.push(h('div.list-tags', tags.map(tagNode)));
|
extra.push(h('div.list-tags', tags.map(tagNode)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extra = extra.concat(applyDecorators(this, 'after-tags', attrs, state));
|
||||||
|
|
||||||
if (this.siteSettings.topic_featured_link_enabled) {
|
if (this.siteSettings.topic_featured_link_enabled) {
|
||||||
const featured = topicFeaturedLinkNode(attrs.topic);
|
const featured = topicFeaturedLinkNode(attrs.topic);
|
||||||
if (featured) {
|
if (featured) {
|
||||||
|
|
Loading…
Reference in New Issue