FIX: regression preventing uncategorized badge to be shown

This commit is contained in:
Joffrey JAFFEUX 2018-02-14 11:03:33 +01:00 committed by GitHub
parent b0eed424f7
commit 5d00a97ae9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -43,7 +43,10 @@ export default SelectKitRowComponent.extend({
@computed("parentCategory") @computed("parentCategory")
badgeForParentCategory(parentCategory) { badgeForParentCategory(parentCategory) {
return categoryBadgeHTML(parentCategory, {link: false}).htmlSafe(); return categoryBadgeHTML(parentCategory, {
link: this.get("categoryLink"),
allowUncategorized: this.get("allowUncategorized")
}).htmlSafe();
}, },
@computed("parentCategoryid") @computed("parentCategoryid")

View File

@ -1,9 +1,20 @@
import CategoryRowComponent from "select-kit/components/category-row"; import CategoryRowComponent from "select-kit/components/category-row";
import { categoryBadgeHTML } from "discourse/helpers/category-link";
import computed from "ember-addons/ember-computed-decorators";
export default CategoryRowComponent.extend({ export default CategoryRowComponent.extend({
layoutName: "select-kit/templates/components/category-row", layoutName: "select-kit/templates/components/category-row",
classNames: "none category-row", classNames: "none category-row",
@computed("category")
badgeForCategory(category) {
return categoryBadgeHTML(category, {
link: this.get("categoryLink"),
allowUncategorized: true,
hideParent: this.get("hideParentCategory")
}).htmlSafe();
},
click() { click() {
this.sendAction("clearSelection"); this.sendAction("clearSelection");
} }