Commit 167a6d32 authored by edavis10's avatar edavis10
Browse files

Add a setting to pick alternative Gravatar images. #2734

git-svn-id: https://svn.redmine.org/redmine/trunk@3076 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 4b34df2a
......@@ -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) %>
......
......@@ -834,3 +834,4 @@ bg:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -858,3 +858,4 @@ bs:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -837,3 +837,4 @@ ca:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -840,3 +840,4 @@ cs:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -860,3 +860,4 @@ da:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -860,3 +860,4 @@ de:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -840,3 +840,4 @@ el:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -306,6 +306,7 @@ en:
setting_mail_handler_api_key: API key
setting_sequential_project_identifiers: Generate sequential project identifiers
setting_gravatar_enabled: Use Gravatar user icons
setting_gravatar_default: Default Gravatar image
setting_diff_max_lines_displayed: Max number of diff lines displayed
setting_file_max_size_displayed: Max size of text files displayed inline
setting_repository_log_display_limit: Maximum number of revisions displayed on file log
......
......@@ -881,3 +881,4 @@ es:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -870,3 +870,4 @@ fi:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -863,3 +863,4 @@ fr:
text_journal_added: "{{label}} {{value}} ajouté"
field_active: Actif
enumeration_system_activity: Activité système
setting_gravatar_default: Default Gravatar image
......@@ -860,3 +860,4 @@ gl:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -844,3 +844,4 @@ he:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -865,3 +865,4 @@
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -847,3 +847,4 @@ it:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -869,3 +869,4 @@ ja:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -900,3 +900,4 @@ ko:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -870,3 +870,4 @@ lt:
label_user_anonymous: Anonymous
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment