sys_user_list.jsp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<s:set name="page" value="page" scope="request" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户列表</title>
<%@ include file="/common/jsCss.jsp"%>
<script type="text/javascript">
function add()
{
location.href='<s:url value="/admin/sys_user!add.action"/>';
}

function deleteItems()
{
var $idsCheckedCheck = $("#listTable input[name='ids']:checked");
if ($idsCheckedCheck.size()==0)
{
$.message({type: "warn", content:"请选择!"});
return false;
}

$.dialog({type: "warn", content: "您确定要删除这些用户吗?如果确定删除,则与这些用户相关的所有信息将无法使用!", ok: "确 定", cancel: "取 消", modal: true, okCallback: batchDelete});
function batchDelete() {
var url = '<s:url value="/admin/sys_user!delete.action" />';
$("#listForm").attr("action",url);
$("#listForm").submit();
}
}
</script>
</head>

<body class="list">
<div class="bar"><span class="fl">用户管理 -> 用户列表</span></div>
<div class="body">
<form id="listForm" method="post" action="<y:url>/admin/sys_user!list.action</y:url>">
<div class="listBar">
<span class="fl">
<input type="button" hidefocus="" value="添加记录" onclick="add()" class="formButton"/>&nbsp;&nbsp;
<input type="button" hidefocus="" value="删 除" onclick="deleteItems()" class="formButton"/>
</span>
<span class="fr">
    用户名:<s:textfield id="sysUser.userName" name="sysUser.userName" size="12" onkeydown="if(event.keyCode==13)search();"/>
    用户类型:<s:select id="sysUser.userType" name="sysUser.userType" headerKey="" headerValue="%{getText('common.selectone')}" list="getAdminUserTypeMap()" listKey="key" listValue="value"/>
        <input type="button" hidefocus="" value="搜 索" class="formButton" id="searchButton"/>
</span>
</div>
<table class="listTable en" id="listTable">
<tbody>
<tr>
<th class="check"><s:checkbox name="no-use" cssClass="allCheck"/></th>
<th><a hidefocus="" name="userName" class="sort">用户名</a></th>
<th><a hidefocus="" name="userType" class="sort">用户类型</a></th>
<th><a hidefocus="" name="createTime" class="sort">创建时间</a></th>
<th><a hidefocus="" name="status">用户状态</a></th>
<th><a hidefocus="" name="roles">角色列表</a></th>
<th><span>操作</span></th>
</tr>
    <s:if test="page.dataList!=null && page.dataList.size()>0">
        <s:iterator value="page.dataList">
<tr>
    <td>
    <s:if test="status == 3">
    <input name="ids" type="checkbox" value="<s:property value='id'/>" disabled="true" />
    </s:if>
<s:else>
<input name="ids" type="checkbox" value="<s:property value='id'/>"/>
</s:else>
<br/>
</td>
<td><span title="<s:property value="userName"/>"><a href="<s:url value="/admin/sys_user!view.action"><s:param name="id" value="id"/></s:url>"><s:property value="userName"/></a></span></td>
<td><s:property value="getUserTypeMap().get(userType)"/></td>
<td><s:property value="createTime"/></td>
<td>
<s:if test="status == 0"><font color="blank"><s:property value="getUserStatusMap().get(status)"/></font></s:if>
    <s:if test="status == 1"><font color="green"><s:property value="getUserStatusMap().get(status)"/></font></s:if>
    <s:if test="status == 2"><font color="brue"><s:property value="getUserStatusMap().get(status)"/></font></s:if>
    <s:if test="status == 3"><font color="red"><s:property value="getUserStatusMap().get(status)"/></font></s:if>
</td>
<td><s:property value="roleNames"/></td>
<td>
    <s:if test="status < 3">
    <a title="分配角色" href="<s:url value="/admin/role!select.action"><s:param name="userId" value="id"/></s:url>">[分配角色]</a>
<a title="编辑" href="<s:url value="/admin/sys_user!edit.action"><s:param name="id" value="id"/></s:url>">[编辑]</a>
</s:if>
<a title="浏览" href="<s:url value="/admin/sys_user!view.action"><s:param name="id" value="id"/></s:url>">[浏览]</a>
</td>
</tr>
            </s:iterator>
        </s:if>
        <s:else>
    <tr>
    <td colspan="7"><s:text name="common.norecord"></s:text></td>
    </tr>
      </s:else>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <s:url  var="sysUserUrl" includeContext="true" escapeAmp="false" encode="false" value="/admin/sys_user!list.action?page.pageNo=#pageNo#"  includeParams="none">
<s:param name="page.orderBy" value="page.orderBy"/>
<s:param name="page.order" value="page.order"/>
<s:param name="sysUser.userName" value="sysUser.userName"/>
<s:param name="sysUser.userType" value="sysUser.userType"/>
    </s:url>
    <s:set name="url" value="%{sysUserUrl}" scope="request"></s:set>
        <td height="30" align="right">&nbsp;
            <s:if test="page.dataList!=null && page.dataList.size()>0">
            <y:pagination url="${requestScope.url}" includeContext="false" pagingHelper="${requestScope.page}"/>
            </s:if>
        </td>
    </tr>
</table>
<s:hidden name="page.orderBy" id="orderBy"></s:hidden>
<s:hidden name="page.order" id="order"></s:hidden>
</form>
</div>
</body>
</html>

你可能感兴趣的:(list)