summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff.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/diff.tmpl
parent8980675a9f8f8328a81dde63174115c4a11f02a3 (diff)
downloadgitea-306aa5bffe7868207ed7b773c1aedbf3f0a659ad.tar.gz
gitea-306aa5bffe7868207ed7b773c1aedbf3f0a659ad.zip
Add support default branch
Diffstat (limited to 'templates/repo/diff.tmpl')
-rw-r--r--templates/repo/diff.tmpl8
1 files changed, 8 insertions, 0 deletions
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>