分离本地用户和所有用户的查看,增加本地用户添加窗口
This commit is contained in:
parent
65fc779e54
commit
d8b42ac090
|
@ -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
|
||||||
|
|
||||||
$paginator = Zend_Paginator::factory($select);
|
function localAction()
|
||||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
{
|
||||||
$paginator->setItemCountPerPage(30);
|
$select=$this->db->select();
|
||||||
$paginator->setView($this->view);
|
|
||||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
$select->from(array('u'=>'users'))
|
||||||
$this->view->paginator=$paginator;
|
->join(array('l'=>'users_local'),'u.id=l.uid')
|
||||||
|
->order('u.id desc');
|
||||||
|
|
||||||
|
view::addPaginator($select,$this,20);
|
||||||
}//listAction
|
}//listAction
|
||||||
|
|
||||||
function searchAction()
|
function searchAction()
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -12,14 +12,16 @@
|
||||||
</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 />
|
||||||
|
<div>
|
||||||
|
<h4>搜索用户</h4>
|
||||||
<form action="/admin/user/search/" method="get">
|
<form action="/admin/user/search/" method="get">
|
||||||
<input type="hidden" name="search" value='1' />
|
<input type="hidden" name="search" value='1' />
|
||||||
<div>姓名 <input type="text" name="realname" /></div>
|
<div>姓名 <input type="text" name="realname" /></div>
|
||||||
<div>单位 <input type="text" name="unit" /></div>
|
<div>单位 <input type="text" name="unit" /></div>
|
||||||
<div>项目 <input type="text" name="project" /></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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -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>
|
|
@ -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' />
|
||||||
|
|
|
@ -82,4 +82,6 @@ class Users extends \Zend_Controller_Plugin_Abstract
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue