This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/category-logo-link.js.es6
2015-12-29 09:45:40 -08:00

12 lines
362 B
JavaScript

export default Em.Component.extend({
tagName: 'a',
attributeBindings: ['href'],
href: function() {
return Discourse.getURL('/c/') + Discourse.Category.slugFor(this.get('category'));
}.property(),
render(buffer) {
const categoryLogo = this.get('category.logo_url');
buffer.push(`<img class="category-logo" src='${categoryLogo}'/>`);
}
});