BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
list.js.es6
app/assets/javascripts/boards/models/list.js.es6
+10
-5
board_service.js.es6
app/assets/javascripts/boards/services/board_service.js.es6
+7
-0
_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