aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorDmitry Sharshakov <d3dx12.xx@gmail.com>2023-09-29 04:48:39 +0300
committerGitHub <noreply@github.com>2023-09-29 09:48:39 +0800
commit5e02e3b7ee8294e2ec94968ece9af56bf1aa1534 (patch)
tree038e8619ee6b08b0c9ebd9be183ba190a1bc27f2 /templates
parente8840e7e2b6c4eaf6fa78dad49a29709ef35217b (diff)
downloadgitea-5e02e3b7ee8294e2ec94968ece9af56bf1aa1534.tar.gz
gitea-5e02e3b7ee8294e2ec94968ece9af56bf1aa1534.zip
Add support for forking single branch (#25821)
Fixes #25117 Add UI for choosing branch to fork Change default branch on single-branch forks ![image](https://github.com/go-gitea/gitea/assets/19504461/28505f69-a9a2-43a8-8b19-a0cdac3ddc5a) --------- Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/pulls/fork.tmpl20
1 files changed, 20 insertions, 0 deletions
diff --git a/templates/repo/pulls/fork.tmpl b/templates/repo/pulls/fork.tmpl
index 57d2269807..94de4d78eb 100644
--- a/templates/repo/pulls/fork.tmpl
+++ b/templates/repo/pulls/fork.tmpl
@@ -51,6 +51,26 @@
</div>
<span class="help">{{ctx.Locale.Tr "repo.fork_visibility_helper"}}</span>
</div>
+ <div class="inline field">
+ <label>{{ctx.Locale.Tr "repo.fork_branch"}}</label>
+ <div class="ui selection dropdown">
+ <input type="hidden" id="fork_single_branch" name="fork_single_branch" value="" required>
+ <span class="text truncated-item-container" data-value="" title="{{ctx.Locale.Tr "repo.all_branches"}}">
+ <span class="truncated-item-name">{{ctx.Locale.Tr "repo.all_branches"}}</span>
+ </span>
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ <div class="menu">
+ <div class="item truncated-item-container" data-value="" title="{{ctx.Locale.Tr "repo.all_branches"}}">
+ <span class="truncated-item-name">{{ctx.Locale.Tr "repo.all_branches"}}</span>
+ </div>
+ {{range .Branches}}
+ <div class="item truncated-item-container" data-value="{{.}}" title="{{.}}">
+ <span class="truncated-item-name">{{.}}</span>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
<div class="inline field {{if .Err_Description}}error{{end}}">
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
<textarea id="description" name="description">{{.description}}</textarea>