Task list now shows associated project
Items in the task list now show the project they're associated with. Change-Id: I33f67f976c31cebb196fbd6626d9c5618b72108e
This commit is contained in:
parent
c1bb9b30f8
commit
8b9f371065
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
* not use this file except in compliance with the License. You may obtain
|
||||||
|
* a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controller for our story list.
|
||||||
|
*/
|
||||||
|
angular.module('sb.story').controller('StoryTaskListItemController',
|
||||||
|
function ($scope, Project) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var projectId = $scope.task.project_id || null;
|
||||||
|
|
||||||
|
if (!!projectId) {
|
||||||
|
Project.get({id: projectId},
|
||||||
|
function (project) {
|
||||||
|
$scope.project = project;
|
||||||
|
}, function () {
|
||||||
|
$scope.project = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
@ -107,7 +107,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="task in tasks">
|
<tr ng-repeat="task in tasks"
|
||||||
|
ng-controller="StoryTaskListItemController">
|
||||||
<td>
|
<td>
|
||||||
<p><strong>
|
<p><strong>
|
||||||
<a href="">{{task.id}}</a>
|
<a href="">{{task.id}}</a>
|
||||||
@ -120,9 +121,16 @@
|
|||||||
<small class="text-muted">{{task.description}}</small>
|
<small class="text-muted">{{task.description}}</small>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p><strong>
|
<p>
|
||||||
<a href="">Not Yet Implemented</a>
|
<a href="#!/project/{{project.id}}/overview"
|
||||||
</strong></p>
|
ng-show="project">
|
||||||
|
{{project.name}}
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<span class="text-danger" ng-hide="project">
|
||||||
|
Project not found
|
||||||
|
</span>
|
||||||
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<p class="text-success">{{task.status}}</p>
|
<p class="text-success">{{task.status}}</p>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user