Add site setting show_create_topics_notice as a way to hide the 'Create at least 5 topics to get discussion started' message.

This commit is contained in:
Neil Lalonde 2014-05-26 11:13:04 -04:00
parent e5a8c606d4
commit 8c3770c0b0
3 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,7 @@ window.Discourse = Ember.Application.createWithMixins(Discourse.Ajax, {
notices.push(I18n.t("read_only_mode.enabled")); notices.push(I18n.t("read_only_mode.enabled"));
} }
if(Discourse.User.currentProp('admin')) { if(Discourse.User.currentProp('admin') && Discourse.SiteSettings.show_create_topics_notice) {
var topic_count = _.reduce(Discourse.Site.currentProp('categories'), function(sum,c) { var topic_count = _.reduce(Discourse.Site.currentProp('categories'), function(sum,c) {
return sum + (c.get('read_restricted') ? 0 : c.get('topic_count')); return sum + (c.get('read_restricted') ? 0 : c.get('topic_count'));
}, 0); }, 0);

View File

@ -904,6 +904,7 @@ en:
tos_accept_required: "If enabled, users will need to check a box on the signup form to confirm that they accept the terms of service. Edit 'Signup Form: Terms of Service Message' in the Content tab to change the message." tos_accept_required: "If enabled, users will need to check a box on the signup form to confirm that they accept the terms of service. Edit 'Signup Form: Terms of Service Message' in the Content tab to change the message."
notify_about_flags_after: "If there are flags that haven't been handled after this many hours, send an email to the contact_email. Set to 0 to disable." notify_about_flags_after: "If there are flags that haven't been handled after this many hours, send an email to the contact_email. Set to 0 to disable."
enable_cdn_js_debugging: "Allow /logs to display proper errors by adding crossorigin permissions on all js includes" enable_cdn_js_debugging: "Allow /logs to display proper errors by adding crossorigin permissions on all js includes"
show_create_topics_notice: "If the site has fewer than 5 public topics, show a notice asking admins to create some topics."
notification_types: notification_types:
mentioned: "%{display_username} mentioned you in %{link}" mentioned: "%{display_username} mentioned you in %{link}"

View File

@ -547,3 +547,7 @@ uncategorized:
default: '' default: ''
enable_cdn_js_debugging: true enable_cdn_js_debugging: true
show_create_topics_notice:
client: true
default: true