UX: Show the category name even if there's an image. It's too confusing

otherwise for many sites.
This commit is contained in:
Robin Ward 2014-07-28 16:03:13 -04:00
parent 8603f492c7
commit 380411457a
1 changed files with 2 additions and 9 deletions

View File

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