From a2720b5fe074c7b0c4e95a1f35c59bdd52bf2d01 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Sat, 15 Dec 2012 01:34:09 +0000 Subject: [PATCH] * adjust the all projects page. --- module/common/lang/en.php | 2 +- module/common/lang/zh-cn.php | 2 +- module/project/control.php | 11 +++++++---- module/project/view/index.html.php | 9 ++++----- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 299909a669..6499d0d5e2 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -198,7 +198,7 @@ $lang->project->menu->product = array('link' => 'Product|project|manageproduct $lang->project->menu->view = 'Manage|project|view|projectID=%s'; $lang->project->menu->order = 'Order|project|order|projectID=%s'; $lang->project->menu->create = array('link' => ' New|project|create', 'float' => 'right'); -$lang->project->menu->all = array('link' => ' Projects|project|index|locate=no', 'float' => 'right'); +$lang->project->menu->all = array('link' => ' Projects|project|index|locate=no&projectID=%s', 'float' => 'right'); $lang->task = new stdclass(); $lang->build = new stdclass(); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index f9628a969f..16b1238a2d 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -198,7 +198,7 @@ $lang->project->menu->product = '产品|project|manageproducts|projectID=%s'; $lang->project->menu->view = array('link' => '维护|project|view|projectID=%s', 'alias' => 'edit'); $lang->project->menu->order = '排序|project|order|projectID=%s'; $lang->project->menu->create = array('link' => ' 新增项目|project|create', 'float' => 'right'); -$lang->project->menu->all = array('link' => ' 所有项目|project|index|locate=false', 'float' => 'right'); +$lang->project->menu->all = array('link' => ' 所有项目|project|index|locate=no&status=undone&projectID=%s', 'float' => 'right'); $lang->task = new stdclass(); $lang->build = new stdclass(); diff --git a/module/project/control.php b/module/project/control.php index 042c1870a0..bfc20ec5b8 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -31,15 +31,18 @@ class project extends control /** * The index page. * - * @param string $locate yes|no locate to the browse page or not. - * @param string $status the projects status, if locate is no, then get projects by the $status. + * @param string $locate yes|no locate to the browse page or not. + * @param string $status the projects status, if locate is no, then get projects by the $status. + * @param int $projectID * @access public * @return void */ - public function index($locate = 'yes', $status = 'undone') + public function index($locate = 'yes', $status = 'undone', $projectID = 0) { if(empty($this->projects)) $this->locate($this->createLink('project', 'create')); - if($locate == 'yes') $this->locate($this->createLink('project', 'browse')); + if($locate == 'yes') $this->locate($this->createLink('project', 'task')); + + $this->commonAction($projectID); $this->app->loadLang('my'); $this->view->projectStats = $this->project->getProjectStats($status); diff --git a/module/project/view/index.html.php b/module/project/view/index.html.php index 4df7cf4d01..29e5464d2a 100644 --- a/module/project/view/index.html.php +++ b/module/project/view/index.html.php @@ -9,12 +9,11 @@ * @version $Id$ */ ?> - + -

- project->unDoneProjects);?> - project->doneProjects);?> + id"), $lang->project->unDoneProjects);?> + id"), $lang->project->doneProjects);?>

@@ -45,4 +44,4 @@
- +