diff options
author | Kim Carlbäcker <kim.carlbacker@gmail.com> | 2016-04-27 03:48:44 +0200 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-04-26 21:48:44 -0400 |
commit | 3df8eb60e3227b4cff671e4714d262603b82943b (patch) | |
tree | 2e4111a94375faa1ae0acf6758b9dacec26cf9b9 /templates/repo/view_file.tmpl | |
parent | 0325bec283db28ee6a464f2d1884df0c48977373 (diff) | |
download | gitea-3df8eb60e3227b4cff671e4714d262603b82943b.tar.gz gitea-3df8eb60e3227b4cff671e4714d262603b82943b.zip |
PDF-Previews in file-lists now working (#3000)
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r-- | templates/repo/view_file.tmpl | 2 |
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}} |