<div ng-controller="TkjsTaskListCtrl" class="wrapper">
	<div class="panel panel-default">
		<div class="panel-body">
			<button ui-sref="batch.info.tkjsTasksAdd" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
				<i class="glyphicon glyphicon-plus"> 添加题库建设任务</i>
			</button>
			<button ui-sref="batch.info.tkjsTasksRelatedTeachers" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
				<i class="glyphicon glyphicon-user"> 关联命题教师</i>
			</button>
			<table class="table table-striped">
				<thead>
					<tr>
						<th>序号</th>
						<th>课程代码</th>
						<th>课程名称</th>
						<th>命题教师</th>
						<th>命题数量</th>
						<th>操作</th>
					</tr>										
				</thead>
				<tbody>
					<tr ng-repeat="row in array | filter:search" class="{{row.course == null ? 'text-success' : ''}}">
						<td><span ng-if="row.id!=null">{{$index+1}}</span></td>
						<td>{{row.courseCode}}</td>
						<td>{{row.course.name}}</td>
						<td>{{row.teachers}}</td>
						<td>{{row.inputNum}}</td>
						<td>
							<button ng-if="row.course != null" ng-click="delete(row)" class="btn btn-danger btn-xs">
								<i class="glyphicon glyphicon-trash"> 删除</i>								
							</button>
						</td>
					</tr>
				</tbody>

			</table>
		</div>
	</div>
</div>