mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 22:26:26 +08:00
Merge pull request #3939 from scossar/clickable-category-logo
FEATURE: make category logo clickable
This commit is contained in:
commit
a42826f2ae
|
@ -0,0 +1,12 @@
|
|||
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}'/>`);
|
||||
}
|
||||
});
|
|
@ -16,7 +16,7 @@
|
|||
{{category-title-link category=c}}
|
||||
{{category-unread category=c}}
|
||||
{{#if c.logo_url}}
|
||||
<img class="category-logo" src={{c.logo_url}}>
|
||||
{{category-logo-link category=c}}
|
||||
{{/if}}
|
||||
|
||||
<div class="category-description">
|
||||
|
|
Loading…
Reference in New Issue
Block a user