Skip to content

Fix and simplify repo branches (settings) UI #1435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 20 additions & 24 deletions templates/repo/settings/branches.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,32 @@
<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">
<select name="branch">
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
{{range .Branches}}
<option value="{{.}}">{{.}}</option>
{{end}}
</select><i class="dropdown icon"></i>
<div class="default text">{{.Repository.DefaultBranch}}</div>
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
{{range .Branches}}
<div class="item" data-value="{{.}}">{{.}}</div>
{{end}}
</div>
<div class="required inline field">
<div class="ui dropdown selection" tabindex="0">
<select name="branch">
<option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
{{range .Branches}}
<option value="{{.}}">{{.}}</option>
{{end}}
</select><i class="dropdown icon"></i>
<div class="default text">{{.Repository.DefaultBranch}}</div>
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
{{range .Branches}}
<div class="item" data-value="{{.}}">{{.}}</div>
{{end}}
</div>
</div>
</div>
{{end}}
<div class="item field">
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
</div>
{{end}}
</form>
</div>

Expand All @@ -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>
Expand Down