From 5285a3e70e0718d0df0b4acaaf41926dcef303fd Mon Sep 17 00:00:00 2001 From: Viktor Yakovchuk Date: Mon, 24 May 2021 17:57:46 +0300 Subject: [PATCH] Add possibility to make branch in branch page (#15960) * Add possibility to make branch in branch page (#15911) Add possibility to make branch in branch page in the area next to Download and Delete buttons. It is a more intuitive place in the interface compared to what is already there. Signed-off-by: Viktor Yakovchuk * Update templates/repo/branch/list.tmpl Co-authored-by: zeripath --- options/locale/locale_en-US.ini | 4 ++++ templates/repo/branch/list.tmpl | 36 +++++++++++++++++++++++++++++++++ web_src/js/index.js | 5 +++++ 3 files changed, 45 insertions(+) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index ab7367ba7..d7d5abce1 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1977,6 +1977,10 @@ branch.restore = Restore Branch '%s' branch.download = Download Branch '%s' branch.included_desc = This branch is part of the default branch branch.included = Included +branch.create_new_branch = Create branch from branch: +branch.confirm_create_branch = Create branch +branch.new_branch = Create new branch +branch.new_branch_from = Create new branch from '%s' tag.create_tag = Create tag %s tag.create_success = Tag '%s' has been created. diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 3b678e2ce..1e21863ee 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -24,6 +24,11 @@ {{end}} + {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} +
+ {{svg "octicon-git-branch"}} +
+ {{end}}