<div ng-controller="InputTaskListCtrl" class="wrapper">
	<div class="panel panel-default">
		<div class="panel-body">
			<button ui-sref="batch.info.inputTasksAdd" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
				<i class="glyphicon glyphicon-plus"> 添加录题任务</i>
			</button>
			<button ui-sref="batch.info.inputTasksRelatedInputers" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
				<i class="glyphicon glyphicon-user"> 关联录入员</i>
			</button>
			<button class="btn btn-default" ng-if="curUserRole.code=='processManagement'" ng-click="expQuestions()">
				<i class="glyphicon glyphicon-export"> 导出题卡</i>
			</button>
			<button class="btn btn-default" ng-if="curUserRole.code=='processManagement'" ng-click="impQuestions()">
				<i class="glyphicon glyphicon-export"> 导入题卡</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.inputers}}</td>
						<td>{{row.inputNum}}</td>
						<td>
							<button ng-if="curUserRole.code=='processManagement' && 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>