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
2a001df3
Commit
2a001df3
authored
Mar 21, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] use is:component
parent
93d1895b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
app/assets/javascripts/vue_sidebar_assignees/components/single_assignee.js
...ripts/vue_sidebar_assignees/components/single_assignee.js
+6
-1
app/assets/javascripts/vue_sidebar_assignees/index.js
app/assets/javascripts/vue_sidebar_assignees/index.js
+14
-3
No files found.
app/assets/javascripts/vue_sidebar_assignees/components/single_assignee.js
View file @
2a001df3
export
default
{
export
default
{
name
:
'
SingleAssignee
'
,
name
:
'
SingleAssignee
'
,
props
:
{
props
:
{
user
:
{
type
:
Object
,
required
:
true
},
assignees
:
{
type
:
Object
,
required
:
true
},
},
computed
:
{
user
()
{
return
this
.
assignees
.
users
[
0
];
},
},
},
template
:
`
template
:
`
<div class="value hide-collapsed">
<div class="value hide-collapsed">
...
...
app/assets/javascripts/vue_sidebar_assignees/index.js
View file @
2a001df3
...
@@ -31,6 +31,19 @@ const sidebarAssigneesOptions = () => ({
...
@@ -31,6 +31,19 @@ const sidebarAssigneesOptions = () => ({
service
,
service
,
};
};
},
},
computed
:
{
componentName
()
{
const
numberOfAssignees
=
this
.
assignees
.
users
.
length
;
if
(
numberOfAssignees
===
0
)
{
return
'
no-assignee
'
;
}
else
if
(
numberOfAssignees
===
1
)
{
return
'
single-assignee
'
;
}
else
{
return
'
multiple-assignees
'
;
}
},
},
components
:
{
components
:
{
'
no-assignee
'
:
NoAssignee
,
'
no-assignee
'
:
NoAssignee
,
'
single-assignee
'
:
SingleAssignee
,
'
single-assignee
'
:
SingleAssignee
,
...
@@ -40,9 +53,7 @@ const sidebarAssigneesOptions = () => ({
...
@@ -40,9 +53,7 @@ const sidebarAssigneesOptions = () => ({
template
:
`
template
:
`
<div class="sidebar-assignees">
<div class="sidebar-assignees">
<assignee-title :numberOfAssignees="assignees.users.length" />
<assignee-title :numberOfAssignees="assignees.users.length" />
<no-assignee v-if="assignees.users.length === 0" :service="service" :assignees="assignees" />
<component :is="componentName" :assignees="assignees" :service="service"></component>
<single-assignee v-else-if="assignees.users.length === 1" :user="assignees.users[0]" />
<multiple-assignees v-else :assignees="assignees" />
</div>
</div>
`
,
`
,
});
});
...
...
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