mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
add links to Top Categories on user summary page
This commit is contained in:
parent
31a597797c
commit
8e5e7c6b43
3 changed files with 19 additions and 2 deletions
|
@ -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}}
|
{{category-link category allowUncategorized="true" hideParent=false}}
|
||||||
</td>
|
</td>
|
||||||
<td class='topic-count'>
|
<td class='topic-count'>
|
||||||
{{category.topic_count}}
|
{{user-summary-category-search user=user category=category count=category.topic_count}}
|
||||||
</td>
|
</td>
|
||||||
<td class='reply-count'>
|
<td class='reply-count'>
|
||||||
{{category.post_count}}
|
{{user-summary-category-search user=user category=category count=category.post_count}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue