<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
xmlns:c="http://java.sun.com/jsp/jstl/core"
|
xmlns:h="http://java.sun.com/jsf/html"
|
xmlns:f="http://java.sun.com/jsf/core"
|
xmlns:ui="http://java.sun.com/jsf/facelets">
|
<ui:composition template="/template/nit/tmp_brief.xhtml">
|
<ui:define name="acss">
|
<style>
|
#searchBtn {
|
height: 34px;
|
}
|
p.error {
|
color: #D9534F
|
}
|
select.error, input.error {
|
border: 1px solid #D9534F;
|
}
|
i.fa.danger {
|
color: #D15B47
|
}
|
i.fa.success {
|
color: #87B87F
|
}
|
#simple-table th,#simple-table td{
|
text-align: center;
|
padding: 2px 8px;
|
}
|
.bigger-95{
|
font-size: 95% !important;
|
}
|
.btn-xs, .btn-group-xs > .btn{
|
padding-top: 0px;
|
padding-bottom: 0px;
|
}
|
#form .control-label {
|
margin-right: -14px
|
}
|
.t-error{
|
color: red;
|
position: relative;
|
right: 2px;
|
top: 3px;
|
}
|
</style>
|
</ui:define>
|
<ui:define name="acontent">
|
<div class="row main-content">
|
<div class="col-md-12 main-content-header">
|
<div class="row">
|
<div class="col-md-12 form-horizontal">
|
<div class="col-md-6">
|
<div class="input-group">
|
<input type="text" class="form-control" placeholder="请输入登录名"
|
aria-describedby="basic-addon2" data-bind="value:filter" /> <a
|
href="javascript:;" id="searcha" class="input-group-addon"><span
|
class="fa fa-search"></span></a>
|
</div>
|
</div>
|
<div class="col-md-4">
|
<select class="form-control"
|
data-bind="value:role,options:roles,optionsText:'name',optionsValue:'id',event:{change:change}"></select>
|
</div>
|
<div class="col-md-2">
|
<button id="ctbtn" type="button" class="btn btn-primary"
|
autocomplete="off">新建</button>
|
</div>
|
</div>
|
</div>
|
</div>
|
|
|
<table
|
class="table table-striped table-bordered table-condensed table-hover">
|
<thead>
|
<tr>
|
<th>序号</th>
|
<th>登陆名</th>
|
<th>email</th>
|
<th>所属角色</th>
|
<th>用户验证</th>
|
<th>是否有效</th>
|
<th>登录次数</th>
|
<th>最后登录</th>
|
<th>操作</th>
|
</tr>
|
</thead>
|
<tbody data-bind="foreach:users">
|
<tr>
|
<td data-bind="text:$index()+1">序号</td>
|
<td data-bind="text:$data.username">登陆名</td>
|
<td data-bind="text:$data.email">email</td>
|
<td
|
data-bindd="text:(($data.role()==null)?'':($data.role().name()))">所属角色</td>
|
<td data-bind="text:$data.certify==true?'是':'否'">用户验证</td>
|
<td><a href="javascrpt:;" data-bind="click:$parent.valid"><span
|
data-bind="css:$data.valid()==true?'fa fa-check':'fa fa-times' "></span></a></td>
|
<th data-bind="text:$data.logins">登录次数</th>
|
<th data-bind="text:$data.lastlogin">最后登录</th>
|
<td><a href="javascript:void(0);"
|
data-bind="click:$parent.rm" title="删除"><span
|
class="fa fa-times"></span></a>| <a href="javascript:void(0);"
|
data-bind="click:$parent.edit" title="编辑"><span
|
class="fa fa-edit"></span></a>| <a href="javascript:void(0);"
|
data-bind="click:$parent.rstpwd" title="密码重置"><span
|
class="fa fa-gift"></span></a></td>
|
</tr>
|
</tbody>
|
<tfoot>
|
<tr>
|
<td colspan="9">
|
<div id="pagdiv"></div>
|
</td>
|
</tr>
|
</tfoot>
|
</table>
|
</div>
|
<input type="hidden" value="#{jrole.role!=null?jrole.role.id:0}"
|
id="roleid" />
|
<input type="hidden" value="#{param.tid==null?0:param.tid}" id="tid" />
|
|
<div class="modal fade" id="modal1" tabindex="-1" role="dialog"
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
<div class="modal-dialog">
|
<div class="modal-content">
|
<div class="modal-header">
|
<button type="button" class="close" data-dismiss="modal"
|
aria-label="Close">
|
<span aria-hidden="true">×</span>
|
</button>
|
<h4 class="modal-title" data-bind="text:edittitle" ></h4>
|
</div>
|
<div class="modal-body">
|
<form class="form-horizontal" id="fm1">
|
<input type="hidden" name="id" id="id" value=""
|
data-bind="value:user().id" />
|
<div class="form-group">
|
<label for="username" class="col-sm-2 control-label">用户名</label>
|
<div class="col-sm-8">
|
<input type="text" class="form-control" id="username"
|
name="username" placeholder="username"
|
data-bind="value:user().username" />
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="description" class="col-sm-2 control-label">email</label>
|
<div class="col-sm-8">
|
<input type="text" class="form-control" id="email" name="email"
|
placeholder="请输入电子邮箱 !" data-bind="value:user().email" />
|
</div>
|
</div>
|
<div class="form-group">
|
<label for="TARGET" class="col-sm-2 control-label">角色</label>
|
<div class="col-sm-8">
|
<select
|
data-bind="value:role1,options:roles,optionsText:'name',optionsValue:'id'">
|
</select>
|
</div>
|
</div>
|
</form>
|
</div>
|
<div id="errmsg"></div>
|
<div class="modal-footer">
|
<button type="button" class="btn btn-primary"
|
data-loading-text="保存中..." id="tjbtn">提交</button>
|
</div>
|
</div>
|
</div>
|
</div>
|
</ui:define>
|
<ui:define name="myscript">
|
<script type="text/javascript" src="#{request.contextPath}/system/js/users.js"></script>
|
</ui:define>
|
</ui:composition>
|
</html>
|