From 777e609aa3038383387297e80f4e033840066a00 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Thu, 11 Mar 2021 09:42:34 +0800 Subject: [PATCH] * Finish task#36498. --- module/common/lang/zh-cn.php | 2 +- module/execution/control.php | 28 +++++++------------- module/execution/view/all.html.php | 32 +++++++++++++++++------ module/project/model.php | 5 +++- module/project/view/projecttitle.html.php | 32 +++++++++++++++++++++++ 5 files changed, 70 insertions(+), 29 deletions(-) create mode 100644 module/project/view/projecttitle.html.php diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index cd6a4027ab..0d12429983 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -897,7 +897,7 @@ $lang->icons['score'] = 'tint'; $lang->menu = new stdclass(); $lang->menu->scrum = new stdclass(); $lang->menu->scrum->index = '仪表盘|project|index|project={PROJECT}'; -$lang->menu->scrum->execution = "$lang->executionCommon|execution|all|status=all&executionID=0&from=project"; +$lang->menu->scrum->execution = "$lang->executionCommon|execution|all|status=all&projectID={PROJECT}&from=project"; $lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'alias' => 'story,track'); $lang->menu->scrum->doc = '文档|doc|index|'; $lang->menu->scrum->qa = '测试|qa|index'; diff --git a/module/execution/control.php b/module/execution/control.php index 08da11ef96..b9f9df6838 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2569,7 +2569,7 @@ class execution extends control * All execution. * * @param string $status - * @param int $executionID + * @param int $projectID * @param string $orderBy * @param int $productID * @param int $recTotal @@ -2578,26 +2578,14 @@ class execution extends control * @access public * @return void */ - public function all($status = 'all', $executionID = 0, $from = 'execution', $orderBy = 'id_desc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1) + public function all($status = 'all', $projectID = 0, $from = 'execution', $orderBy = 'id_desc', $productID = 0, $recTotal = 0, $recPerPage = 10, $pageID = 1) { $this->app->loadLang('my'); $this->app->loadLang('product'); $this->app->loadLang('programplan'); - if($from == 'execution') - { - if($this->executions) - { - $execution = $this->commonAction($executionID); - $executionID = $execution->id; - } - $this->session->set('executionList', $this->app->getURI(true)); - $projectID = 0; - } - elseif($from == 'project') - { - $this->lang->navGroup->execution = 'project'; - $projectID = $this->session->PRJ; - } + + if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true)); + if($from == 'project') $this->lang->navGroup->execution = 'project'; /* Load pager and get tasks. */ $this->app->loadClass('pager', $static = true); @@ -2607,13 +2595,15 @@ class execution extends control $this->view->position[] = $this->lang->execution->allExecutions; $this->view->executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager); - $this->view->products = array(0 => $this->lang->product->select) + $this->loadModel('product')->getProductPairsByProject($this->session->PRJ); $this->view->productID = $productID; - $this->view->executionID = $executionID; + $this->view->projectID = $projectID; + $this->view->projects = $this->project->getPairsByModel(); $this->view->pager = $pager; $this->view->orderBy = $orderBy; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->status = $status; + $this->view->from = $from; + $this->view->projectTree = $this->project->getTreeMenu(0, array('projectmodel', 'createManageLink'), 0, 'list'); $this->display(); } diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index b42ac2b3c9..17c9c5e10a 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -25,25 +25,41 @@ @-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;}} -
+
+ + + -
' data-ride='table'> + ' data-ride='table'> - recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
@@ -168,7 +184,7 @@
execution->batchEdit, '', 'btn');?>
- recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->execution->updateOrder, '', "class='btn'");?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->execution->updateOrder, '', "class='btn'");?> show('right', 'pagerjs');?> diff --git a/module/project/model.php b/module/project/model.php index 727c9ae130..fc751a9c99 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -618,7 +618,7 @@ class projectModel extends model } krsort($projectMenu); - $projectMenu = array_pop($projectMenu); + $projectMenu = implode('', $projectMenu); $lastMenu = "
    {$projectMenu}
\n"; return $lastMenu; @@ -635,6 +635,9 @@ class projectModel extends model { $link = $project->type == 'program' ? helper::createLink('project', 'browse', "projectID={$project->id}&status=all") : helper::createLink('project', 'index', "projectID={$project->id}", '', '', $project->id); $icon = $project->type == 'program' ? " " : " "; + + if($this->app->rawModule == 'execution') $link = helper::createLink('execution', 'all', "status=all&projectID={$project->id}"); + return html::a($link, $icon . $project->name, '_self', "id=project{$project->id} title='{$project->name}' class='text-ellipsis'"); } diff --git a/module/project/view/projecttitle.html.php b/module/project/view/projecttitle.html.php new file mode 100644 index 0000000000..2bc8ae2eca --- /dev/null +++ b/module/project/view/projecttitle.html.php @@ -0,0 +1,32 @@ + + * @package project + * @version $Id: prjprojecttitle.html.php 4769 2013-05-05 07:24:21Z wwccss $ + * @link http://www.zentao.net + */ +?> + + + +