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";
|
|
|
|
import computed from "ember-addons/ember-computed-decorators";
|
2017-11-21 05:53:09 -05:00
|
|
|
|
|
|
|
export default CategoryRowComponent.extend({
|
|
|
|
layoutName: "select-kit/templates/components/category-row",
|
|
|
|
classNames: "none category-row",
|
|
|
|
|
2018-02-14 05:03:33 -05:00
|
|
|
@computed("category")
|
|
|
|
badgeForCategory(category) {
|
|
|
|
return categoryBadgeHTML(category, {
|
|
|
|
link: this.get("categoryLink"),
|
|
|
|
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
|
|
|
}
|
|
|
|
});
|