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
fa6585ed
Commit
fa6585ed
authored
Apr 26, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] add multiple assignees to issue board sidebar
parent
0d3ecf58
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
34 deletions
+50
-34
app/assets/javascripts/boards/components/board_sidebar.js
app/assets/javascripts/boards/components/board_sidebar.js
+4
-0
app/assets/javascripts/boards/components/issue_card_inner.js
app/assets/javascripts/boards/components/issue_card_inner.js
+1
-1
app/assets/javascripts/boards/models/issue.js
app/assets/javascripts/boards/models/issue.js
+1
-0
app/assets/javascripts/boards/models/user.js
app/assets/javascripts/boards/models/user.js
+1
-1
app/assets/javascripts/sidebar/components/assignees/assignees.js
...ets/javascripts/sidebar/components/assignees/assignees.js
+3
-3
app/assets/javascripts/sidebar/stores/sidebar_store.js
app/assets/javascripts/sidebar/stores/sidebar_store.js
+5
-1
app/views/projects/boards/components/sidebar/_assignee.html.haml
...ws/projects/boards/components/sidebar/_assignee.html.haml
+35
-28
No files found.
app/assets/javascripts/boards/components/board_sidebar.js
View file @
fa6585ed
...
...
@@ -5,6 +5,8 @@
/* global Sidebar */
import
Vue
from
'
vue
'
;
import
AssigneeTitle
from
'
../../sidebar/components/assignees/assignee_title
'
;
import
Assignees
from
'
../../sidebar/components/assignees/assignees
'
;
require
(
'
./sidebar/remove_issue
'
);
...
...
@@ -68,6 +70,8 @@ require('./sidebar/remove_issue');
},
components
:
{
removeBtn
:
gl
.
issueBoards
.
RemoveIssueBtn
,
'
assignee-title
'
:
AssigneeTitle
,
assignees
:
Assignees
,
},
});
})();
app/assets/javascripts/boards/components/issue_card_inner.js
View file @
fa6585ed
...
...
@@ -158,7 +158,7 @@ import eventHub from '../eventhub';
>
<img
class="avatar avatar-inline s20"
:src="assignee.avatar"
:src="assignee.avatar
Url
"
width="20"
height="20"
:alt="avatarUrlTitle(assignee)"
...
...
app/assets/javascripts/boards/models/issue.js
View file @
fa6585ed
...
...
@@ -14,6 +14,7 @@ class ListIssue {
this
.
dueDate
=
obj
.
due_date
;
this
.
subscribed
=
obj
.
subscribed
;
this
.
labels
=
[];
this
.
assignees
=
[];
this
.
selected
=
false
;
this
.
position
=
obj
.
relative_position
||
Infinity
;
this
.
milestone_id
=
obj
.
milestone_id
;
...
...
app/assets/javascripts/boards/models/user.js
View file @
fa6585ed
...
...
@@ -5,7 +5,7 @@ class ListUser {
this
.
id
=
user
.
id
;
this
.
name
=
user
.
name
;
this
.
username
=
user
.
username
;
this
.
avatar
=
user
.
avatar_url
;
this
.
avatar
Url
=
user
.
avatar_url
;
}
}
...
...
app/assets/javascripts/sidebar/components/assignees/assignees.js
View file @
fa6585ed
...
...
@@ -116,7 +116,7 @@ export default {
width="24"
class="avatar avatar-inline s24"
:alt="assigneeAlt(user)"
:src="user.avatar
_u
rl"
:src="user.avatar
U
rl"
/>
<span class="author">
{{ user.name }}
...
...
@@ -156,7 +156,7 @@ export default {
width="32"
class="avatar avatar-inline s32"
:alt="assigneeAlt(firstUser)"
:src="firstUser.avatar
_u
rl"
:src="firstUser.avatar
U
rl"
/>
<span class="author">
{{ firstUser.name }}
...
...
@@ -183,7 +183,7 @@ export default {
width="32"
class="avatar avatar-inline s32"
:alt="assigneeAlt(user)"
:src="user.avatar
_u
rl"
:src="user.avatar
U
rl"
/>
</a>
</div>
...
...
app/assets/javascripts/sidebar/stores/sidebar_store.js
View file @
fa6585ed
...
...
@@ -20,7 +20,11 @@ export default class SidebarStore {
processUserData
(
data
)
{
if
(
data
.
assignees
)
{
this
.
renderedUsers
=
data
.
assignees
;
this
.
renderedUsers
=
data
.
assignees
.
map
(
a
=>
{
a
.
avatarUrl
=
a
.
avatar_url
;
delete
a
.
avatar_url
;
return
a
;
});
this
.
removeAllUserIds
();
this
.
renderedUsers
.
map
(
u
=>
this
.
addUserId
(
u
.
id
));
...
...
app/views/projects/boards/components/sidebar/_assignee.html.haml
View file @
fa6585ed
-# .block.assignee
-# .title.hide-collapsed
-# Assignee
-# - if can?(current_user, :admin_issue, @project)
-# = icon("spinner spin", class: "block-loading")
-# = link_to "Edit", "#", class: "edit-link pull-right"
-# .value.hide-collapsed
-# %span.assign-yourself.no-value{ "v-if" => "!issue.assignees" }
-# No assignee
-# - if can?(current_user, :admin_issue, @project)
-# \-
-# %a.js-assign-yourself{ href: "#" }
-# assign yourself
-# %a.author_link.bold{ ":href" => "'#{root_url}' + issue.assignees[0].username",
-# "v-if" => "issue.assignees" }
-# %img.avatar.avatar-inline.s32{ ":src" => "issue.assignees[0].avatar",
-# width: "32", alt: "Avatar" }
-# %span.author
-# {{ issue.assignees[0].name }}
-# %span.username
-# = precede "@" do
-# {{ issue.assignees[0].username }}
.block.assignee
.title.hide-collapsed
Assignee
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
=
icon
(
"spinner spin"
,
class:
"block-loading"
)
=
link_to
"Edit"
,
"#"
,
class:
"edit-link pull-right"
.value.hide-collapsed
%span
.assign-yourself.no-value
{
"v-if"
=>
"!issue.assignee"
}
No assignee
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
\-
%a
.js-assign-yourself
{
href:
"#"
}
assign yourself
%a
.author_link.bold
{
":href"
=>
"'#{root_url}' + issue.assignee.username"
,
"v-if"
=>
"issue.assignee"
}
%img
.avatar.avatar-inline.s32
{
":src"
=>
"issue.assignee.avatar"
,
width:
"32"
,
alt:
"Avatar"
}
%span
.author
{{ issue.assignee.name }}
%span
.username
=
precede
"@"
do
{{ issue.assignee.username }}
%template
{
"v-if"
=>
"issue.assignees"
}
%assignee-title
{
":number-of-assignees"
=>
"issue.assignees.length"
,
":editable"
=>
can?
(
current_user
,
:admin_issue
,
@project
)
}
%assignees
{
class:
"value"
,
"root-path"
=>
"#{root_url}"
,
":users"
=>
"issue.assignees"
}
-
if
can?
(
current_user
,
:admin_issue
,
@project
)
.selectbox.hide-collapsed
%input
{
type:
"hidden"
,
name:
"issue[assignee_id]"
,
id:
"issue_assignee_
id"
,
"
:value"
=>
"issue.assignee.id
"
,
"v-
if"
=>
"issue.assignee
"
}
name:
"issue[assignee_id
s][
]"
,
":value"
=>
"assignee.
id"
,
"
v-if"
=>
"issue.assignees
"
,
"v-
for"
=>
"assignee in issue.assignees
"
}
.dropdown
%button
.dropdown-menu-toggle.js-user-search.js-author-search.js-
issue-board-sidebar
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"issue[assignee_id]"
,
first_user:
(
current_user
.
username
if
current_user
),
current_user:
"true"
,
project_id:
@project
.
id
,
null_user:
"true"
},
%button
.dropdown-menu-toggle.js-user-search.js-author-search.js-
multiselect.js-save-user-data.js-issue-board-sidebar
{
type:
"button"
,
data:
{
toggle:
"dropdown"
,
field_name:
"issue[assignee_ids][]"
,
first_user:
(
current_user
.
username
if
current_user
),
current_user:
"true"
,
project_id:
@project
.
id
,
null_user:
"true"
,
multi_select:
"true"
,
dropdown:
{
header:
'Assignee(s)'
}
},
":data-issuable-id"
=>
"issue.id"
,
":data-issue-update"
=>
"'#{namespace_project_issues_path(@project.namespace, @project)}/' + issue.id + '.json'"
}
Select assignee
Select assignee
(s)
=
icon
(
"chevron-down"
)
.dropdown-menu.dropdown-menu-user.dropdown-menu-selectable.dropdown-menu-author
.dropdown-menu.dropdown-
select.dropdown-
menu-user.dropdown-menu-selectable.dropdown-menu-author
=
dropdown_title
(
"Assign to"
)
=
dropdown_filter
(
"Search users"
)
=
dropdown_content
...
...
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