mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
add links to Top Categories on user summary page
This commit is contained in:
parent
31a597797c
commit
8e5e7c6b43
|
@ -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")}`;
|
||||
}
|
||||
});
|
|
@ -0,0 +1,7 @@
|
|||
{{#if count}}
|
||||
{{#link-to 'full-page-search' (query-params q=searchParams)}}
|
||||
{{count}}
|
||||
{{/link-to}}
|
||||
{{else}}
|
||||
–
|
||||
{{/if}}
|
|
@ -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}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user