Skip to content

Commit

Permalink
Ask admins to fill in site_description on the dashboard, and send it …
Browse files Browse the repository at this point in the history
…to the hub
  • Loading branch information
nlalonde committed Sep 11, 2013
1 parent 4fa11f1 commit bded4b2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app/models/admin_dashboard_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def problems
contact_email_check,
send_consumer_email_check,
title_check,
site_description_check,
access_password_removal,
site_contact_username_check,
notification_email_check ].compact
Expand Down Expand Up @@ -144,6 +145,10 @@ def title_check
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
Expand Down
1 change: 1 addition & 0 deletions config/locales/server.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
3 changes: 2 additions & 1 deletion lib/discourse_hub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def response_message
)
)
}
end
end

end

Expand Down Expand Up @@ -60,6 +60,7 @@ def self.discourse_version_check
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,
Expand Down

0 comments on commit bded4b2

Please sign in to comment.