mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
22 lines
646 B
JavaScript
22 lines
646 B
JavaScript
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({
|
|
layoutName: "select-kit/templates/components/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() {
|
|
this.sendAction("clearSelection");
|
|
}
|
|
});
|