mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Add support for forking single branch (#25821)
Fixes #25117
Add UI for choosing branch to fork
Change default branch on single-branch forks

---------
Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
e8840e7e2b
commit
5e02e3b7ee
5 changed files with 57 additions and 9 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue