Merge pull request #3837 from cpradio/top-period-setting-choices
FEATURE: Allow default period to be set for Top Page
This commit is contained in:
commit
81a48af1a3
|
@ -295,7 +295,7 @@ class ListController < ApplicationController
|
||||||
return period if top_topics.count >= SiteSetting.topics_per_period_in_top_page
|
return period if top_topics.count >= SiteSetting.topics_per_period_in_top_page
|
||||||
end
|
end
|
||||||
# default period is yearly
|
# default period is yearly
|
||||||
:yearly
|
SiteSetting.top_page_default_timeframe
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.best_periods_for(date)
|
def self.best_periods_for(date)
|
||||||
|
|
|
@ -891,6 +891,7 @@ en:
|
||||||
topics_per_period_in_top_summary: "Number of top topics shown in the default top topics summary."
|
topics_per_period_in_top_summary: "Number of top topics shown in the default top topics summary."
|
||||||
topics_per_period_in_top_page: "Number of top topics shown on the expanded 'Show More' top topics."
|
topics_per_period_in_top_page: "Number of top topics shown on the expanded 'Show More' top topics."
|
||||||
redirect_users_to_top_page: "Automatically redirect new and long absent users to the top page."
|
redirect_users_to_top_page: "Automatically redirect new and long absent users to the top page."
|
||||||
|
top_page_default_timeframe: "Default timeframe for the top view page."
|
||||||
show_email_on_profile: "Show a user's email on their profile (only visible to themselves and staff)"
|
show_email_on_profile: "Show a user's email on their profile (only visible to themselves and staff)"
|
||||||
|
|
||||||
email_token_valid_hours: "Forgot password / activate account tokens are valid for (n) hours."
|
email_token_valid_hours: "Forgot password / activate account tokens are valid for (n) hours."
|
||||||
|
|
|
@ -164,6 +164,16 @@ basic:
|
||||||
topics_per_period_in_top_page:
|
topics_per_period_in_top_page:
|
||||||
default: 50
|
default: 50
|
||||||
min: 1
|
min: 1
|
||||||
|
top_page_default_timeframe:
|
||||||
|
default: 'yearly'
|
||||||
|
type: enum
|
||||||
|
choices:
|
||||||
|
- all
|
||||||
|
- yearly
|
||||||
|
- quarterly
|
||||||
|
- monthly
|
||||||
|
- weekly
|
||||||
|
- daily
|
||||||
category_featured_topics:
|
category_featured_topics:
|
||||||
client: true
|
client: true
|
||||||
default: 3
|
default: 3
|
||||||
|
|
Loading…
Reference in New Issue