mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
Improve tooltip on categories stats.
This commit is contained in:
@@ -136,12 +136,20 @@ Discourse.Category = Discourse.Model.extend({
|
||||
return this.get('topicTrackingState').countNew(this.get('name'));
|
||||
}.property('topicTrackingState.messageCount'),
|
||||
|
||||
totalTopicsTitle: function() {
|
||||
return I18n.t('categories.total_topics', {count: this.get('topic_count')});
|
||||
topicStatsTitle: function() {
|
||||
var string = I18n.t('categories.topic_stats');
|
||||
_.each(this.get('topicCountStats'), function(stat) {
|
||||
string += ' ' + I18n.t('categories.topic_stat_sentence', {count: stat.value, unit: stat.unit});
|
||||
}, this);
|
||||
return string;
|
||||
}.property('post_count'),
|
||||
|
||||
totalPostsTitle: function() {
|
||||
return I18n.t('categories.total_posts', {count: this.get('post_count')});
|
||||
postStatsTitle: function() {
|
||||
var string = I18n.t('categories.post_stats');
|
||||
_.each(this.get('postCountStats'), function(stat) {
|
||||
string += ' ' + I18n.t('categories.post_stat_sentence', {count: stat.value, unit: stat.unit});
|
||||
}, this);
|
||||
return string;
|
||||
}.property('post_count'),
|
||||
|
||||
topicCountStats: function() {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</div>
|
||||
{{/each}}
|
||||
</td>
|
||||
<td class='stats' {{bindAttr title="totalTopicsTitle"}}>
|
||||
<td class='stats' {{bindAttr title="topicStatsTitle"}}>
|
||||
<table class="categoryStats">
|
||||
{{#each topicCountStats}}
|
||||
<tr>
|
||||
@@ -89,7 +89,7 @@
|
||||
{{/each}}
|
||||
</table>
|
||||
</td>
|
||||
<td class='stats' {{bindAttr title="totalPostsTitle"}}>
|
||||
<td class='stats' {{bindAttr title="postStatsTitle"}}>
|
||||
<table class="categoryStats">
|
||||
{{#each postCountStats}}
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user