mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
UX: adjust to show all and stat period
This commit is contained in:
parent
1078d929cd
commit
034dc52beb
2 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,6 @@ CategoryList.reopenClass({
|
|||
c.topics = c.topics.map(t => Discourse.Topic.create(t));
|
||||
}
|
||||
|
||||
c["pick" + statPeriod[0].toUpperCase() + statPeriod.slice(1)] = true;
|
||||
|
||||
switch(statPeriod) {
|
||||
case "week":
|
||||
|
@ -47,11 +46,13 @@ CategoryList.reopenClass({
|
|||
if (stat > 0) {
|
||||
c.stat = `<span class="value">${stat}</span> / <span class="unit">${unit}</span>`;
|
||||
c.statTitle = I18n.t("categories.topic_stat_sentence", { count: stat, unit: unit });
|
||||
c["pick" + statPeriod[0].toUpperCase() + statPeriod.slice(1)] = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
c.stat = `<span class="value">${c.topics_all_time}</span>`;
|
||||
c.statTitle = I18n.t("categories.topic_sentence", { count: c.topics_all_time });
|
||||
c.pickAll = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,9 +33,8 @@
|
|||
|
||||
</table>
|
||||
<footer class="clearfix">
|
||||
{{#if c.pickAll}}
|
||||
|
||||
<figure title="{{i18n 'all_time_desc'}}">{{number c.topics_all_time}} <figcaption>{{i18n 'all_time'}}</figcaption></figure>
|
||||
{{/if}}
|
||||
|
||||
{{#if c.pickMonth}}
|
||||
<figure title="{{i18n 'month_desc'}}">{{number c.topics_month}} <figcaption>{{i18n 'month'}}</figcaption></figure>
|
||||
|
|
Loading…
Reference in a new issue