From 43e5de7f830a098582b519706f9c5da6eecd2c3e Mon Sep 17 00:00:00 2001 From: Justin Nuß Date: Thu, 24 Jul 2014 13:50:03 +0200 Subject: Show attachments in issues/comments and add preview for images --- templates/repo/issue/view.tmpl | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'templates') diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl index a3362054..8c90f312 100644 --- a/templates/repo/issue/view.tmpl +++ b/templates/repo/issue/view.tmpl @@ -45,13 +45,19 @@
Loading...
- -
- {{range .Attachments}} - {{.Name}} - {{end}} -
+ + {{with $attachments := .Issue.Attachments}} + {{if $attachments}} +
+ Attachments: + + {{range $attachments}} + {{.Name}} + {{end}} +
+ {{end}} + {{end}} {{range .Comments}} {{/* 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE, 4 = COMMIT, 5 = PULL */}} @@ -68,11 +74,17 @@
{{str2html .Content}}
+ {{with $attachments := .Attachments}} + {{if $attachments}}
- {{range .Attachments}} - {{.Name}} + Attachments: + + {{range $attachments}} + {{.Name}} {{end}}
+ {{end}} + {{end}} {{else if eq .Type 1}} -- cgit v1.2.3