summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMorlinest <Morlinest@users.noreply.github.com>2017-04-06 17:33:57 +0200
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-04-06 23:33:57 +0800
commitcbeeaa1b117c074ff6c7e128fe0f3b0f7b64a124 (patch)
tree77b393276d8714264f8217e3525156c475257626 /templates
parent410af6971b87ac5dc7ac198f538d8383c1f47a1f (diff)
downloadgitea-cbeeaa1b117c074ff6c7e128fe0f3b0f7b64a124.tar.gz
gitea-cbeeaa1b117c074ff6c7e128fe0f3b0f7b64a124.zip
Fix and simplify repo branches UI (#1435)
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/settings/branches.tmpl44
1 files changed, 20 insertions, 24 deletions
diff --git a/templates/repo/settings/branches.tmpl b/templates/repo/settings/branches.tmpl
index d9d19845a5..7008e2e530 100644
--- a/templates/repo/settings/branches.tmpl
+++ b/templates/repo/settings/branches.tmpl
@@ -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>
@@ -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>