<div ng-controller="AuditTaskListCtrl" class="wrapper">
	<div class="panel panel-default">
		<div class="panel-body">
			<div class="form-inline">
				<div class="col-md-10">
					<button ui-sref="batch.info.auditTasksImport" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
						<i class="glyphicon glyphicon-import"> 导入审题任务</i>
					</button>
					<button ui-sref="batch.info.auditTasksAdd" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
						<i class="glyphicon glyphicon-plus"> 添加审题任务</i>
					</button>
					<button ui-sref="batch.info.auditTaskRelatedTeachers" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
						<i class="glyphicon glyphicon-user"> 关联审题教师</i>
					</button>
					<button ng-click="showStatModal()" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
						<i class="glyphicon glyphicon-stats"> 按审题教师统计</i>
					</button>
					<button ng-click="showStatModal2()" class="btn btn-default" ng-if="curUserRole.code=='processManagement'">
						<i class="glyphicon glyphicon-stats"> 按课程统计</i>
					</button>
				</div>
				<div class="input-group col-md-2">
		      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
					<input type="text" class="form-control" ng-model="search.courseCode" placeholder="课程代码" />
				</div>
			</div>
			<table class="table table-striped">
				<thead>
					<tr>
						<th>序号</th>
						<th ng-click="orderArray('courseCode')">课程代码 <i class="glyphicon glyphicon-sort text-muted"></i></th>
						<th>课程名称</th>
						<th class="col-md-3">审题教师</th>
						<th>操作</th>
					</tr>										
				</thead>
				<tbody>
					<tr ng-repeat="row in array | filter:search | orderBy: orderByColumn:orderByReverse">
						<td><span ng-if="row.id!=null">{{$index+1}}</span></td>
						<td>{{row.courseCode}}</td>
						<td>{{row.courseName}}</td>
						<td>{{row.auditors}}</td>
						<td>
							<button ng-if="row.id!=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>