File tree 3 files changed +45
-1
lines changed
3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ <h6><b>Filter Google Summer of Code Projects</b></h6>
106
106
< div ng-show ="currentProject.developers_involved.length>0 " class ="project-detail-element ">
107
107
< div class ="small-heading uppercase "> Developers Involved</ div > < span class ="pr-element-detail chip " ng-repeat ="developers in currentProject.developers_involved "> @{{developers}}</ span > </ div >
108
108
< div ng-show ="currentProject.issues.length>0 " class ="project-detail-element ">
109
- < div class ="small-heading uppercase "> Related issues</ div > < span ng-click ="redirect(issue) " class ="pr-element-detail chip clickable " ng-repeat ="issue in currentProject.issues "> {{ issue | format_issue }}</ span >
109
+ < div class ="small-heading uppercase "> Related issues</ div > < span ng-click ="redirect(issue) " class ="pr-element-detail chip clickable " ng-class =" lc.getIssueStateClass(issue) " ng- repeat ="issue in currentProject.issues "> {{ issue | format_issue }}</ span >
110
110
< br >
111
111
< br >
112
112
< br >
Original file line number Diff line number Diff line change 31
31
.center-content {
32
32
justify-content : center;
33
33
}
34
+ .closed {
35
+ background-color : # cb2431 ;
36
+ color : white
37
+ }
34
38
.close-filters {
35
39
right : 6% ;
36
40
margin-top : 1.25rem ;
@@ -117,12 +121,23 @@ i.fa {
117
121
.lighter-font {
118
122
font-weight : lighter;
119
123
}
124
+ .merged {
125
+ background-color : # 6f42c1 ;
126
+ color : white;
127
+ }
120
128
.no-events-available {
121
129
font-size : 1.2em ;
122
130
height : 30vh ;
123
131
justify-content : center;
124
132
flex-direction : column;
125
133
}
134
+ .no-state {
135
+ background-color : # e4e4e4 ;
136
+ }
137
+ .open , .opened {
138
+ background-color : # 2cbe4e ;
139
+ color : white;
140
+ }
126
141
.project-detail-element > .clickable : hover , .clickable : hover .chip : hover {
127
142
cursor : pointer;
128
143
background-color : # f3f5f8 ;
Original file line number Diff line number Diff line change 121
121
self . displayFilters = ! self . displayFilters
122
122
$ ( 'select' ) . material_select ( ) ;
123
123
}
124
+ self . issueStates = { }
124
125
125
126
$scope . sortOrder = function ( project ) {
126
127
return mapping [ project . status ] ;
480
481
}
481
482
482
483
$scope . getAllFilters ( ) ;
484
+ self . getIssueStateClass = function ( issue ) {
485
+ return self . issueStates [ issue ]
486
+ }
487
+
488
+ function getIssueState ( issue ) {
489
+ self . issueStates [ issue ] = 'no-state'
490
+ $http ( {
491
+ method : 'GET' ,
492
+ url : 'https://webservices.coala.io/issue/details' ,
493
+ params : { url : issue }
494
+ } ) . then ( function ( response ) {
495
+ var issue_data = response . data
496
+ self . issueStates [ issue ] = issue_data . state
497
+ } )
498
+ }
499
+
500
+ function getAllRelatedIssuesState ( ) {
501
+ $http . get ( 'data/projects.liquid' )
502
+ . then ( function ( res ) {
503
+ angular . forEach ( res . data , function ( project ) {
504
+ angular . forEach ( project . issues , function ( issue ) {
505
+ getIssueState ( issue )
506
+ } )
507
+ } )
508
+ } )
509
+ }
510
+ getAllRelatedIssuesState ( )
511
+
483
512
} ,
484
513
controllerAs : 'lc'
485
514
}
You can’t perform that action at this time.
0 commit comments