Ask admins to fill in site_description on the dashboard, and send it to the hub
This commit is contained in:
parent
4fa11f159f
commit
bded4b26fa
|
@ -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
|
||||
|
|
|
@ -402,6 +402,7 @@ en:
|
|||
contact_email_missing: "You haven't provided a contact email for your site. Please update contact_email in the <a href='/admin/site_settings'>Site Settings</a>."
|
||||
contact_email_invalid: "The site contact email is invalid. Please update contact_email in the <a href='/admin/site_settings'>Site Settings</a>."
|
||||
title_nag: "The title Site Setting is still set to the default value. Please update it with your site's title in the <a href='/admin/site_settings'>Site Settings</a>."
|
||||
site_description_missing: "The site_description setting is blank. Write a brief description of this forum in the <a href='/admin/site_settings'>Site Settings</a>."
|
||||
consumer_email_warning: "Your site is configured to use Gmail (or another consumer email service) to send email. <a href='http://support.google.com/a/bin/answer.py?hl=en&answer=166852' target='_blank'>Gmail limits how many emails you can send</a>. 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 <a href='/admin/site_settings'>Site Settings</a>. Be sure to <a href='/admin/users/list/pending'>approve users in the Pending Users list</a>. (This message will go away after 2 days.)"
|
||||
site_contact_username_warning: "The site_contact_username setting is blank. Please update it in the <a href='/admin/site_settings'>Site Settings</a>. Set it to the username of an admin user who should be the sender of system messages."
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue