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

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

View File

@ -1,12 +1,12 @@
<ul class="nav nav-pills nav-stacked well"> <ul class="nav nav-pills nav-stacked well">
<span class="label"><h4>元数据评审</h4></span> <span class="label"><h4>元数据评审</h4></span>
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li> <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-editor"><a href="/admin/review/editor">分配责任编辑</a></li>
<li id="Nav-review-accept"><a href="/admin/review/accept">待审元数据</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-inreview"><a href="/admin/review/inreview">在审元数据</a></li> -->
<li id="Nav-review-myreview"><a href="/admin/review/myreview">我负责的元数据</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-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</a></li>
<li id="Nav-review-experts"><a href="/admin/review/experts">专家库</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-canceled"><a href="/admin/review/canceled">已取消评审的元数据</a></li>
<li id="Nav-review-comments"><a href="/admin/review/comments">元数据评审管理</a></li> <li id="Nav-review-comments"><a href="/admin/review/comments">元数据评审管理</a></li>
</ul> </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="span3"><?= $this->partial('user/left.phtml'); ?></div>
<div class="span9"> <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> <table class="table table-bordered table-hover table-condensed"><thead>
<thead> <thead>
<tr> <tr>

View File

@ -1,25 +1,27 @@
<?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('后台管理首页'); $this->breadcrumb('后台管理首页');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id="leftPanel"> <div id="leftPanel">
<?= $this->partial('user/left.phtml'); ?> <?= $this->partial('user/left.phtml'); ?>
</div> </div>
<div id="rightPanel"> <div id="rightPanel">
<div>用户总数: <?php echo $this->su['total'];?>,其中管理员: <?php echo $this->suadmin['total'];?></div> <div><h4>用户总数: <?php echo $this->su['total'];?>,其中管理员: <?php echo $this->suadmin['total'];?></h4></div>
<div>搜索用户 <hr />
<form action="/admin/user/search/" method="get"> <div>
<input type="hidden" name="search" value='1' /> <h4>搜索用户</h4>
<div>姓名 <input type="text" name="realname" /></div> <form action="/admin/user/search/" method="get">
<div>单位 <input type="text" name="unit" /></div> <input type="hidden" name="search" value='1' />
<div>项目 <input type="text" name="project" /></div> <div>姓名 <input type="text" name="realname" /></div>
<div><input type="submit" value="搜索" /></div> <div>单位 <input type="text" name="unit" /></div>
</form> <div>项目 <input type="text" name="project" /></div>
</div> <div><input type="submit" class="btn btn-success" value="搜索" /></div>
</form>
</div>
</div> </div>

View File

@ -1,11 +1,10 @@
<ul> <ul class="nav nav-pills nav-stacked well">
<li class="title">用户管理</li> <span class="label"><h4>用户管理</h4></span>
<li><a href="/admin/user/">用户管理首页</a></li> <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/adminlist">管理员列表</a></li>
<li><a href="/admin/user/list">查看所有账户</a></li>
<li><a href="/admin/user/group">用户组管理</a></li> <li><a href="/admin/user/group">用户组管理</a></li>
<li><a href="/admin/review/experts">元数据评审专家库</a></li> <li><a href="/admin/review/experts">元数据评审专家库</a></li>
<li><a href="/admin/user/sendmail/">长时间未登录用户</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> </ul>

View File

@ -2,7 +2,6 @@
$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->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>');
@ -31,7 +30,8 @@ table thead tr th {background:#EBF2F6;color:#444;}
<div id="rightPanel"> <div id="rightPanel">
<div style="font-size:26px; font-family:微软雅黑; text-align:center;line-height:30px;">用户列表</div> <h3>用户列表</h3>
<hr />
<div class="search"> <div class="search">
<form action="/admin/user/search/" method="get" class="search input-append"> <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' />

View File

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