diff --git a/module/repo/lang/de.php b/module/repo/lang/de.php index 40cbc39d64..c853bb7f8c 100644 --- a/module/repo/lang/de.php +++ b/module/repo/lang/de.php @@ -280,9 +280,11 @@ $lang->repo->errorLang[1] = 'Branch is exists'; $lang->repo->errorLang[2] = 'branch .* already exists'; $lang->repo->errorLang[3] = 'Forbidden'; $lang->repo->errorLang[4] = 'cannot have ASCII control characters'; +$lang->repo->errorLang[5] = 'Created fail'; $lang->repo->apiError[0] = "can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'"; $lang->repo->apiError[1] = 'Branch is exists'; $lang->repo->apiError[2] = 'branch .* already exists'; $lang->repo->apiError[3] = 'Forbidden'; $lang->repo->apiError[4] = 'cannot have ASCII control characters'; +$lang->repo->apiError[5] = 'Created fail'; diff --git a/module/repo/lang/en.php b/module/repo/lang/en.php index 49306d2dde..42e6a596cc 100644 --- a/module/repo/lang/en.php +++ b/module/repo/lang/en.php @@ -280,9 +280,11 @@ $lang->repo->errorLang[1] = 'Branch is exists'; $lang->repo->errorLang[2] = 'branch .* already exists'; $lang->repo->errorLang[3] = 'Forbidden'; $lang->repo->errorLang[4] = 'cannot have ASCII control characters'; +$lang->repo->errorLang[5] = 'Created fail'; $lang->repo->apiError[0] = "can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'"; $lang->repo->apiError[1] = 'Branch is exists'; $lang->repo->apiError[2] = 'branch .* already exists'; $lang->repo->apiError[3] = 'Forbidden'; $lang->repo->apiError[4] = 'cannot have ASCII control characters'; +$lang->repo->apiError[5] = 'Created fail'; diff --git a/module/repo/lang/fr.php b/module/repo/lang/fr.php index 68a91f1e77..02ec1132ef 100644 --- a/module/repo/lang/fr.php +++ b/module/repo/lang/fr.php @@ -280,9 +280,11 @@ $lang->repo->errorLang[1] = 'Branch is exists'; $lang->repo->errorLang[2] = 'branch .* already exists'; $lang->repo->errorLang[3] = 'Forbidden'; $lang->repo->errorLang[4] = 'cannot have ASCII control characters'; +$lang->repo->errorLang[5] = 'Created fail'; $lang->repo->apiError[0] = "can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'"; $lang->repo->apiError[1] = 'Branch is exists'; $lang->repo->apiError[2] = 'branch .* already exists'; $lang->repo->apiError[3] = 'Forbidden'; $lang->repo->apiError[4] = 'cannot have ASCII control characters'; +$lang->repo->apiError[5] = 'Created fail'; diff --git a/module/repo/lang/zh-cn.php b/module/repo/lang/zh-cn.php index 7b85772386..e9caf94bbc 100644 --- a/module/repo/lang/zh-cn.php +++ b/module/repo/lang/zh-cn.php @@ -280,9 +280,11 @@ $lang->repo->errorLang[1] = '分支名已存在。'; $lang->repo->errorLang[2] = '分支名已存在。'; $lang->repo->errorLang[3] = '权限不足。'; $lang->repo->errorLang[4] = "分支名不能包含 ' ', '~', '^'或':'。"; +$lang->repo->errorLang[5] = '分支创建失败'; $lang->repo->apiError[0] = "can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'"; $lang->repo->apiError[1] = 'Branch is exists'; $lang->repo->apiError[2] = 'branch .* already exists'; $lang->repo->apiError[3] = 'Forbidden'; $lang->repo->apiError[4] = 'cannot have ASCII control characters'; +$lang->repo->apiError[5] = 'Created fail'; diff --git a/module/repo/ui/createbranch.html.php b/module/repo/ui/createbranch.html.php index 58251393b5..db1046d037 100644 --- a/module/repo/ui/createbranch.html.php +++ b/module/repo/ui/createbranch.html.php @@ -10,9 +10,6 @@ declare(strict_types=1); */ namespace zin; -to::header(false); -to::main(false); - jsVar('module', $objectType); jsVar('linkParams', "objectID={$objectID}&repoID=%s"); modalHeader @@ -75,6 +72,23 @@ empty($linkedBranches) ? null : div ) ); +if(empty($linkedBranches) && !$canCreate) +{ + div + ( + setClass('canvas text-center py-2'), + p + ( + setClass('py-2 my-2'), + span + ( + setClass('text-gray'), + $lang->noData + ) + ) + ); +} + $canCreate ? formPanel ( set::title($lang->repo->createBranchAction),