summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorslene <vslene@gmail.com>2014-03-28 00:30:20 +0800
committerslene <vslene@gmail.com>2014-03-28 00:30:20 +0800
commit346db02d89ae0337956607eec43a0cd3f184fda8 (patch)
tree5caaf3f50191b211f44b5ff8253df5856afab50c /templates
parent16cb1e974ca2e34384cd7882886f46f860ea5640 (diff)
downloadgitea-346db02d89ae0337956607eec43a0cd3f184fda8.tar.gz
gitea-346db02d89ae0337956607eec43a0cd3f184fda8.zip
fix image display
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/single_file.tmpl8
1 files changed, 6 insertions, 2 deletions
diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl
index cf398595e5..9199ca91f7 100644
--- a/templates/repo/single_file.tmpl
+++ b/templates/repo/single_file.tmpl
@@ -23,7 +23,11 @@
</div>
{{if not .FileIsText}}
<div class="panel-footer text-center">
- <a href="{{.FileLink}}" class="btn btn-default">View Raw</a>
+ {{if .IsImageFile}}
+ <img src="{{.FileLink}}">
+ {{else}}
+ <a href="{{.FileLink}}" class="btn btn-default">View Raw</a>
+ {{end}}
</div>
{{else}}
{{if .ReadmeExist}}
@@ -43,4 +47,4 @@
</div>
{{end}}
{{end}}
-</div> \ No newline at end of file
+</div>