<div class="panel panel-default mg" ng-controller="TkjsTaskRelatedTeachersCtrl">
<div cg-busy="{promise:myPromise,message:'正在加载...'}"></div>
<div class="panel-body">
	<div class="col-sm-4 list-group">
		<li ng-repeat="row in tasks | filter:{courseCode: '!总计'}" class="list-group-item {{row.id == curTask.id ? 'active' : ''}}" ng-click="selectTask(row)">
			<span class="badge">人数：{{row.teacherList.length}}</span>		
			<span>{{row.course.code}}-{{row.course.name}}</span>
		</li>
	</div>
	<div class="col-sm-4">
		<div class="form-inline">
			<label>所有命题教师：</label>
			<div class="input-group">
	      		<div class="input-group-addon"><i class="glyphicon glyphicon-search"></i></div>
				<input type="text" class="form-control" ng-model="search.keyword" placeholder="姓名或登录名" ng-change="goPage(1)" />
			</div>
		</div>
	  <table class="table table-striped table-bordered">
	  	<tr>
	  		<th class="col-sm-4">姓名</th>
	  		<th class="col-sm-4">登录名</th>
	  		<th>操作</th>
	 	</tr>
	 	<tr ng-repeat="row in pageModel.array">
	 		<td>{{row.name}}</td>
	 		<td>{{row.loginName}}</td>
			<td>
				<button ng-click="addRelation(row)" class="btn btn-default btn-xs">
					<i class="glyphicon glyphicon-arrow-right"></i>								
				</button>
			</td>
	 	</tr>
	  </table>
	  <nav ng-if="pageModel.totalPage > 1">
		<ul class="pagination">
		  	<li class="{{pageModel.curPage == 1 ? 'disabled' : ''}}" ng-click="goPage(pageModel.curPage - 1)">
				<a aria-label="Previous"><span aria-hidden="true"> 上一页</span></a>
	      	</li>
		    <li class="{{pageModel.curPage == pageModel.totalPage ? 'disabled' : ''}}" ng-click="goPage(pageModel.curPage + 1)">
		      	<a aria-label="Next"><span aria-hidden="true"> 下一页</span></a>
		    </li>
	    </ul>
    </nav>
	</div>
	<div class="col-sm-4">
		<span>已选中录入员：</span>
	  <table class="table table-striped table-bordered">
	  	<tr>
	  		<th>操作</th>
	  		<th>姓名</th>
	  		<th>登录名</th>
	 	</tr>
	 	<tr ng-repeat="row in curTask.teacherList">
	 		<td>
				<button ng-click="deleteRelation(row)" class="btn btn-danger btn-xs">
					<i class="glyphicon glyphicon-trash"></i>								
				</button>
			</td>
	 		<td>{{row.name}}</td>
	 		<td>{{row.loginName}}</td>
	 	</tr>
	  </table>
	  <!-- 
	  <form class="form-horizontal" name="form" novalidate ng-submit="submit()">	
		  <div class="form-group">
		    <div class="col-sm-offset-3 col-sm-9">
		      <button type="submit" ng-disabled='form.$invalid' class="btn btn-info btn-lg">保存</button>
		    </div>
		  </div>
		</form>
	   -->
	</div>
    </div>
    
</div>
