TWEAK: Show subcategory name even if there is a logo

This commit is contained in:
Robin Ward 2014-07-03 11:31:42 -04:00
parent a4a90475cf
commit f247ea89b0
1 changed files with 9 additions and 2 deletions

View File

@ -11,9 +11,16 @@ export default Em.Component.extend({
buffer.push("<a href='" + Discourse.getURL('/category/') + Discourse.Category.slugFor(category) + "'>"); buffer.push("<a href='" + Discourse.getURL('/category/') + Discourse.Category.slugFor(category) + "'>");
if (Em.isEmpty(logoUrl)) { var noLogo = Em.isEmpty(logoUrl);
if (noLogo || (!Em.isEmpty(category.get('parentCategory')))) {
buffer.push(Handlebars.Utils.escapeExpression(category.get('name'))); buffer.push(Handlebars.Utils.escapeExpression(category.get('name')));
} else {
if (!noLogo) {
buffer.push("<br>");
}
}
if (!noLogo) {
buffer.push("<img src='" + logoUrl + "' class='category-logo'>"); buffer.push("<img src='" + logoUrl + "' class='category-logo'>");
} }
buffer.push("</a>"); buffer.push("</a>");