Fix and simplify repo branches UI (#1435)

This commit is contained in:
Morlinest 2017-04-06 17:33:57 +02:00 committed by Bo-Yi Wu
parent 410af6971b
commit cbeeaa1b11

View file

@ -7,17 +7,16 @@
<h4 class="ui top attached header">
{{.i18n.Tr "repo.default_branch"}}
</h4>
<div class="ui attached table segment">
<form class="ui hook list form" action="{{.Link}}" method="post">
<div class="ui attached segment">
<p>
{{.i18n.Tr "repo.settings.default_branch_desc"}}
</p>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="action" value="default_branch">
<div class="item">
{{.i18n.Tr "repo.settings.default_branch_desc"}}
</div>
{{if not .Repository.IsBare}}
<div class="ui grid padded">
<div class="eight wide column">
<div class="ui fluid dropdown selection visible" tabindex="0">
<div class="required inline field">
<div class="ui dropdown selection" tabindex="0">
<select name="branch">
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
{{range .Branches}}
@ -31,12 +30,9 @@
{{end}}
</div>
</div>
</div>
</div>
{{end}}
<div class="item field">
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
</div>
{{end}}
</form>
</div>
@ -46,7 +42,7 @@
<div class="ui attached table segment">
<div class="ui grid padded">
<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">
{{range .LeftBranches}}
<option value="">{{$.i18n.Tr "repo.settings.choose_branch"}}</option>