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
Tatuya Kamada
gitlab-ce
Commits
a3e52ef9
Commit
a3e52ef9
authored
Aug 04, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pulls down issues for lists
parent
3e839b34
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
app/assets/javascripts/boards/models/list.js.es6
app/assets/javascripts/boards/models/list.js.es6
+10
-5
app/assets/javascripts/boards/services/board_service.js.es6
app/assets/javascripts/boards/services/board_service.js.es6
+7
-0
app/views/projects/boards/components/_card.html.haml
app/views/projects/boards/components/_card.html.haml
+1
-1
No files found.
app/assets/javascripts/boards/models/list.js.es6
View file @
a3e52ef9
...
...
@@ -4,16 +4,21 @@ class List {
this.position = obj.position;
this.title = obj.title;
this.type = obj.list_type;
this.issues = [];
if (obj.label) {
this.label = new Label(obj.label);
}
if (obj.issues) {
this.issues = [];
obj.issues.forEach((issue) => {
this.issues.push(new Issue(issue));
});
if (this.type !== 'blank') {
service.getIssuesForList(this.id)
.then((resp) => {
const data = resp.json();
data.forEach((issue) => {
this.issues.push(new Issue(issue));
});
});
}
}
...
...
app/assets/javascripts/boards/services/board_service.js.es6
View file @
a3e52ef9
...
...
@@ -4,6 +4,7 @@ class BoardService {
this.lists = Vue.resource(`${root}{/id}.json`, {});
this.list = Vue.resource(`${root}/lists{/id}.json`, {});
this.issues = Vue.resource(`${root}/lists{/id}/issues.json`, {});
}
setCSRF () {
...
...
@@ -40,4 +41,10 @@ class BoardService {
return this.list.delete({ id });
}
getIssuesForList (id) {
this.setCSRF();
return this.issues.get({ id });
}
};
app/views/projects/boards/components/_card.html.haml
View file @
a3e52ef9
...
...
@@ -6,5 +6,5 @@
%span
.card-number
=
precede
'#'
do
{{ issue.id }}
%span
.label.color-label
{
"v-for"
=>
"label in issue.labels"
,
":style"
=>
"{ backgroundColor: label.
backgroundC
olor, color: label.textColor }"
}
%span
.label.color-label
{
"v-for"
=>
"label in issue.labels"
,
":style"
=>
"{ backgroundColor: label.
c
olor, color: label.textColor }"
}
{{ label.title }}
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