Commit 58750239 authored by Marvin Frick's avatar Marvin Frick

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
parent 1f5891e9
No related merge requests found
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
avatar = avatar.replace('%{hash}', md5(user.email)) avatar = avatar.replace('%{hash}', md5(user.email))
avatar = avatar.replace('%{size}', '24') avatar = avatar.replace('%{size}', '24')
else else
avatar = gon.relative_url_root + "/assets/no_avatar.png" avatar = gon.relative_url_root + "#{image_path('no_avatar.png')}"
if user.id == '' if user.id == ''
avatarMarkup = '' avatarMarkup = ''
......
...@@ -7,7 +7,7 @@ $ -> ...@@ -7,7 +7,7 @@ $ ->
avatar = avatar.replace('%{hash}', md5(user.email)) avatar = avatar.replace('%{hash}', md5(user.email))
avatar = avatar.replace('%{size}', '24') avatar = avatar.replace('%{size}', '24')
else 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-result'>
<div class='user-image'><img class='avatar s24' src='#{avatar}'></div> <div class='user-image'><img class='avatar s24' src='#{avatar}'></div>
......
...@@ -71,7 +71,7 @@ module ApplicationHelper ...@@ -71,7 +71,7 @@ module ApplicationHelper
size = 40 if size.nil? || size <= 0 size = 40 if size.nil? || size <= 0
if !Gitlab.config.gravatar.enabled || user_email.blank? if !Gitlab.config.gravatar.enabled || user_email.blank?
'/assets/no_avatar.png' image_path('no_avatar.png')
else else
gravatar_url = request.ssl? || gitlab_config.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url gravatar_url = request.ssl? || gitlab_config.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
user_email.strip! user_email.strip!
......
...@@ -79,11 +79,11 @@ describe ApplicationHelper do ...@@ -79,11 +79,11 @@ describe ApplicationHelper do
it "should return a generic avatar path when Gravatar is disabled" do it "should return a generic avatar path when Gravatar is disabled" do
Gitlab.config.gravatar.stub(:enabled).and_return(false) Gitlab.config.gravatar.stub(:enabled).and_return(false)
gravatar_icon(user_email).should == '/assets/no_avatar.png' gravatar_icon(user_email).should match('no_avatar.png')
end end
it "should return a generic avatar path when email is blank" do it "should return a generic avatar path when email is blank" do
gravatar_icon('').should == '/assets/no_avatar.png' gravatar_icon('').should match('no_avatar.png')
end end
it "should return default gravatar url" do it "should return default gravatar url" do
......
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