Commit 9f2183f904cf3a4b8bcfd653b023aa4a9427c0c1

Authored by Dmitriy Zaporozhets
2 parents 94f8e801 c18e2778

Merge pull request #7002 from olafmandel/user_avatar_in_relative_root

Fix avatar URLs in JS-lists for relative_url_root
app/assets/javascripts/project_users_select.js.coffee
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 37
38 projectUserFormatResult: (user) -> 38 projectUserFormatResult: (user) ->
39 if user.avatar_url 39 if user.avatar_url
40 - avatar = user.avatar_url 40 + avatar = gon.relative_url_root + user.avatar_url
41 else if gon.gravatar_enabled 41 else if gon.gravatar_enabled
42 avatar = gon.gravatar_url 42 avatar = gon.gravatar_url
43 avatar = avatar.replace('%{hash}', md5(user.email)) 43 avatar = avatar.replace('%{hash}', md5(user.email))
app/assets/javascripts/users_select.js.coffee
1 $ -> 1 $ ->
2 userFormatResult = (user) -> 2 userFormatResult = (user) ->
3 if user.avatar_url 3 if user.avatar_url
4 - avatar = user.avatar_url 4 + avatar = gon.relative_url_root + user.avatar_url
5 else if gon.gravatar_enabled 5 else if gon.gravatar_enabled
6 avatar = gon.gravatar_url 6 avatar = gon.gravatar_url
7 avatar = avatar.replace('%{hash}', md5(user.email)) 7 avatar = avatar.replace('%{hash}', md5(user.email))