<div class="panel panel-default mg" ng-controller="TkjsBatchAddCourseCtrl">
<div cg-busy="{promise:myPromise,message:'正在加载...'}"></div>
<div class="panel-body">
	<fieldset><legend>添加命题建设课程</legend></fieldset>
	<div class="form-inline">
		<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>课程代码</th>
	  		<th>课程名称</th>
	  		<th>操作</th>
	 	</tr>
	 	<tr ng-repeat="row in pageModel.array">
	 		<td>{{row.code}}</td>
	 		<td>{{row.name}}</td>
			<td>
				<button ng-click="addCourse(row)" class="btn btn-success btn-xs" ng-if="!row.inBatch">
					<i class="glyphicon glyphicon-plus"></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>
