重构管理员列表页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

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