diff --git a/app/assets/javascripts/discourse/components/category-title-link.js.es6 b/app/assets/javascripts/discourse/components/category-title-link.js.es6 index e00efa683..bc30157ca 100644 --- a/app/assets/javascripts/discourse/components/category-title-link.js.es6 +++ b/app/assets/javascripts/discourse/components/category-title-link.js.es6 @@ -1,19 +1,17 @@ +import { iconHTML } from 'discourse/helpers/fa-icon'; + export default Em.Component.extend({ tagName: 'h3', - render: function(buffer) { - var category = this.get('category'), - logoUrl = category.get('logo_url'), - categoryUrl = Discourse.getURL('/c/') + Discourse.Category.slugFor(category), - categoryName = Handlebars.Utils.escapeExpression(category.get('name')); + render(buffer) { + const category = this.get('category'); + const categoryUrl = Discourse.getURL('/c/') + Discourse.Category.slugFor(category); + const categoryName = Handlebars.Utils.escapeExpression(category.get('name')); - if (category.get('read_restricted')) { buffer.push(""); } + if (category.get('read_restricted')) { buffer.push(iconHTML('lock')); } - buffer.push(""); - buffer.push("" + categoryName + ""); - - if (!Em.isEmpty(logoUrl)) { buffer.push(""); } - - buffer.push(""); + buffer.push(``); + buffer.push(`${categoryName}`); + buffer.push(``); } }); diff --git a/app/assets/javascripts/discourse/templates/discovery/categories.hbs b/app/assets/javascripts/discourse/templates/discovery/categories.hbs index 0aa789da0..54545b2d0 100644 --- a/app/assets/javascripts/discourse/templates/discovery/categories.hbs +++ b/app/assets/javascripts/discourse/templates/discovery/categories.hbs @@ -13,34 +13,28 @@