Files
EasySoft-ZenTaoPMS/trunk/module/action/control.php
2010-05-02 15:32:06 +00:00

64 lines
2.6 KiB
PHP

<?php
/**
* The control file of action module of ZenTaoMS.
*
* ZenTaoMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ZenTaoMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
*
* @copyright Copyright 2009-2010 青岛易软天创网络科技有限公司(www.cnezsoft.com)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package action
* @version $Id$
* @link http://www.zentaoms.com
*/
class action extends control
{
/* 已删除记录列表。*/
public function trash($orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* 登记session。*/
$uri = $this->app->getURI(true);
$this->session->set('productList', $uri);
$this->session->set('productPlanList', $uri);
$this->session->set('releaseList', $uri);
$this->session->set('storyList', $uri);
$this->session->set('projectList', $uri);
$this->session->set('taskList', $uri);
$this->session->set('buildList', $uri);
$this->session->set('bugList', $uri);
$this->session->set('caseList', $uri);
$this->session->set('testtaskList', $uri);
/* 设置标题和导航条。*/
$this->view->header->title = $this->lang->action->trash;
$this->view->position[] = $this->lang->action->trash;
/* 获取已删除记录。*/
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$this->view->trashes = $this->action->getTrashes($orderBy, $pager);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->users['system'] = 'system';
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->display();
}
/* 还原某一个对象。*/
public function undelete($actionID)
{
$this->action->undelete($actionID);
die(js::locate(inlink('trash'), 'parent'));
}
}