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
71e7d91c
Commit
71e7d91c
authored
Mar 24, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip ci] add multiple assignees to issues list
parent
013a3f6b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
1 deletion
+40
-1
app/assets/stylesheets/framework/avatar.scss
app/assets/stylesheets/framework/avatar.scss
+11
-0
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+9
-0
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+4
-0
app/serializers/issuable_entity.rb
app/serializers/issuable_entity.rb
+1
-0
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue.html.haml
+1
-1
app/views/shared/issuable/_assignees.html.haml
app/views/shared/issuable/_assignees.html.haml
+14
-0
No files found.
app/assets/stylesheets/framework/avatar.scss
View file @
71e7d91c
...
...
@@ -93,3 +93,14 @@
align-self
:
center
;
}
}
.avatar-counter
{
background-color
:
$gray-darkest
;
color
:
$white-light
;
border
:
1px
solid
$white-light
;
border-radius
:
1em
;
font-family
:
$regular_font
;
font-size
:
9px
;
line-height
:
17px
;
text-align
:
center
;
}
app/assets/stylesheets/pages/issuable.scss
View file @
71e7d91c
...
...
@@ -481,6 +481,15 @@
vertical-align
:
text-top
;
}
}
.avatar-counter
{
display
:
inline-block
;
position
:
relative
;
top
:
-0
.2em
;
height
:
17px
;
width
:
17px
;
line-height
:
15px
;
}
}
}
...
...
app/models/concerns/issuable.rb
View file @
71e7d91c
...
...
@@ -116,6 +116,10 @@ module Issuable
def
locking_enabled?
title_changed?
||
description_changed?
end
def
assignees
[
User
.
first
,
User
.
last
,
User
.
first
,
User
.
last
,
User
.
first
,
User
.
last
,
User
.
first
,
User
.
last
,
User
.
first
,
User
.
last
,
User
.
first
,
User
.
last
,
User
.
first
,
User
.
last
]
end
end
module
ClassMethods
...
...
app/serializers/issuable_entity.rb
View file @
71e7d91c
...
...
@@ -2,6 +2,7 @@ class IssuableEntity < Grape::Entity
expose
:id
expose
:iid
expose
:assignee_id
expose
:assignees
,
using:
UserEntity
expose
:author_id
expose
:description
expose
:lock_version
...
...
app/views/projects/issues/_issue.html.haml
View file @
71e7d91c
...
...
@@ -15,7 +15,7 @@
-
if
issue
.
assignee
%li
=
link_to_member
(
@project
,
issue
.
assignee
,
name:
false
,
title:
"Assigned to :name"
)
=
render
'shared/issuable/assignees'
,
project:
@project
,
issue:
issue
=
render
'shared/issuable_meta_data'
,
issuable:
issue
...
...
app/views/shared/issuable/_assignees.html.haml
0 → 100644
View file @
71e7d91c
-
max_render
=
3
-
max
=
[
max_render
,
issue
.
assignees
.
length
].
min
-
issue
.
assignees
.
each_with_index
do
|
assignee
,
index
|
-
if
index
<
max
=
link_to_member
(
@project
,
assignee
,
name:
false
,
title:
"Assigned to :name"
)
-
if
issue
.
assignees
.
length
>
max_render
-
counter
=
issue
.
assignees
.
length
-
max_render
%span
{
class
:'avatar-counter has-tooltip'
,
data:
{
container:
'body'
,
placement:
'bottom'
,
'line-type'
=>
'old'
,
'original-title'
=>
"+#{counter} more assignees"
}
}
-
if
counter
<
99
=
"+
#{
counter
}
"
-
else
99+
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