分离本地用户和所有用户的查看,增加本地用户添加窗口

This commit is contained in:
Li Jianxuan 2013-12-16 08:29:55 +00:00
parent 65fc779e54
commit d8b42ac090
7 changed files with 62 additions and 52 deletions

View File

@ -1,4 +1,7 @@
<?php
use Helpers\View as view;
use Helpers\dbh;
class Admin_UserController extends Zend_Controller_Action
{
function preDispatch()
@ -31,21 +34,24 @@ class Admin_UserController extends Zend_Controller_Action
function listAction()
{
$select=$this->db->select();
$select->from('users')
->where('usertype = ?', 'member')
->order('users.id desc');
view::addPaginator($select,$this,20);
}//listAction
$paginator = Zend_Paginator::factory($select);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(30);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
$this->view->paginator=$paginator;
function localAction()
{
$select=$this->db->select();
$select->from(array('u'=>'users'))
->join(array('l'=>'users_local'),'u.id=l.uid')
->order('u.id desc');
view::addPaginator($select,$this,20);
}//listAction
function searchAction()

View File

@ -1,12 +1,12 @@
<ul class="nav nav-pills nav-stacked well">
<span class="label"><h4>元数据评审</h4></span>
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li>
<li id="Nav-review-editor"><a href="/admin/review/editor">分配责任编辑</a></li>
<li id="Nav-review-accept"><a href="/admin/review/accept">待审元数据</a></li>
<!-- <li id="Nav-review-inreview"><a href="/admin/review/inreview">在审元数据</a></li> -->
<li id="Nav-review-myreview"><a href="/admin/review/myreview">我负责的元数据</a></li>
<li id="Nav-review-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</a></li>
<li id="Nav-review-experts"><a href="/admin/review/experts">专家库</a></li>
<li id="Nav-review-canceled"><a href="/admin/review/canceled">已取消评审的元数据</a></li>
<li id="Nav-review-comments"><a href="/admin/review/comments">元数据评审管理</a></li>
<span class="label"><h4>元数据评审</h4></span>
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li>
<li id="Nav-review-editor"><a href="/admin/review/editor">分配责任编辑</a></li>
<li id="Nav-review-accept"><a href="/admin/review/accept">待审元数据</a></li>
<!-- <li id="Nav-review-inreview"><a href="/admin/review/inreview">在审元数据</a></li> -->
<li id="Nav-review-myreview"><a href="/admin/review/myreview">我负责的元数据</a></li>
<li id="Nav-review-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</a></li>
<li id="Nav-review-experts"><a href="/admin/review/experts">专家库</a></li>
<li id="Nav-review-canceled"><a href="/admin/review/canceled">已取消评审的元数据</a></li>
<li id="Nav-review-comments"><a href="/admin/review/comments">元数据评审管理</a></li>
</ul>

View File

@ -17,7 +17,8 @@ table thead tr th {background:#EBF2F6;color:#444;}
<div class="span3"><?= $this->partial('user/left.phtml'); ?></div>
<div class="span9">
<div style="font-size:26px; font-family:微软雅黑; text-align:center;line-height:30px;">管理员列表</div>
<h3>管理员列表</h3>
<hr />
<table class="table table-bordered table-hover table-condensed"><thead>
<thead>
<tr>

View File

@ -12,14 +12,16 @@
</div>
<div id="rightPanel">
<div>用户总数: <?php echo $this->su['total'];?>,其中管理员: <?php echo $this->suadmin['total'];?></div>
<div>搜索用户
<div><h4>用户总数: <?php echo $this->su['total'];?>,其中管理员: <?php echo $this->suadmin['total'];?></h4></div>
<hr />
<div>
<h4>搜索用户</h4>
<form action="/admin/user/search/" method="get">
<input type="hidden" name="search" value='1' />
<div>姓名 <input type="text" name="realname" /></div>
<div>单位 <input type="text" name="unit" /></div>
<div>项目 <input type="text" name="project" /></div>
<div><input type="submit" value="搜索" /></div>
<div><input type="submit" class="btn btn-success" value="搜索" /></div>
</form>
</div>
</div>

View File

@ -1,11 +1,10 @@
<ul>
<li class="title">用户管理</li>
<ul class="nav nav-pills nav-stacked well">
<span class="label"><h4>用户管理</h4></span>
<li><a href="/admin/user/">用户管理首页</a></li>
<li><a href="/admin/user/list">普通用户列表</a></li>
<li><a href="/admin/user/local">本地账户</a></li>
<li><a href="/admin/user/adminlist">管理员列表</a></li>
<li><a href="/admin/user/list">查看所有账户</a></li>
<li><a href="/admin/user/group">用户组管理</a></li>
<li><a href="/admin/review/experts">元数据评审专家库</a></li>
<li><a href="/admin/user/sendmail/">长时间未登录用户</a></li>
<li><a href="/admin/user/sendmail/ac/heihe">数字黑河用户</a></li>
<li><a href="/admin/user/sendmail/ac/holiday">节日祝贺邮件</a></li>
</ul>

View File

@ -2,7 +2,6 @@
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
# $this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin/">后台首页</a>');
$this->breadcrumb('<a href="/admin/user">用户管理</a>');
@ -31,7 +30,8 @@ table thead tr th {background:#EBF2F6;color:#444;}
<div id="rightPanel">
<div style="font-size:26px; font-family:微软雅黑; text-align:center;line-height:30px;">用户列表</div>
<h3>用户列表</h3>
<hr />
<div class="search">
<form action="/admin/user/search/" method="get" class="search input-append">
<input type="hidden" name="search" value='1' />

View File

@ -82,4 +82,6 @@ class Users extends \Zend_Controller_Plugin_Abstract
}
}