* Finish task #8194.

This commit is contained in:
holan20180123
2020-11-11 16:11:27 +08:00
parent e330353df3
commit 547ecde44d
4 changed files with 7 additions and 10 deletions
+2 -1
View File
@@ -1857,7 +1857,8 @@ EOD;
/* Check the product is closed. */
if(!empty($object->product) and !empty($config->global->closedProductStatus))
{
$product = $app->control->loadModel('product')->getByID($object->product);
$productID = trim($object->product, ',');
$product = $app->control->loadModel('product')->getByID($productID);
if($product->status == 'closed') return true;
/* Get the projects associated with the story. */
+2 -4
View File
@@ -22,9 +22,7 @@
</div>
<div class="btn-toolbar pull-right">
<?php common::printLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=&projectID=$project->id", "<i class='icon icon-export muted'> </i>" . $lang->bug->export, '', "class='btn btn-link export'");?>
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<?php common::printLink('bug', 'create', "productID=$productID&branch=$branchID&extra=projectID=$project->id", "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-primary'");?>
<?php endif;?>
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed') common::printLink('bug', 'create', "productID=$productID&branch=$branchID&extra=projectID=$project->id", "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent">
@@ -33,7 +31,7 @@
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->bug->noBug;?></span>
<?php if(common::hasPriv('bug', 'create')):?>
<?php if((empty($this->config->global->closedProjectStatus) or $project->status != 'closed') and common::hasPriv('bug', 'create')):?>
<?php echo html::a($this->createLink('bug', 'create', "productID=$productID&branch=$branchID&extra=projectID=$project->id"), "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
+2 -4
View File
@@ -29,9 +29,7 @@
</div>
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->project->byQuery;?></a>
<div class="btn-toolbar pull-right">
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
<?php common::printLink('build', 'create', "project=$project->id", "<i class='icon icon-plus'></i> " . $lang->build->create, '', "class='btn btn-primary'");?>
<?php endif;?>
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed') common::printLink('build', 'create', "project=$project->id", "<i class='icon icon-plus'></i> " . $lang->build->create, '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent">
@@ -40,7 +38,7 @@
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->build->noBuild;?></span>
<?php if(common::hasPriv('build', 'create')):?>
<?php if((empty($this->config->global->closedProjectStatus) or $project->status != 'closed') and common::hasPriv('build', 'create')):?>
<?php echo html::a($this->createLink('build', 'create', "project=$project->id"), "<i class='icon icon-plus'></i> " . $lang->build->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
+1 -1
View File
@@ -39,7 +39,7 @@
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
<?php if(common::hasPriv('testtask', 'create')):?>
<?php if((empty($this->config->global->closedProjectStatus) or $project->status != 'closed') and common::hasPriv('testtask', 'create')):?>
<?php echo html::a($this->createLink('testtask', 'create', "product=0&project=$projectID"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>