重构管理员列表页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,19 +12,17 @@ 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">
<?php if ($this->msg) : ?> <?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; ?>
<form action="" method="get" class="search input-append"> <form action="" method="get" class="search input-append">
<input type="hidden" name="search" value='1' /> <input type="hidden" name="search" value='1' />
<input type="hidden" name="id" value='<?php echo $this->id;?>' /> <input type="hidden" name="id" value='<?php echo $this->id;?>' />

View File

@ -1,46 +1,51 @@
<?php <?php
$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'); ?> <style>
</div> table thead tr th {background:#EBF2F6;color:#444;}
.high{background:#444;color:#FFF;}
<div id="rightPanel"> </style>
<div class="title">管理员列表</div> <div class="row-fluid">
<table> <div class="span3"><?= $this->partial('user/left.phtml'); ?></div>
<thead>
<tr> <div class="span9">
<td width='150'>用户名</td> <div style="font-size:26px; font-family:微软雅黑; text-align:center;line-height:30px;">管理员列表</div>
<td width='250'>电子邮箱</td> <table class="table table-bordered table-hover table-condensed"><thead>
<td width='100'>用户类型</td> <thead>
<td width='150'>真实姓名</td> <tr>
<td width='150'>电话</td> <th>用户名</th>
<td width='150'>操作</td> <th>电子邮箱</th>
</tr> <th>用户类型</th>
</thead> <th>真实姓名</th>
<?php if (count($this->paginator)): ?> <th>电话</th>
<?php $autoindex=0;?> <th>操作</th>
<?php foreach ($this->paginator as $item): ?> </tr>
<?php $autoindex++;?> </thead>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>"> <?php if (count($this->paginator)): ?>
<td><?= $item['username']?></td> <?php $autoindex=0;?>
<td><?= $item['email']; ?></td> <?php foreach ($this->paginator as $item): ?>
<td><?= $item['usertype']; ?></td> <?php $autoindex++;?>
<td><?= $item['realname']; ?></td> <tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td><?= $item['phone']; ?></td> <td><?= $item['username']?></td>
<td> <td><?= $item['email']; ?></td>
<a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a> <td><?= $item['usertype']; ?></td>
</td> <td><?= $item['realname']; ?></td>
</tr> <td><?= $item['phone']; ?></td>
<?php endforeach; ?> <td>
<?php endif; ?> <a href='/admin/user/show/id/<?= $item['id'];?>'>查看详细</a>
</table> </td>
<div class="pagenavi"><?= $this->paginator; ?></div> </tr>
</div> <?php endforeach; ?>
<?php endif; ?>
</table>
<div class="pagenavi"><?= $this->paginator; ?></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;}
.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">
<div style="font-size:26px; font-family:微软雅黑; text-align:center;line-height:30px;">用户列表</div>
<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>
</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> </div>
<?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">
<div style="font-size:16px;line-height:30px;">用户列表</div>
<div class="search">
<form action="/admin/user/search/" method="get">
<input type="hidden" name="search" value='1' />
<ul>
<li><label>姓名</label><input type="text" name="realname" value="<?php echo $this->realname; ?>" /></li>
<li><label>单位</label><input type="text" name="unit" value="<?php echo $this->unit; ?>" /></li>
<li><label>项目</label><input type="text" name="project" value="<?php echo $this->project; ?>" /></li>
<li><input type="submit" class="searchbtn" value="搜索" /></li>
</ul>
</form>
</div><!-- search DIV -->
<table>
<thead>
<tr>
<td width='150'>用户名</td>
<td width='250'>电子邮箱</td>
<td width='100'>用户类型</td>
<td width='200'>单位</td>
<td width='100'>真实姓名</td>
<td width='150'>操作</td>
</tr>
</thead><!-- table's head -->
<?php if (count($this->paginator)): ?>
<?php $autoindex=0;?>
<?php foreach ($this->paginator as $item): ?>
<?php $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<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>