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
Boxiang Sun
gitlab-ce
Commits
db2eabfd
Commit
db2eabfd
authored
Aug 05, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added assignee to frontend
parent
fcee9323
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
app/assets/javascripts/boards/models/issue.js.es6
app/assets/javascripts/boards/models/issue.js.es6
+5
-0
app/assets/javascripts/boards/models/user.js.es6
app/assets/javascripts/boards/models/user.js.es6
+8
-0
app/assets/stylesheets/pages/boards.scss
app/assets/stylesheets/pages/boards.scss
+5
-0
app/views/projects/boards/components/_card.html.haml
app/views/projects/boards/components/_card.html.haml
+2
-0
No files found.
app/assets/javascripts/boards/models/issue.js.es6
View file @
db2eabfd
...
...
@@ -2,6 +2,11 @@ class Issue {
constructor (obj) {
this.id = obj.iid;
this.title = obj.title;
if (obj.assignee) {
this.assignee = new User(obj.assignee);
}
this.labels = [];
obj.labels.forEach((label) => {
...
...
app/assets/javascripts/boards/models/user.js.es6
0 → 100644
View file @
db2eabfd
class User {
constructor (user) {
this.id = user.id;
this.name = user.name;
this.username = user.username;
this.avatar = user.avatar_url;
}
}
app/assets/stylesheets/pages/boards.scss
View file @
db2eabfd
...
...
@@ -237,3 +237,8 @@
margin-right
:
8px
;
font-weight
:
500
;
}
.card-avatar
{
margin-top
:
-2px
;
border-radius
:
50%
;
}
app/views/projects/boards/components/_card.html.haml
View file @
db2eabfd
...
...
@@ -8,3 +8,5 @@
{{ issue.id }}
%span
.label.color-label
{
"v-for"
=>
"label in issue.labels"
,
":style"
=>
"{ backgroundColor: label.color, color: label.textColor }"
}
{{ label.title }}
%a
{
":href"
=>
"'/u/' + issue.assignee.username"
,
":title"
=>
"issue.assignee.name"
,
"v-if"
=>
"issue.assignee"
}
%img
.card-avatar
{
":src"
=>
"issue.assignee.avatar"
,
width:
20
,
height:
20
}
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