Fix and simplify repo branches UI (#1435)
This commit is contained in:
parent
410af6971b
commit
cbeeaa1b11
1 changed files with 20 additions and 24 deletions
|
@ -7,17 +7,16 @@
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.i18n.Tr "repo.default_branch"}}
|
{{.i18n.Tr "repo.default_branch"}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached segment">
|
||||||
<form class="ui hook list form" action="{{.Link}}" method="post">
|
<p>
|
||||||
|
{{.i18n.Tr "repo.settings.default_branch_desc"}}
|
||||||
|
</p>
|
||||||
|
<form class="ui form" action="{{.Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<input type="hidden" name="action" value="default_branch">
|
<input type="hidden" name="action" value="default_branch">
|
||||||
<div class="item">
|
|
||||||
{{.i18n.Tr "repo.settings.default_branch_desc"}}
|
|
||||||
</div>
|
|
||||||
{{if not .Repository.IsBare}}
|
{{if not .Repository.IsBare}}
|
||||||
<div class="ui grid padded">
|
<div class="required inline field">
|
||||||
<div class="eight wide column">
|
<div class="ui dropdown selection" tabindex="0">
|
||||||
<div class="ui fluid dropdown selection visible" tabindex="0">
|
|
||||||
<select name="branch">
|
<select name="branch">
|
||||||
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
|
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
|
||||||
{{range .Branches}}
|
{{range .Branches}}
|
||||||
|
@ -31,12 +30,9 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
<div class="item field">
|
|
||||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
{{end}}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -46,7 +42,7 @@
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table segment">
|
||||||
<div class="ui grid padded">
|
<div class="ui grid padded">
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
<div class="ui fluid dropdown selection visible" tabindex="0">
|
<div class="ui fluid dropdown selection" tabindex="0">
|
||||||
<select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
|
<select id="protectedBranch" name="branch" data-url="{{.Repository.Link}}/settings/branches?action=protected_branch">
|
||||||
{{range .LeftBranches}}
|
{{range .LeftBranches}}
|
||||||
<option value="">{{$.i18n.Tr "repo.settings.choose_branch"}}</option>
|
<option value="">{{$.i18n.Tr "repo.settings.choose_branch"}}</option>
|
||||||
|
|
Reference in a new issue