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
9cd87f6f
Commit
9cd87f6f
authored
Sep 14, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add lazy_load option to participant avatar helper
parent
8b1a3d40
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+5
-2
app/views/shared/issuable/_participants.html.haml
app/views/shared/issuable/_participants.html.haml
+1
-1
No files found.
app/helpers/projects_helper.rb
View file @
9cd87f6f
...
...
@@ -21,11 +21,14 @@ module ProjectsHelper
classes
=
%W[avatar avatar-inline s
#{
opts
[
:size
]
}
]
classes
<<
opts
[
:avatar_class
]
if
opts
[
:avatar_class
]
image_tag
(
avatar_icon
(
author
,
opts
[
:size
]),
width:
opts
[
:size
],
class:
classes
,
alt:
''
)
avatar
=
avatar_icon
(
author
,
opts
[
:size
])
src
=
opts
[
:lazy_load
]
?
nil
:
avatar
image_tag
(
src
,
width:
opts
[
:size
],
class:
classes
,
alt:
''
,
"data-src"
=>
avatar
)
end
def
link_to_member
(
project
,
author
,
opts
=
{},
&
block
)
default_opts
=
{
avatar:
true
,
name:
true
,
size:
16
,
author_class:
'author'
,
title:
":name"
,
tooltip:
false
}
default_opts
=
{
avatar:
true
,
name:
true
,
size:
16
,
author_class:
'author'
,
title:
":name"
,
tooltip:
false
,
lazy_load:
false
}
opts
=
default_opts
.
merge
(
opts
)
return
"(deleted)"
unless
author
...
...
app/views/shared/issuable/_participants.html.haml
View file @
9cd87f6f
...
...
@@ -11,7 +11,7 @@
.hide-collapsed.participants-list
-
participants
.
each
do
|
participant
|
.participants-author.js-participants-author
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
)
=
link_to_member
(
@project
,
participant
,
name:
false
,
size:
24
,
lazy_load:
true
)
-
if
participants_extra
>
0
.hide-collapsed.participants-more
%a
.js-participants-more
{
href:
"#"
,
data:
{
original_text:
"+ #{participants_size - 7} more"
,
less_text:
"- show less"
}
}
...
...
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