Commit c18e2778 authored by Olaf Mandel's avatar Olaf Mandel

Fix avatar URLs in JS-lists for relative_url_root

In user lists created when entering a (partial) user name into
a field, the URL to the user avatar was invalid if running with
relative_url_root.

This patch is the result of:
sed -i 's/\(= *\)\(user\.avatar_url\)/\1gon.relative_url_root + \2/' \
    app/assets/javascripts/*.coffee
parent 761fbbfe
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
projectUserFormatResult: (user) -> projectUserFormatResult: (user) ->
if user.avatar_url if user.avatar_url
avatar = user.avatar_url avatar = gon.relative_url_root + user.avatar_url
else if gon.gravatar_enabled else if gon.gravatar_enabled
avatar = gon.gravatar_url avatar = gon.gravatar_url
avatar = avatar.replace('%{hash}', md5(user.email)) avatar = avatar.replace('%{hash}', md5(user.email))
......
$ -> $ ->
userFormatResult = (user) -> userFormatResult = (user) ->
if user.avatar_url if user.avatar_url
avatar = user.avatar_url avatar = gon.relative_url_root + user.avatar_url
else if gon.gravatar_enabled else if gon.gravatar_enabled
avatar = gon.gravatar_url avatar = gon.gravatar_url
avatar = avatar.replace('%{hash}', md5(user.email)) avatar = avatar.replace('%{hash}', md5(user.email))
......
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