git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6167 e93f8b46-1217-0410-a6f0-8f06a7374b81tags/1.3.0
@@ -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>') |
@@ -1,6 +1,6 @@ | |||
<% labelled_tabular_form_for :user, @user, :url => { :controller => 'users', :action => "update", :tab => nil }, :html => { :method => :put, :class => nil } do |f| %> | |||
<%= render :partial => 'form', :locals => { :f => f } %> | |||
<% if @user.active? -%> | |||
<% if @user.active? && email_delivery_enabled? -%> | |||
<p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p> | |||
<% end -%> | |||
<p><%= submit_tag l(:button_save) %></p> |
@@ -2,7 +2,9 @@ | |||
<% labelled_tabular_form_for :user, @user, :url => { :action => "create" }, :html => { :class => nil } do |f| %> | |||
<%= render :partial => 'form', :locals => { :f => f } %> | |||
<% if email_delivery_enabled? %> | |||
<p><label><%= check_box_tag 'send_information', 1, true %> <%= l(:label_send_information) %></label></p> | |||
<% end %> | |||
<p> | |||
<%= submit_tag l(:button_create) %> | |||
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %> |