<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>工作流角色信息管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		});
	</script>
	<style>
		body{
			background-color:transparent;
			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
			color:#ffffff;
			background-color:rgba(255,255,255,0);
			height:100%;
		}
	</style>
</head>
<body>
<div class="wrapper wrapper-content">
	<sys:message content="${message}"/>
	<div class="layui-row">
		<div class="full-width fl">
			<div class="contentShadow layui-row" id="queryDiv">
			<form:form id="searchForm" modelAttribute="sysRoleActivity" action="${ctx}/sys/sysroleactivity/" method="post" class="form-inline">
				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
				<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->

				<div class="commonQuery">
					<div class="layui-item query athird">
						<label class="layui-form-label">角色名称：</label>
						<div class="layui-input-block with-icon">
							<form:input path="name" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
						</div>
					</div>
					<div class="layui-item query athird ">
						<label class="layui-form-label">角色类型：</label>
						<div class="layui-input-block">
							<form:select path="type" class=" form-control  simple-select">
								<form:option value="" label=""/>
								<form:options items="${fns:getDictList('sys_role_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
							</form:select>
						</div>
					</div>

					<div class="layui-item athird fr">
						<div class="input-group">
							<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
							<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
						</div>
					</div>
					<div style="    clear:both;"></div>
				</div>
			</form:form>
			</div>
		</div>

		<div class="full-width fl">
			<div class="contentShadow layui-form contentDetails">
				<div class="nav-btns">
					<shiro:hasPermission name="sys:sysroleactivity:add">
						<table:addRow url="${ctx}/sys/sysroleactivity/form" title="工作流角色信息" width="95%" height="95%"></table:addRow><!-- 增加按钮 -->
					</shiro:hasPermission>
					<%--<shiro:hasPermission name="sys:sysroleactivity:del">
						<table:delRow url="${ctx}/sys/sysroleactivity/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
					</shiro:hasPermission>--%>
					<shiro:hasPermission name="sys:sysroleactivity:import">
						<table:importExcel url="${ctx}/sys/sysroleactivity/import"></table:importExcel><!-- 导入按钮 -->
					</shiro:hasPermission>
					<shiro:hasPermission name="sys:sysroleactivity:export">
						<table:exportExcel url="${ctx}/sys/sysroleactivity/export"></table:exportExcel><!-- 导出按钮 -->
					</shiro:hasPermission>
					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
					<div style="clear: both;"></div>
				</div>

				<!-- 表格 -->
				<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
					<thead>
						<tr>
							<th width="50"> <input type="checkbox" class="i-checks"></th>
							<th  class="sort-column name">角色名称</th>
							<th  class="sort-column type">角色类型</th>
							<th  class="sort-column sort">编码</th>
							<th  class="sort-column remarks">备注信息</th>
							<th width="200">操作</th>
						</tr>
					</thead>
					<tbody>
					<c:choose>
						<c:when test="${not empty page.list}">

							<c:forEach items="${page.list}" var="sysRoleActivity">
								<tr>
									<td> <input type="checkbox" id="${sysRoleActivity.id}" class="i-checks"></td>
									<td><a class="attention-info" href="javascript:void(0);" onclick="openDialogView('查看工作流角色信息', '${ctx}/sys/sysroleactivity/form?id=${sysRoleActivity.id}&view=1','95%', '95%')">
										${sysRoleActivity.name}
									</a></td>
									<td>
										${fns:getDictLabel(sysRoleActivity.type, 'sys_role_type', '')}
									</td>
									<td>
										${sysRoleActivity.sort}
									</td>
									<td>
										${sysRoleActivity.remarks}
									</td>
									<td class="op-td text-center">
										<div class="op-btn-box">
											<shiro:hasPermission name="sys:sysroleactivity:edit">
												<a href="#" onclick="openDialog('修改工作流角色信息', '${ctx}/sys/sysroleactivity/form?id=${sysRoleActivity.id}','95%', '95%')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>
											</shiro:hasPermission>
											<shiro:hasPermission name="sys:sysroleactivity:edit">
												<a href="${ctx}/sys/sysroleactivity/delete?id=${sysRoleActivity.id}" onclick="return confirmx('确认要删除该角色吗？', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>
											</shiro:hasPermission>
										</div>
									</td>
								</tr>
							</c:forEach>
						</c:when>
						<c:otherwise>
							<tr>
								<td colspan="5" align="center">暂无数据</td>
							</tr>
						</c:otherwise>
					</c:choose>
					</tbody>
				</table>

					<!-- 分页代码 -->
				<table:page page="${page}"></table:page>
				<div style="clear: both;"></div>
			</div>
		</div>
	</div>
</div>
<script>
    $("a").on("click",addLinkVisied);

    resizeListWindow1();
    $(window).resize(function(){
        resizeListWindow1();
    });
</script>
</body>
</html>