* Adjust repo branch btn lang.

This commit is contained in:
caoyanyi
2024-04-02 13:08:53 +08:00
parent d5fec9c0f0
commit 32fcfc023a
3 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -187,9 +187,9 @@ $config->task->actionList['assignTo']['url'] = helper::createLink('task'
$config->task->actionList['assignTo']['data-toggle'] = 'modal';
$config->task->actionList['createBranch']['icon'] = 'treemap';
$config->task->actionList['createBranch']['hint'] = $lang->task->createBranch;
$config->task->actionList['createBranch']['text'] = $lang->task->createBranch;
$config->task->actionList['createBranch']['url'] = helper::createLink('repo', 'createBranch', 'taskID={id}&execution={execution}');
$config->task->actionList['createBranch']['hint'] = $lang->task->codeBranch;
$config->task->actionList['createBranch']['text'] = $lang->task->codeBranch;
$config->task->actionList['createBranch']['url'] = helper::createLink('repo', 'createBranch', 'objectID={id}&objectType=task');
$config->task->actionList['createBranch']['data-toggle'] = 'modal';
$config->task->actions = new stdclass();
-1
View File
@@ -375,7 +375,6 @@ class task extends control
$task->storyTitle = !empty($story) ? $story->title : '';
}
$task->linkedBranch = $this->task->getLinkedBranch($taskID);
if($task->team) $this->lang->task->assign = $this->lang->task->transfer;
/* Execute workflow hooks if edition is not open. */
+2 -2
View File
@@ -37,8 +37,8 @@ foreach($actions as $key => $action)
{
if(isset($action['url']) && strpos($action['url'], 'createBranch') !== false)
{
$hasRepo = common::hasPriv('repo', 'createBranch') && empty($task->linkedBranch) && $this->loadModel('repo')->getRepoPairs('execution', $task->execution, false);
if(empty($hasRepo) || !common::hasPriv('repo', 'createBranch') || !empty($task->linkedBranch) || !common::canModify('execution', $execution)) unset($actions[$key]);
$hasRepo = common::hasPriv('repo', 'createBranch') && $this->loadModel('repo')->getRepoPairs('execution', $task->execution, false);
if(empty($hasRepo) || !common::hasPriv('repo', 'createBranch') || !common::canModify('execution', $execution)) unset($actions[$key]);
}
if(isset($action['url']) && strpos($action['url'], 'view') !== false && $task->parent == 0) unset($actions[$key]);
if(isset($actions[$key]['url']))