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}}
{{svg "octicon-download"}}
|
+ {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}}
+
+ {{svg "octicon-git-branch"}}
+
+ {{end}}
{{if (not .IsDeleted)}}
{{svg "octicon-download"}}
@@ -142,4 +152,30 @@
{{template "base/delete_modal_actions" .}}
+
+
{{template "base/footer" .}}
diff --git a/web_src/js/index.js b/web_src/js/index.js
index c3d74b139..5ba2662ea 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -2658,6 +2658,11 @@ $(document).ready(async () => {
$('.show-panel.button').on('click', function () {
$($(this).data('panel')).show();
});
+ $('.show-create-branch-modal.button').on('click', function () {
+ $('#create-branch-form')[0].action = $('#create-branch-form').data('base-action') + $(this).data('branch-from');
+ $('#modal-create-branch-from-span').text($(this).data('branch-from'));
+ $($(this).data('modal')).modal('show');
+ });
$('.show-modal.button').on('click', function () {
$($(this).data('modal')).modal('show');
});
|