diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 5f0559c06..c44da2272 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 17bf9bb9e..2d3c63817 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 3987dc668..635ad50e4 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}}