<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>人员证书信息管理</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		img{width: 50px;height: 50px;}
	</style>
	<script type="text/javascript">
        $(function(){
//            $("img").not(".upload_ico").each(function () {
//                var num = 1 ;
//                $(this).click(function () {
//                    var flag = num%2;
//                    if(flag == 1){
//                        $(this).css("width","90%");
//                        $(this).css("height","90%");
//                        num++;
//                    }else if(flag ==0){
//                        $(this).css("width","50px");
//                        $(this).css("height","50px");
//                        num++;
//                    }
//                })
//            });
        });

	</script>
</head>
<body class="hideScroll">
		<form:form id="inputForm" modelAttribute="userInfo" class="form-horizontal">
		<table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
		   <tbody>
			   <tr>
				   <td class="width-15 active"><label class="pull-right">姓名：</label></td>
				   <td class="width-35">
						   ${userInfo.name}
				   </td>
				   <td class="width-15 active"><label class="pull-right">性别：</label></td>
				   <td class="width-35">
						   ${fns:getDictLabel(userInfo.gender,'sex' ,'' )}
				   </td>
			   </tr>
			   <tr>
				   <td class="width-15 active"><label class="pull-right">昵称：</label></td>
				   <td class="width-35">
						   ${userInfo.nickName}
				   </td>
				   <td class="width-15 active"><label class="pull-right">工号：</label></td>
				   <td class="width-35">
						   ${userInfo.jobNumber}
				   </td>
			   </tr>
			   <tr>
				   <td class="width-15 active"><label class="pull-right">联系电话：</label></td>
				   <td class="width-35">
						   ${userInfo.mobilePhone}
				   </td>
				   <td class="width-15 active"><label class="pull-right">电子邮件：</label></td>
				   <td class="width-35">
						   ${userInfo.email}
				   </td>
			   </tr>
			   <tr>
				   <td class="width-15 active"><label class="pull-right">个人简介：</label></td>
				   <td class="width-35" colspan="3">
						   ${userInfo.personalProfile}
				   </td>
			   </tr>
			   <tr>
				   <td class="width-15 active"><label class="pull-right">备注信息：</label></td>
				   <td class="width-35" colspan="3">
						   ${userInfo.remarks}
				   </td>
			   </tr>
			   <tr>
				   <td class="width-15 active"><label class="pull-right">证书信息：</label></td>
				   <td class="width-35" colspan="3">
					   <table id="certificate_list"  style="text-align: center;width: 100%;margin-top:10px;"  class="table table-striped table-bordered table-condensed" >
						   <tr>
							   <td>序号</td><td>证书名称</td><td>证书编号</td>
							   <td>证书专业</td><td>证书等级</td><td>取得日期</td><td>到期日期</td>
							   <td>操作</td>
						   </tr>
						   <c:forEach items="${userInfo.certificateList}" var="cer" varStatus="index">
							   <tr>
								   <td>${index.index + 1}</td>
								   <td>${cer.name}</td>
								   <td>${cer.number}</td>
								   <td>${cer.profession}</td>
								   <td>${cer.level}</td>
								   <td><fmt:formatDate value="${cer.getDate}" pattern="yyyy-MM-dd"/></td>
								   <td><fmt:formatDate value="${cer.endDate}" pattern="yyyy-MM-dd"/></td>
								   <td>
									   <div>
										   <div style="float: right;margin: 5px;">
											   <%--<a href="${ctx}/workfullmanage/workFullManage/downLoadAttach?file=${cer.certificate.url}" class="btn btn-success btn-xs">下载</a>--%>
												   <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${cer.certificate.url}');" class="btn btn-success btn-xs">下载</a>
										   </div>
										   <div style="float: right;margin: 5px;">
											   <img alt="" src="${cer.certificate.url}" onclick="openDialogView(' ','${ctx}/sys/picturepreview/picturePreview?url=${cer.certificate.url}','80%','80%')" height="50px;" width="50px;">
										   </div>
									   </div>
								   </td>
							   </tr>
						   </c:forEach>
					   </table>

				   </td>
			   </tr>
		 	</tbody>
		</table>
	</form:form>
</body>
</html>