重构管理员列表页adminlist.phtml,普通用户列表页list.phtml

This commit is contained in:
Li Heng 2013-12-04 02:22:16 +00:00
parent 48d2740a4b
commit 2c50c49baf
3 changed files with 128 additions and 115 deletions

View File

@ -12,9 +12,7 @@ table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;} .high{background:#444;color:#FFF;}
</style> </style>
<div class="row-fluid"> <div class="row-fluid">
<div class="span3"> <div class="span3"><?= $this->partial('review/left.phtml'); ?></div>
<?= $this->partial('review/left.phtml'); ?>
</div>
<div class="span9"> <div class="span9">
<?php if ($this->msg or $this->messages) :?> <?php if ($this->msg or $this->messages) :?>
<div id="message"> <div id="message">

View File

@ -2,45 +2,50 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css'); # $this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/">后台首页</a>'); $this->breadcrumb('<a href="/admin/">后台首页</a>');
$this->breadcrumb('<a href="/admin/user">用户管理</a>'); $this->breadcrumb('<a href="/admin/user">用户管理</a>');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id="leftPanel">
<?= $this->partial('user/left.phtml'); ?>
</div>
<div id="rightPanel"> <style>
<div class="title">管理员列表</div> table thead tr th {background:#EBF2F6;color:#444;}
<table> .high{background:#444;color:#FFF;}
<thead> </style>
<tr> <div class="row-fluid">
<td width='150'>用户名</td> <div class="span3"><?= $this->partial('user/left.phtml'); ?></div>
<td width='250'>电子邮箱</td>
<td width='100'>用户类型</td> <div class="span9">
<td width='150'>真实姓名</td> <div style="font-size:26px; font-family:微软雅黑; text-align:center;line-height:30px;">管理员列表</div>
<td width='150'>电话</td> <table class="table table-bordered table-hover table-condensed"><thead>
<td width='150'>操作</td> <thead>
</tr> <tr>
</thead> <th>用户名</th>
<?php if (count($this->paginator)): ?> <th>电子邮箱</th>
<?php $autoindex=0;?> <th>用户类型</th>
<?php foreach ($this->paginator as $item): ?> <th>真实姓名</th>
<?php $autoindex++;?> <th>电话</th>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>"> <th>操作</th>
<td><?= $item['username']?></td> </tr>
<td><?= $item['email']; ?></td> </thead>
<td><?= $item['usertype']; ?></td> <?php if (count($this->paginator)): ?>
<td><?= $item['realname']; ?></td> <?php $autoindex=0;?>
<td><?= $item['phone']; ?></td> <?php foreach ($this->paginator as $item): ?>
<td> <?php $autoindex++;?>
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a> <tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
</td> <td><?= $item['username']?></td>
</tr> <td><?= $item['email']; ?></td>
<?php endforeach; ?> <td><?= $item['usertype']; ?></td>
<?php endif; ?> <td><?= $item['realname']; ?></td>
</table> <td><?= $item['phone']; ?></td>
<div class="pagenavi"><?= $this->paginator; ?></div> <td>
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div> </div>

View File

@ -2,71 +2,81 @@
$this->headTitle($this->config->title->site); $this->headTitle($this->config->title->site);
$this->headTitle('后台管理'); $this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css'); # $this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/">后台首页</a>'); $this->breadcrumb('<a href="/admin/">后台首页</a>');
$this->breadcrumb('<a href="/admin/user">用户管理</a>'); $this->breadcrumb('<a href="/admin/user">用户管理</a>');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id="leftPanel"> <style>
<?= $this->partial('user/left.phtml'); ?> table thead tr th {background:#EBF2F6;color:#444;}
</div> .high{background:#444;color:#FFF;}
</style>
<div class="row-fluid">
<div class="span3">
<div id="leftPanel"><?= $this->partial('user/left.phtml'); ?></div>
</div>
<?php if ($this->msg or $this->messages) :?>
<div id="message"> <div class="span9">
<?php if ($this->msg) : ?> <?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p> <p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?> <?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p> <p><?php echo $msg; ?></p>
<?php endforeach;endif; ?> <?php endforeach;endif; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<div id="rightPanel"> <div id="rightPanel">
<div style="font-size:16px;line-height:30px;">用户列表</div> <div style="font-size:26px; font-family:微软雅黑; text-align:center;line-height:30px;">用户列表</div>
<div class="search"> <div class="search">
<form action="/admin/user/search/" method="get"> <form action="/admin/user/search/" method="get" class="search input-append">
<input type="hidden" name="search" value='1' /> <input type="hidden" name="search" value='1' />
<ul> <ul class="inline">
<li><label>姓名</label><input type="text" name="realname" value="<?php echo $this->realname; ?>" /></li> <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; ?>" /></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; ?>" /></li> <li><label>项目</label><input type="text" name="project" value="<?php echo $this->project; ?>" class="search-query"/></li>
<li><input type="submit" class="searchbtn" value="搜索" /></li> <li><input type="submit" class="btn" value="搜索" /></li>
</ul> </ul>
</form> </form>
</div><!-- search DIV --> </div><!-- search DIV -->
<table> <table class="table table-bordered table-hover table-condensed"><thead>
<thead>
<tr> <tr>
<td width='150'>用户名</td> <th>用户名</th>
<td width='250'>电子邮箱</td> <th>电子邮箱</th>
<td width='100'>用户类型</td> <th>用户类型</th>
<td width='200'>单位</td> <th>单位</th>
<td width='100'>真实姓名</td> <th>真实姓名</th>
<td width='150'>操作</td> <th>操作</th>
</tr> </tr>
</thead><!-- table's head --> </thead><!-- table's head -->
<?php if (count($this->paginator)): ?> <?php if (count($this->paginator)): ?>
<?php $autoindex=0;?> <?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?> <?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?> <?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>"> <tr>
<td><?= $item['username']?></td> <td><?= $item['username']?></td>
<td><?= $item['email']; ?></td> <td><?= $item['email']; ?></td>
<td><?= $item['usertype']; ?></td> <td><?= $item['usertype']; ?></td>
<td><?= $item['unit']; ?></td> <td><?= $item['unit']; ?></td>
<td><?= $item['realname']; ?></td> <td><?= $item['realname']; ?></td>
<td> <td>
<a href='/admin/user/delete/id/<?= $item['id'];?>/uname/<?= $item['username'];?>' onclick="return confirm('确定将此记录删除?')">删除</a> <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/show/id/<?= $item['id'];?>'>查看详细</a>
<a href='/admin/user/fetchpwd/email/<?= $item['email'];?>/id/<?= $item['id'];?>' onclick="return confirm('是否确定为他重置密码?')">重置密码</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/up/id/<?= $item['id'];?>' onclick="return confirm('确定将该用户提升为评审专家?')">提升为评审专家</a>
<a href="/admin/user/userauth/uid/<?= $item['id'];?>">编辑权限</a> <a href="/admin/user/userauth/uid/<?= $item['id'];?>">编辑权限</a>
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
<?php endif; ?> <?php endif; ?>
</table> </table>
<div class="pagenavi"><?= $this->paginator; ?></div> <div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div> </div>