* Merge programplan into stage.

This commit is contained in:
tanghucheng
2021-12-03 13:57:08 +08:00
parent 499605d81e
commit 30d1e22dca
5 changed files with 30 additions and 12 deletions
+2
View File
@@ -130,7 +130,9 @@ class programplan extends control
$this->view->position[] = html::a($this->createLink('programplan', 'browse', "projectID=$projectID"), $project->name);
$this->view->position[] = $this->lang->programplan->create;
$this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID);
$this->view->project = $project;
$this->view->productID = $productID;
$this->view->stages = empty($planID) ? $this->loadModel('stage')->getStages('id_asc') : array();
$this->view->programPlan = $this->project->getById($planID, 'stage');
$this->view->plans = $this->programplan->getStage($planID ? $planID : $projectID, $this->productID, 'parent');
+1
View File
@@ -57,6 +57,7 @@ class programplanModel extends model
$plans = $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t2.type')->eq('stage')
->andWhere('t1.product')->eq($productID)
->beginIF($browseType == 'all')->andWhere('t2.project')->eq($executionID)->fi()
->beginIF($browseType == 'parent')->andWhere('t2.parent')->eq($executionID)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
+12
View File
@@ -22,6 +22,18 @@
echo "<span class='text'>{$title}</span>";
?>
</span>
<div class='btn-group'>
<?php $viewName = $productID != 0 ? zget($productList,$productID) : current($productList);?>
<a href='javascript:;' class='btn btn-link btn-limit' data-toggle='dropdown'><span class='text' title='<?php echo $viewName;?>'><?php echo $viewName;?></span> <span class='caret'></span></a>
<ul class='dropdown-menu' style='max-height:240px; max-width: 300px; overflow-y:auto'>
<?php
foreach($productList as $key => $product)
{
echo "<li>" . html::a($this->createLink('programplan', 'create', "projectID=$project->id&productID=$key"), $product) . "</li>";
}
?>
</ul>
</div>
</div>
</div>
<?php $hideAttribute = $planID == 0 ? '' : ' hidden'?>