summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/diff.tmpl')
-rw-r--r--templates/repo/diff.tmpl7
1 files changed, 7 insertions, 0 deletions
diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl
index 809a4873c3..e58f2d664e 100644
--- a/templates/repo/diff.tmpl
+++ b/templates/repo/diff.tmpl
@@ -60,7 +60,13 @@
<a class="btn btn-default btn-sm pull-right" href="{{$.SourcePath}}/{{.Name}}">View File</a>
<span class="file">{{.Name}}</span>
</div>
+ {{$isImage := (call $.IsImageFile .Name)}}
<div class="panel-body file-body file-code code-view code-diff">
+ {{if $isImage}}
+ <div class="text-center">
+ <img src="{{$.RawPath}}/{{.Name}}">
+ </div>
+ {{else}}
<table>
<tbody>
{{range .Sections}}
@@ -201,6 +207,7 @@
</tr> -->
</tbody>
</table>
+ {{end}}
</div>
</div>
{{end}}