summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-27 09:46:18 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-06-27 09:46:18 +0000
commitbf2547db20ee70171b460b110229fde36997adc6 (patch)
treecf24af98fa498896b6dd20b9abc1829b9b108d6d /app/helpers
parentbc9ca5fcfd74ea699ea816aaf9e38edadd37b784 (diff)
downloadredmine-bf2547db20ee70171b460b110229fde36997adc6.tar.gz
redmine-bf2547db20ee70171b460b110229fde36997adc6.zip
Add avatar and edit link to "My account" page (#5418).
git-svn-id: http://svn.redmine.org/redmine/trunk@14377 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 6e59f63ed..688e3d235 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1251,6 +1251,14 @@ module ApplicationHelper
end
end
+ # Returns a link to edit user's avatar if avatars are enabled
+ def avatar_edit_link(user, options={})
+ if Setting.gravatar_enabled?
+ url = "http://gravatar.com"
+ link_to avatar(user, {:title => l(:button_edit)}.merge(options)), url, :target => '_blank'
+ end
+ end
+
def sanitize_anchor_name(anchor)
anchor.gsub(%r{[^\s\-\p{Word}]}, '').gsub(%r{\s+(\-+\s*)?}, '-')
end