summaryrefslogtreecommitdiffstats
path: root/templates
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
parent8980675a9f8f8328a81dde63174115c4a11f02a3 (diff)
downloadgitea-306aa5bffe7868207ed7b773c1aedbf3f0a659ad.tar.gz
gitea-306aa5bffe7868207ed7b773c1aedbf3f0a659ad.zip
Add support default branch
Diffstat (limited to 'templates')
-rw-r--r--templates/install.tmpl4
-rw-r--r--templates/repo/diff.tmpl8
-rw-r--r--templates/repo/setting.tmpl11
3 files changed, 15 insertions, 8 deletions
diff --git a/templates/install.tmpl b/templates/install.tmpl
index 3aa64ccd4b..c1fd76659c 100644
--- a/templates/install.tmpl
+++ b/templates/install.tmpl
@@ -184,11 +184,7 @@
<strong>Enable Register Confirmation</strong>
</label>
</div>
- </div>
- </div>
- <div class="form-group">
- <div class="col-md-offset-3 col-md-7">
<div class="checkbox">
<label>
<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl
index 5c95ddefde..396aa795f5 100644
--- a/templates/repo/diff.tmpl
+++ b/templates/repo/diff.tmpl
@@ -30,12 +30,16 @@
{{range .Diff.Files}}
<li>
<div class="diff-counter count pull-right">
+ {{if Subtract .Addition .Deletion}}
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
</span>
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
+ {{else}}
+ <span>BIN</span>
+ {{end}}
</div>
<!-- todo finish all file status, now modify, add, delete and rename -->
<span class="status {{DiffTypeToStr .Type}}" data-toggle="tooltip" data-placement="right" title="{{DiffTypeToStr .Type}}">&nbsp;</span>
@@ -49,12 +53,16 @@
<div class="panel panel-default diff-file-box diff-box file-content" id="diff-2">
<div class="panel-heading">
<div class="diff-counter count pull-left">
+ {{if Subtract .Addition .Deletion}}
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
<span class="bar">
<span class="pull-left add"></span>
<span class="pull-left del"></span>
</span>
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
+ {{else}}
+ BIN
+ {{end}}
</div>
<a class="btn btn-default btn-sm pull-right" href="{{$.SourcePath}}/{{.Name}}">View File</a>
<span class="file">{{.Name}}</span>
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">