1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

PDF-Previews in file-lists now working (#3000)

This commit is contained in:
Kim Carlbäcker
2016-04-27 03:48:44 +02:00
committed by Unknwon
parent 0325bec283
commit 3df8eb60e3
95 changed files with 64456 additions and 1 deletions

View File

@@ -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}}