summaryrefslogtreecommitdiffstats
path: root/templates/repo/setting.tmpl
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-10 22:03:31 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-10 22:03:31 -0400
commit306aa5bffe7868207ed7b773c1aedbf3f0a659ad (patch)
treea72a835c64833b31b2195585d018a03433917266 /templates/repo/setting.tmpl
parent8980675a9f8f8328a81dde63174115c4a11f02a3 (diff)
downloadgitea-306aa5bffe7868207ed7b773c1aedbf3f0a659ad.tar.gz
gitea-306aa5bffe7868207ed7b773c1aedbf3f0a659ad.zip
Add support default branch
Diffstat (limited to 'templates/repo/setting.tmpl')
-rw-r--r--templates/repo/setting.tmpl11
1 files changed, 7 insertions, 4 deletions
diff --git a/templates/repo/setting.tmpl b/templates/repo/setting.tmpl
index 1adf0090c7..ff3b73b59a 100644
--- a/templates/repo/setting.tmpl
+++ b/templates/repo/setting.tmpl
@@ -12,7 +12,7 @@
</div>
<div id="repo-setting-container" class="col-md-9">
- {{if .IsSuccess}}<p class="alert alert-success">Repository options has been successfully updated.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}}
+ {{template "base/alert" .}}
<div class="panel panel-default">
<div class="panel-heading">
Repository Options
@@ -44,14 +44,17 @@
</div>
</div>
<hr>
- <!-- <div class="form-group">
+ <div class="form-group">
<label class="col-md-3 text-right">Default Branch</label>
<div class="col-md-9">
<select name="branch" id="repo-default-branch" class="form-control">
- <option value="">Branch</option>
+ <option value="{{.Repository.DefaultBranch}}">{{.Repository.DefaultBranch}}</option>
+ {{range .Branches}}
+ {{if eq . $.Repository.DefaultBranch}}{{else}}<option value="{{.}}">{{.}}</option>{{end}}
+ {{end}}
</select>
</div>
- </div> -->
+ </div>
<div class="form-group">
<div class="col-md-offset-3 col-md-9">