添加本地用户列表

This commit is contained in:
Li Jianxuan 2013-12-16 08:45:15 +00:00
parent d8b42ac090
commit c0020d2aa1
1 changed files with 114 additions and 0 deletions

View File

@ -0,0 +1,114 @@
<?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>
<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="#myModal" role="button" class="btn btn-primary pull-right" data-toggle="modal">添加本地用户</a>
<!-- Modal -->
<div id="myModal" 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="mdref">
<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="member" name="usertype"> 管理员</label>
</div>
</div>
<input type="hidden" value="" name="id">
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
<button class="btn btn-primary">提交</button>
</div>
</div>
</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/delete/id/<?= $item['id'];?>/uname/<?= $item['username'];?>' 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="/admin/user/userauth/uid/<?= $item['id'];?>">编辑权限</a>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>