From bded4b26fa323e97f0bb15ec65ee82aa677bb29d Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Wed, 11 Sep 2013 16:32:49 -0400 Subject: [PATCH] Ask admins to fill in site_description on the dashboard, and send it to the hub --- app/models/admin_dashboard_data.rb | 5 +++++ config/locales/server.en.yml | 1 + lib/discourse_hub.rb | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/models/admin_dashboard_data.rb b/app/models/admin_dashboard_data.rb index bef368261ec..30b5f3e555f 100644 --- a/app/models/admin_dashboard_data.rb +++ b/app/models/admin_dashboard_data.rb @@ -36,6 +36,7 @@ class AdminDashboardData contact_email_check, send_consumer_email_check, title_check, + site_description_check, access_password_removal, site_contact_username_check, notification_email_check ].compact @@ -144,6 +145,10 @@ class AdminDashboardData I18n.t('dashboard.title_nag') if SiteSetting.title == SiteSetting.defaults[:title] end + def site_description_check + return I18n.t('dashboard.site_description_missing') if !SiteSetting.site_description.present? + end + def send_consumer_email_check I18n.t('dashboard.consumer_email_warning') if Rails.env == 'production' and ActionMailer::Base.smtp_settings[:address] =~ /gmail\.com|live\.com|yahoo\.com/ end diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 0e1982cc115..937b3d09151 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -402,6 +402,7 @@ en: contact_email_missing: "You haven't provided a contact email for your site. Please update contact_email in the Site Settings." contact_email_invalid: "The site contact email is invalid. Please update contact_email in the Site Settings." title_nag: "The title Site Setting is still set to the default value. Please update it with your site's title in the Site Settings." + site_description_missing: "The site_description setting is blank. Write a brief description of this forum in the Site Settings." consumer_email_warning: "Your site is configured to use Gmail (or another consumer email service) to send email. Gmail limits how many emails you can send. Consider using an email service provider like mandrill.com to ensure email deliverability." access_password_removal: "Your site was using the access_password setting, which has been removed. The login_required and must_approve_users settings have been enabled, which should be used instead. You can change them in the Site Settings. Be sure to approve users in the Pending Users list. (This message will go away after 2 days.)" site_contact_username_warning: "The site_contact_username setting is blank. Please update it in the Site Settings. Set it to the username of an admin user who should be the sender of system messages." diff --git a/lib/discourse_hub.rb b/lib/discourse_hub.rb index eb0e85ddc79..9e699e184d4 100644 --- a/lib/discourse_hub.rb +++ b/lib/discourse_hub.rb @@ -18,7 +18,7 @@ module DiscourseHub ) ) } - end + end end @@ -60,6 +60,7 @@ module DiscourseHub get('/version_check', { installed_version: Discourse::VERSION::STRING, forum_title: SiteSetting.title, + forum_description: SiteSetting.site_description, forum_url: Discourse.base_url, contact_email: SiteSetting.contact_email, topic_count: Topic.listable_topics.count,