mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: add quarterly period to Top page
This commit is contained in:
@@ -106,6 +106,7 @@ const controllerOpts = {
|
||||
new: Discourse.computed.endWith('model.filter', 'new'),
|
||||
top: Em.computed.notEmpty('period'),
|
||||
yearly: Em.computed.equal('period', 'yearly'),
|
||||
quarterly: Em.computed.equal('period', 'quarterly'),
|
||||
monthly: Em.computed.equal('period', 'monthly'),
|
||||
weekly: Em.computed.equal('period', 'weekly'),
|
||||
daily: Em.computed.equal('period', 'daily'),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const TITLE_SUBS = {
|
||||
all: 'all_time',
|
||||
yearly: 'this_year',
|
||||
quarterly: 'this_quarter',
|
||||
monthly: 'this_month',
|
||||
daily: 'today',
|
||||
};
|
||||
@@ -13,6 +14,9 @@ export default Ember.Handlebars.makeBoundHelper(function (period, options) {
|
||||
case 'yearly':
|
||||
dateString = moment().subtract(1, 'year').format(I18n.t('dates.long_with_year_no_time')) + " - " + moment().format(I18n.t('dates.long_with_year_no_time'));
|
||||
break;
|
||||
case 'quarterly':
|
||||
dateString = moment().subtract(3, 'month').format(I18n.t('dates.long_no_year_no_time')) + " - " + moment().format(I18n.t('dates.long_no_year_no_time'));
|
||||
break;
|
||||
case 'weekly':
|
||||
dateString = moment().subtract(1, 'week').format(I18n.t('dates.long_no_year_no_time')) + " - " + moment().format(I18n.t('dates.long_no_year_no_time'));
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user