<!-- include 'header' -->
<body>
<div class="mainLayout">
	<div class="mainMenu">
		<div class="menuItem">
			<a href="#" class="mLogo">CLD</a>
			<ul>
				<!-- include 'menu' -->
			</ul>
		</div>
	</div>
	<div class="warpContent">
		<div class="subMenu fL">
			<div class="menuItem">
				<ul>
					<!-- include 'admin_menu' -->
				</ul>
			</div>
		</div>
		<div class="adminContent autoHeight">
			<div class="subNav">
				<ul class="navTabs">
					<li><a href="/holidaygroup">审批组</a></li>
					<li><a href="/hcsgroup">抄送人</a></li>
					<li class="active"><a href="/holidayadmin">假期管理</a></li>
				</ul>
			</div>
			<div class="control-group">
				<label class="control-label">假期管理</label>
				<div class="controls">
					<p class="cGroup">
						<!-- if isset({{adminList}}) && !empty({{adminList}}) -->
						<!-- loop adminList -->
						<span class="tagGroup">{{adminList' value.username}}<a href="#del" data-toggle="modal" role="button" title="删除" class="icon-" onclick='setdeladmin("{{adminList' value.id}}")'>k</a></span>
						<!-- endloop -->
						<!-- endif -->
					</p>
					<a href="#pikUser" data-toggle="modal">添加管理人</a>
				</div>
			</div>
		</div>
	</div>
</div>
<!--选择用户-->
<div class="modal hide fade" id="pikUser">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h3>选择管理人</h3>
			</div>
			<form method="post" action="/addholidayadmin" name="group" onsubmit="return checkadmingroup();">
			<div class="modal-body">
				<style>.controls > .checkbox{margin-left: 10px}</style>
				<div class="controls">
					<!-- loop staffList -->
					<label class="checkbox inline">
						<input type="checkbox" name="staff[]" value="{{staffList' value.sid}}:{{staffList' value.username}}"> {{staffList' value.username}}
					</label>
					<!-- endloop -->
				</div>
			</div>
			<div class="modal-footer">
				<div class="fR">
					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">取消</a>
					<button type="submit" class="button">确定添加</button>
				</div>
			</div>
			</form>
		</div>
	</div>
</div>
<!--选择用户-->

<!--弹出（删除抄送人）-->
<div class="modal hide fade" id="del">

	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<h3>确认删除</h3>
			</div>
			<div class="modal-body">
				<p>删除后，该用户将无法管理假期信息。</p>
			</div>
			<form method="post" action="/delholidayadmin">
				<input type="hidden" name="cidstaff" id="deladmin" value="">
				<div class="modal-footer">
					<a href="#" class="button btn-gray" data-dismiss="modal" aria-hidden="true">关闭</a>
					<button class="button" type="submit">确定</button>
				</div>
			</form>
		</div>
	</div>
</div>
<!--弹出-->

<script type="text/javascript">autoFlashHeight();</script>
<script>
	function checkadmingroup(){
		if(!$('input').is(":checked")){
			alert('请选择管理人');
			return false;
		}
	}

	function setdeladmin(id){
		$('#deladmin').val(id);
	}
</script>
</body>