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
Léo-Paul Géneau
gitlab-ce
Commits
6558586f
Commit
6558586f
authored
Jul 09, 2016
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add link to user profile to commit avatar (!5163)
parent
dc761e3a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
17 deletions
+35
-17
CHANGELOG
CHANGELOG
+1
-0
app/helpers/avatars_helper.rb
app/helpers/avatars_helper.rb
+30
-0
app/helpers/commits_helper.rb
app/helpers/commits_helper.rb
+0
-10
app/views/events/_event.html.haml
app/views/events/_event.html.haml
+1
-5
app/views/projects/ci/pipelines/_pipeline.html.haml
app/views/projects/ci/pipelines/_pipeline.html.haml
+1
-1
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+2
-1
No files found.
CHANGELOG
View file @
6558586f
...
...
@@ -19,6 +19,7 @@ v 8.10.0 (unreleased)
- Add Application Setting to configure default Repository Path for new projects
- Delete award emoji when deleting a user
- Remove pinTo from Flash and make inline flash messages look nicer !4854 (winniehell)
- Add link to profile to commit avatar !5163 (winniehell)
- Wrap code blocks on Activies and Todos page. !4783 (winniehell)
- Align flash messages with left side of page content !4959 (winniehell)
- Display tooltip for "Copy to Clipboard" button !5164 (winniehell)
...
...
app/helpers/avatars_helper.rb
0 → 100644
View file @
6558586f
module
AvatarsHelper
def
author_avatar
(
commit_or_event
,
options
=
{})
user_avatar
(
options
.
merge
({
user:
commit_or_event
.
author
,
user_name:
commit_or_event
.
author_name
,
user_email:
commit_or_event
.
author_email
,
}))
end
private
def
user_avatar
(
options
=
{})
avatar_size
=
options
[
:size
]
||
16
user_name
=
options
[
:user
].
try
(
:name
)
||
options
[
:user_name
]
avatar
=
image_tag
(
avatar_icon
(
options
[
:user
]
||
options
[
:user_email
],
avatar_size
),
class:
"avatar has-tooltip hidden-xs s
#{
avatar_size
}
"
,
alt:
"
#{
user_name
}
's avatar"
,
title:
user_name
)
if
options
[
:user
]
link_to
(
avatar
,
user_path
(
options
[
:user
]))
elsif
options
[
:user_email
]
mail_to
(
options
[
:user_email
],
avatar
)
end
end
end
app/helpers/commits_helper.rb
View file @
6558586f
...
...
@@ -16,16 +16,6 @@ module CommitsHelper
commit_person_link
(
commit
,
options
.
merge
(
source: :committer
))
end
def
commit_author_avatar
(
commit
,
options
=
{})
options
=
options
.
merge
(
source: :author
)
user
=
commit
.
send
(
options
[
:source
])
source_email
=
clean
(
commit
.
send
"
#{
options
[
:source
]
}
_email"
.
to_sym
)
person_email
=
user
.
try
(
:email
)
||
source_email
image_tag
(
avatar_icon
(
person_email
,
options
[
:size
]),
class:
"avatar
#{
"s
#{
options
[
:size
]
}
"
if
options
[
:size
]
}
hidden-xs"
,
width:
options
[
:size
],
alt:
""
)
end
def
image_diff_class
(
diff
)
if
diff
.
deleted_file
"deleted"
...
...
app/views/events/_event.html.haml
View file @
6558586f
...
...
@@ -4,11 +4,7 @@
#{
time_ago_with_tooltip
(
event
.
created_at
)
}
=
cache
[
event
,
current_application_settings
,
"v2.2"
]
do
-
if
event
.
author
=
link_to
user_path
(
event
.
author
)
do
=
image_tag
avatar_icon
(
event
.
author_email
,
40
),
class:
"avatar s40"
,
alt
:''
-
else
=
image_tag
avatar_icon
(
event
.
author_email
,
40
),
class:
"avatar s40"
,
alt
:''
=
author_avatar
(
event
,
size:
40
)
-
if
event
.
created_project?
=
render
"events/event/created_project"
,
event:
event
...
...
app/views/projects/ci/pipelines/_pipeline.html.haml
View file @
6558586f
...
...
@@ -27,7 +27,7 @@
%p
.commit-title
-
if
commit
=
pipeline
.
commit
=
commit_
author_avatar
(
commit
,
size:
20
)
=
author_avatar
(
commit
,
size:
20
)
=
link_to_gfm
truncate
(
commit
.
title
,
length:
60
),
namespace_project_commit_path
(
@project
.
namespace
,
@project
,
commit
.
id
),
class:
"commit-row-message"
-
else
Cant find HEAD commit for this branch
...
...
app/views/projects/commits/_commit.html.haml
View file @
6558586f
...
...
@@ -9,7 +9,8 @@
=
cache
(
cache_key
)
do
%li
.commit.js-toggle-container
{
id:
"commit-#{commit.short_id}"
}
=
commit_author_avatar
(
commit
,
size:
36
)
=
author_avatar
(
commit
,
size:
36
)
.commit-info-block
.commit-row-title
%span
.item-title
...
...
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