<!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 ur
創作者介紹
創作者 shadow 的頭像
shadow

資訊園

shadow 發表在 痞客邦 留言(0) 人氣()