Add a setting to pick alternative Gravatar images. #2734
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3076 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -670,7 +670,7 @@ module ApplicationHelper
|
||||
# +user+ can be a User or a string that will be scanned for an email address (eg. 'joe <joe@foo.bar>')
|
||||
def avatar(user, options = { })
|
||||
if Setting.gravatar_enabled?
|
||||
options.merge!({:ssl => Setting.protocol == 'https'})
|
||||
options.merge!({:ssl => Setting.protocol == 'https', :default => Setting.gravatar_default})
|
||||
email = nil
|
||||
if user.respond_to?(:mail)
|
||||
email = user.mail
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
<%= hidden_field_tag 'settings[gravatar_enabled]', 0 %>
|
||||
<%= check_box_tag 'settings[gravatar_enabled]', 1, Setting.gravatar_enabled? %>
|
||||
</p>
|
||||
|
||||
<p><label><%= l(:setting_gravatar_default) %></label>
|
||||
<%= select_tag 'settings[gravatar_default]', options_for_select([[l(:label_none), ''], ["Wavatars", 'wavatar'], ["Identicons", 'identicon'], ["Monster ids", 'monsterid']], Setting.gravatar_default) %></p>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_save) %>
|
||||
|
||||
Reference in New Issue
Block a user