DEV: Add class to header-topic-info widget (#9475)
This commit is contained in:
parent
0a3cc22cec
commit
e5233f5ce6
|
@ -57,6 +57,10 @@ createWidget("topic-header-participant", {
|
|||
export default createWidget("header-topic-info", {
|
||||
tagName: "div.extra-info-wrapper",
|
||||
|
||||
buildClasses(attrs) {
|
||||
return this.showCategory(attrs.topic) ? "two-rows" : "";
|
||||
},
|
||||
|
||||
buildFancyTitleClass() {
|
||||
const baseClass = ["topic-link"];
|
||||
const flatten = array => [].concat.apply([], array);
|
||||
|
@ -112,11 +116,7 @@ export default createWidget("header-topic-info", {
|
|||
const category = topic.get("category");
|
||||
|
||||
if (loaded || category) {
|
||||
if (
|
||||
category &&
|
||||
(!category.get("isUncategorizedCategory") ||
|
||||
!this.siteSettings.suppress_uncategorized_badge)
|
||||
) {
|
||||
if (this.showCategory(topic)) {
|
||||
const parentCategory = category.get("parentCategory");
|
||||
const categories = [];
|
||||
if (parentCategory) {
|
||||
|
@ -208,6 +208,14 @@ export default createWidget("header-topic-info", {
|
|||
);
|
||||
},
|
||||
|
||||
showCategory(topic) {
|
||||
return (
|
||||
topic.category &&
|
||||
(!topic.category.isUncategorizedCategory ||
|
||||
!this.siteSettings.suppress_uncategorized_badge)
|
||||
);
|
||||
},
|
||||
|
||||
jumpToTopPost() {
|
||||
const topic = this.attrs.topic;
|
||||
if (topic) {
|
||||
|
|
Loading…
Reference in New Issue