add links to Top Categories on user summary page

This commit is contained in:
Neil Lalonde 2018-07-22 13:42:07 -04:00
parent 31a597797c
commit 8e5e7c6b43
3 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1,10 @@
import computed from "ember-addons/ember-computed-decorators";
export default Ember.Component.extend({
tagName: "",
@computed("user", "category")
searchParams() {
return `@${this.get("user.username")} #${this.get("category.slug")}`;
}
});

View File

@ -0,0 +1,7 @@
{{#if count}}
{{#link-to 'full-page-search' (query-params q=searchParams)}}
{{count}}
{{/link-to}}
{{else}}
–
{{/if}}

View File

@ -131,10 +131,10 @@
{{category-link category allowUncategorized="true" hideParent=false}}
</td>
<td class='topic-count'>
{{category.topic_count}}
{{user-summary-category-search user=user category=category count=category.topic_count}}
</td>
<td class='reply-count'>
{{category.post_count}}
{{user-summary-category-search user=user category=category count=category.post_count}}
</td>
</tr>
{{/each}}