diff --git a/app/assets/javascripts/discourse/models/category.js.es6 b/app/assets/javascripts/discourse/models/category.js.es6 index 0e576a4b8f..faeaf1d926 100644 --- a/app/assets/javascripts/discourse/models/category.js.es6 +++ b/app/assets/javascripts/discourse/models/category.js.es6 @@ -85,6 +85,14 @@ const Category = RestModel.extend({ return notificationLevel === NotificationLevels.MUTED; }, + @discourseComputed("notification_level") + notificationLevelString(notificationLevel) { + // Get the key from the value + return Object.keys(NotificationLevels) + .find(key => NotificationLevels[key] === notificationLevel) + .toLowerCase(); + }, + @discourseComputed("name") url() { return Discourse.getURL(`/c/${Category.slugFor(this)}/${this.id}`); diff --git a/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs b/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs index cd39c3751f..888eefce97 100644 --- a/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs +++ b/app/assets/javascripts/discourse/templates/components/categories-boxes.hbs @@ -1,5 +1,5 @@ {{#each categories as |c|}} -
| {{category-title-link tagName="h4" category=subcategory}} {{#if subcategory.description_excerpt}} |