* Optimize code.
This commit is contained in:
@@ -5274,11 +5274,13 @@ class executionModel extends model
|
||||
$class = !empty($execution->children) ? 'disabled' : '';
|
||||
common::printIcon('task', 'create', "executionID={$execution->id}", '', 'list', '', '', $class, false, "data-app='execution'");
|
||||
|
||||
if($execution->type == 'stage')
|
||||
$project = $this->loadModel('project')->getByID($execution->project);
|
||||
if($execution->type == 'stage' or ($this->app->tab == 'project' and !empty($project->model) and $project->model == 'waterfallplus'))
|
||||
{
|
||||
$isCreateTask = $this->loadModel('programplan')->isCreateTask($execution->id);
|
||||
$disabled = ($isCreateTask and $execution->type == 'stage') ? '' : ' disabled';
|
||||
$title = !$isCreateTask ? $this->lang->programplan->error->createdTask : $this->lang->programplan->createSubPlan;
|
||||
$title = (!empty($disabled) and $execution->type != 'stage') ? $this->lang->programplan->error->notStage : $title;
|
||||
common::printIcon('programplan', 'create', "program={$execution->project}&productID=$productID&planID=$execution->id", $execution, 'list', 'split', '', $disabled, '', '', $title);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user