westdc-zf1/application/admin/views/scripts/user/local.phtml

148 lines
6.3 KiB
PHTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/">后台首页</a>');
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
$this->breadcrumb()->setSeparator(' > ');
?>
<style>
table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
</style>
<script>
var configure = {
modalid : 'xform-Modal',
formid : 'user_local_add',
requesturl : '/admin/user/local/ac/addLocal'
}
$(document).ready(function(e) {
$('#xform-submit').click(function(e) {
xform.submit();
});
$('#xform-reset').click(function(e) {
$('#'+configure.formid)[0].reset();
});
$('#xform-close').click(function(e) {
$('#'+configure.modalid).modal('hide');
});
$('.xform-edit').click(function(e) {
xform.edit($(this).data('field'));
$('#'+configure.modalid).modal('show');
});
$('#'+configure.modalid).on('hide', function () {
$('#'+configure.formid)[0].reset();
})
});
</script>
<script type="text/javascript" src="/js/lib/custom/models/admin-xform.js"></script>
<div class="row-fluid">
<div class="span3">
<div id="leftPanel"><?= $this->partial('user/left.phtml'); ?></div>
</div>
<div class="span9">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
<div id="rightPanel">
<h3>用户列表</h3>
<hr />
<div class="search">
<form action="/admin/user/search/" method="get" class="search input-append">
<input type="hidden" name="search" value='1' />
<ul class="inline">
<li><label>姓名</label><input type="text" name="realname" value="<?php echo $this->realname; ?>" class="search-query"/></li>
<li><label>单位</label><input type="text" name="unit" value="<?php echo $this->unit; ?>" class="search-query"/></li>
<li><label>项目</label><input type="text" name="project" value="<?php echo $this->project; ?>" class="search-query"/></li>
<li><input type="submit" class="btn" value="搜索" /></li>
</ul>
</form>
<!-- Button to trigger modal -->
<a href="#xform-Modal" role="button" class="btn btn-primary pull-right xform-show" data-toggle="modal">添加本地用户</a>
<!-- Modal -->
<div id="xform-Modal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">添加本地用户</h3>
</div>
<div class="modal-body">
<form class="form-horizontal" method="post" id="user_local_add">
<div class="control-group">
<label for="inputRefid" class="control-label">用户ID</label>
<div class="controls">
<input type="text" value="" placeholder="用户ID" id="inputUserid" name="userid" />
</div>
</div>
<div class="control-group">
<label class="control-label">用户类型</label>
<div class="controls">
<label class="radio"><input type="radio" value="member" name="usertype" checked="checked" /> 普通用户</label>
<label class="radio"><input type="radio" value="administrator" name="usertype" /> 管理员</label>
</div>
</div>
<input type="hidden" value="addLocal" name="ac" />
<input type="hidden" value="submit" name="submit" />
</form>
</div>
<div id="alert-info"></div>
<div class="modal-footer">
<div class="progress progress-striped active" id="submit-loading" style="display:none;">
<div class="bar" style="width:100%;"></div>
</div>
<button class="btn" id="xform-reset">Reset</button>
<button class="btn" id="xform-close">Close</button>
<button class="btn btn-primary" id="xform-submit">Save changes</button>
</div>
</div><!-- xformpartinal -->
</div><!-- search DIV -->
<table class="table table-bordered table-hover table-condensed"><thead>
<tr>
<th>用户名</th>
<th>电子邮箱</th>
<th>用户类型</th>
<th>单位</th>
<th>真实姓名</th>
<th>操作</th>
</tr>
</thead><!-- table's head -->
<?php if (count($this->paginator)): ?>
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr>
<td><?= $item['username']?></td>
<td><?= $item['email']; ?></td>
<td><?= $item['usertype']; ?></td>
<td><?= $item['unit']; ?></td>
<td><?= $item['realname']; ?></td>
<td>
<a href='/admin/user/local/ac/delete/id/<?= $item['id'];?>' onclick="return confirm('确定将此记录删除?')">删除</a>
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
<a href='/admin/user/fetchpwd/email/<?= $item['email'];?>/id/<?= $item['id'];?>' onclick="return confirm('是否确定为他重置密码?')">重置密码</a>
<a href='/admin/user/up/id/<?= $item['id'];?>' onclick="return confirm('确定将该用户提升为评审专家?')">提升为评审专家</a>
<a href="javascript:void(0);" class="xform-edit" data-field='<?= json_encode(array('userid'=>$item['id'],'usertype'=>$item['usertype']),JSON_NUMERIC_CHECK) ?>'>编辑权限</a>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>