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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
347b1556
Commit
347b1556
authored
Mar 24, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] Improve code for collapsed multiple assignees
parent
46f569b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/vue_sidebar_assignees/components/collapsed/multiple_assignees.js
...ebar_assignees/components/collapsed/multiple_assignees.js
+5
-5
No files found.
app/assets/javascripts/vue_sidebar_assignees/components/collapsed/multiple_assignees.js
View file @
347b1556
...
...
@@ -7,14 +7,14 @@ export default {
},
computed
:
{
title
()
{
const
max
=
this
.
users
.
length
>
5
?
5
:
this
.
users
.
length
;
const
firstFive
=
this
.
users
.
slice
(
0
,
max
);
const
max
Render
=
Math
.
min
(
5
,
this
.
users
.
length
)
;
const
renderUsers
=
this
.
users
.
slice
(
0
,
maxRender
);
const
names
=
[];
firstFive
.
forEach
(
u
=>
names
.
push
(
u
.
name
));
renderUsers
.
forEach
(
u
=>
names
.
push
(
u
.
name
));
if
(
this
.
users
.
length
>
max
)
{
names
.
push
(
`+
${
this
.
users
.
length
-
max
}
more`
);
if
(
this
.
users
.
length
>
max
Render
)
{
names
.
push
(
`+
${
this
.
users
.
length
-
max
Render
}
more`
);
}
return
names
.
join
(
'
,
'
);
...
...
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