Commit 167a6d32 authored by edavis10's avatar edavis10

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
......@@ -822,3 +822,4 @@ nl:
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
......@@ -835,3 +835,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
......@@ -863,3 +863,4 @@ pl:
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
......@@ -866,3 +866,4 @@ pt-BR:
label_user_anonymous: Anônimo
button_move_and_follow: Mover e seguir
setting_default_projects_modules: Módulos habilitados por padrão para novos projetos
setting_gravatar_default: Default Gravatar image
......@@ -852,3 +852,4 @@ pt:
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 @@ ro:
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
......@@ -948,3 +948,4 @@ ru:
label_user_anonymous: Аноним
button_move_and_follow: Переместить и перейти
setting_default_projects_modules: Включенные по умолчанию модули для новых проектов
setting_gravatar_default: Default Gravatar image
......@@ -839,3 +839,4 @@ sk:
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
......@@ -836,3 +836,4 @@ sl:
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
......@@ -855,3 +855,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
......@@ -888,3 +888,4 @@ sv:
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 @@ th:
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
......@@ -867,3 +867,4 @@ tr:
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
......@@ -836,3 +836,4 @@ uk:
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
......@@ -899,3 +899,4 @@ vi:
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
......@@ -931,3 +931,4 @@
enumeration_system_activity: 系統活動
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -864,3 +864,4 @@ zh:
enumeration_system_activity: 系统活动
button_move_and_follow: Move and follow
setting_default_projects_modules: Default enabled modules for new projects
setting_gravatar_default: Default Gravatar image
......@@ -168,3 +168,5 @@ gravatar_enabled:
default: 0
openid:
default: 0
gravatar_default:
default: ''
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