Do not show 'Send information' checkbox if email delivery is not configured.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6167 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-07-03 12:28:54 +00:00
parent 5b648a7dae
commit 37aba18c8f
3 changed files with 7 additions and 1 deletions

View File

@@ -871,6 +871,10 @@ module ApplicationHelper
def has_content?(name)
(@has_content && @has_content[name]) || false
end
def email_delivery_enabled?
!!ActionMailer::Base.perform_deliveries
end
# Returns the avatar image tag for the given +user+ if avatars are enabled
# +user+ can be a User or a string that will be scanned for an email address (eg. 'joe <joe@foo.bar>')