From 7eb846013299465e4cd73f76f13a00984183146e Mon Sep 17 00:00:00 2001 From: zeripath Date: Sun, 11 Oct 2020 00:49:59 +0100 Subject: Fix attachments list in edit comment (#13036) #11141 broke the appearance of dropzone attachments when editting comments causing poorly updating lists. This PR fixes this. Fix #12583 Signed-off-by: Andrew Thornton art27@cantab.net --- templates/repo/issue/view_content.tmpl | 8 +++++--- templates/repo/issue/view_content/attachments.tmpl | 2 +- templates/repo/issue/view_content/comments.tmpl | 8 +++++--- templates/repo/upload.tmpl | 1 + 4 files changed, 12 insertions(+), 7 deletions(-) (limited to 'templates/repo') diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index a4ce0a7106..190f5117b8 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -65,9 +65,11 @@
{{.Issue.Content}}
{{if .Issue.Attachments}} -
-
- {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .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 1144b9a77a..d76c0bbfa2 100644 --- a/templates/repo/issue/view_content/attachments.tmpl +++ b/templates/repo/issue/view_content/attachments.tmpl @@ -2,7 +2,7 @@
{{if FilenameIsImage .Name}} - {{svg "octicon-file-media"}} + {{svg "octicon-file"}} {{else}} {{svg "octicon-desktop-download"}} {{end}} diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index a730bd5e8b..3b70a10715 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -57,9 +57,11 @@
{{.Content}}
{{if .Attachments}} -
-
- {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments}} +
+
+
+ {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments}} +
{{end}}
diff --git a/templates/repo/upload.tmpl b/templates/repo/upload.tmpl index 93bc098dae..9215da2b19 100644 --- a/templates/repo/upload.tmpl +++ b/templates/repo/upload.tmpl @@ -1,6 +1,7 @@