diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 5f0559c068..c44da22720 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -55,6 +55,12 @@
{{.Issue.Content}}
+ {{if .Issue.Attachments}} +
+
+ {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments}} +
+ {{end}} {{$reactions := .Issue.Reactions.GroupByType}} {{if $reactions}} @@ -62,13 +68,6 @@ {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}} {{end}} - {{if .Issue.Attachments}} -
-
- {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments}} -
-
- {{end}} diff --git a/templates/repo/issue/view_content/attachments.tmpl b/templates/repo/issue/view_content/attachments.tmpl index 17bf9bb9ed..2d3c638179 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -1,9 +1,15 @@ {{range .Attachments}} - - {{if FilenameIsImage .Name}} - - {{else}} - {{svg "octicon-desktop-download" 16}} - {{end}} - +
+ + {{if FilenameIsImage .Name}} + {{svg "octicon-file-media" 16}} + {{else}} + {{svg "octicon-desktop-download" 16}} + {{end}} + {{.Name}} + +
+
+ {{.Size | FileSize}} +
{{end}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 3987dc668f..635ad50e44 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -52,6 +52,12 @@
{{.Content}}
+ {{if .Issue.Attachments}} +
+
+ {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Issue.Attachments}} +
+ {{end}} {{$reactions := .Reactions.GroupByType}} {{if $reactions}} @@ -59,13 +65,6 @@ {{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}} {{end}} - {{if .Attachments}} -
-
- {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments}} -
-
- {{end}} {{else if eq .Type 1}}