2017-11-21 05:53:09 -05:00
|
|
|
import CategoryRowComponent from "select-kit/components/category-row";
|
2018-02-14 05:03:33 -05:00
|
|
|
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
2019-11-07 16:38:28 -05:00
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
2017-11-21 05:53:09 -05:00
|
|
|
|
|
|
|
export default CategoryRowComponent.extend({
|
|
|
|
layoutName: "select-kit/templates/components/category-row",
|
|
|
|
classNames: "none category-row",
|
|
|
|
|
2019-11-07 16:38:28 -05:00
|
|
|
@discourseComputed("category")
|
2018-02-14 05:03:33 -05:00
|
|
|
badgeForCategory(category) {
|
|
|
|
return categoryBadgeHTML(category, {
|
2019-05-27 04:15:39 -04:00
|
|
|
link: this.categoryLink,
|
2018-02-14 05:03:33 -05:00
|
|
|
allowUncategorized: true,
|
2018-02-14 10:42:20 -05:00
|
|
|
hideParent: true
|
2018-02-14 05:03:33 -05:00
|
|
|
}).htmlSafe();
|
2017-11-21 05:53:09 -05:00
|
|
|
}
|
|
|
|
});
|