diff options
author | Marvin Frick <marvin.frick@sinnerschrader.com> | 2014-05-09 16:26:19 +0400 |
---|---|---|
committer | Marvin Frick <marvin.frick@sinnerschrader.com> | 2014-06-11 00:28:11 +0400 |
commit | 587502390b3afa423a10f98f7568a26352cb0976 (patch) | |
tree | 6fd12d8cf17e6692733942618f78874f0c6913ba /app | |
parent | 1f5891e99183f1b20ced08d75dd44c9a01c48094 (diff) |
fixes gitlab.com issue #229
Changes .js.coffe files to not use a hardcoded path to
`no_avatar.png` but instead stick with the asset pipeline.
renames coffee.erb back to coffee
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/project_users_select.js.coffee | 2 | ||||
-rw-r--r-- | app/assets/javascripts/users_select.js.coffee | 2 | ||||
-rw-r--r-- | app/helpers/application_helper.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/assets/javascripts/project_users_select.js.coffee b/app/assets/javascripts/project_users_select.js.coffee index a7fec960406..382f9b37992 100644 --- a/app/assets/javascripts/project_users_select.js.coffee +++ b/app/assets/javascripts/project_users_select.js.coffee @@ -43,7 +43,7 @@ avatar = avatar.replace('%{hash}', md5(user.email)) avatar = avatar.replace('%{size}', '24') else - avatar = gon.relative_url_root + "/assets/no_avatar.png" + avatar = gon.relative_url_root + "#{image_path('no_avatar.png')}" if user.id == '' avatarMarkup = '' diff --git a/app/assets/javascripts/users_select.js.coffee b/app/assets/javascripts/users_select.js.coffee index cab9f6271eb..da66a4ba7f2 100644 --- a/app/assets/javascripts/users_select.js.coffee +++ b/app/assets/javascripts/users_select.js.coffee @@ -7,7 +7,7 @@ $ -> avatar = avatar.replace('%{hash}', md5(user.email)) avatar = avatar.replace('%{size}', '24') else - avatar = gon.relative_url_root + "/assets/no_avatar.png" + avatar = gon.relative_url_root + "#{image_path('no_avatar.png')}" "<div class='user-result'> <div class='user-image'><img class='avatar s24' src='#{avatar}'></div> diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 198ca76545c..32010701e46 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -71,7 +71,7 @@ module ApplicationHelper size = 40 if size.nil? || size <= 0 if !Gitlab.config.gravatar.enabled || user_email.blank? - '/assets/no_avatar.png' + image_path('no_avatar.png') else gravatar_url = request.ssl? || gitlab_config.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url user_email.strip! |