summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/view_file.tmpl2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl
index f41e485cad..9868072313 100644
--- a/templates/repo/view_file.tmpl
+++ b/templates/repo/view_file.tmpl
@@ -31,6 +31,8 @@
<div class="view-raw ui center">
{{if .IsImageFile}}
<img src="{{EscapePound .FileLink}}">
+ {{else if .IsPDFFile}}
+ <iframe width="100%" height="600px" src="{{AppSubUrl}}/plugins/pdfjs-1.4.20/web/viewer.html?file={{EscapePound .FileLink}}"></iframe>
{{else}}
<a href="{{EscapePound .FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a>
{{end}}