* [task#152647] Set the button of stage when stage are baselined.

This commit is contained in:
xieqiyu
2025-11-28 02:47:15 +00:00
parent d1550d33b4
commit f516dcad8a
9 changed files with 45 additions and 4 deletions
+2
View File
@@ -3929,6 +3929,7 @@ class executionModel extends model
*/
public static function isClickable(object $execution, string $action): bool
{
if(!empty($execution->frozen) && in_array($action, array('edit', 'createChildStage', 'delete', 'putoff'))) return false;
if($action == 'createChildStage') return commonModel::hasPriv('programplan', 'create') && $execution->type == 'stage';
if($action == 'createTask') return commonModel::hasPriv('task', 'create') && commonModel::hasPriv('execution', 'create') && empty($execution->isParent);
if(!commonModel::hasPriv('execution', $action)) return false;
@@ -4964,6 +4965,7 @@ class executionModel extends model
if($actionName == 'createChildStage' && $action['disabled'] && $execution->type != 'stage') $action['hint'] = $this->lang->programplan->error->notStage;
if(!$action['disabled']) break;
if($actionName == 'close' && $execution->status != 'closed') break;
if(!empty($execution->frozen) && in_array($actionName, array('edit', 'createChildStage', 'delete', 'putoff'))) $action['hint'] = sprintf($this->lang->execution->stageFrozenTip, $this->lang->execution->$actionName);
}
if(!empty($action))