Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
bf941ce9
Commit
bf941ce9
authored
Jun 11, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7012 from MrMarvin/issue_229_no_avatar_png_path_in_coffee
fixes gitlab.com issue #229 - github.com issue #6976
parents
1f5891e9
58750239
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/project_users_select.js.coffee
app/assets/javascripts/project_users_select.js.coffee
+1
-1
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+1
-1
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+1
-1
spec/helpers/application_helper_spec.rb
spec/helpers/application_helper_spec.rb
+2
-2
No files found.
app/assets/javascripts/project_users_select.js.coffee
View file @
bf941ce9
...
@@ -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
=
''
...
...
app/assets/javascripts/users_select.js.coffee
View file @
bf941ce9
...
@@ -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>
...
...
app/helpers/application_helper.rb
View file @
bf941ce9
...
@@ -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!
...
...
spec/helpers/application_helper_spec.rb
View file @
bf941ce9
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment