diff options
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/diff/box.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/diff/comment_form.tmpl | 6 | ||||
-rw-r--r-- | templates/repo/diff/comments.tmpl | 5 | ||||
-rw-r--r-- | templates/repo/issue/view_content/conversation.tmpl | 3 |
4 files changed, 18 insertions, 1 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index abeeacead0..b9a43a0612 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -237,6 +237,11 @@ "TextareaName" "content" "DropzoneParentContainer" ".ui.form" )}} + {{if .IsAttachmentEnabled}} + <div class="field"> + {{template "repo/upload" .}} + </div> + {{end}} <div class="text right edit buttons"> <button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.cancel"}}</button> <button class="ui primary save button">{{ctx.Locale.Tr "repo.issues.save"}}</button> diff --git a/templates/repo/diff/comment_form.tmpl b/templates/repo/diff/comment_form.tmpl index 767c2613a0..54817d4740 100644 --- a/templates/repo/diff/comment_form.tmpl +++ b/templates/repo/diff/comment_form.tmpl @@ -19,6 +19,12 @@ "DisableAutosize" "true" )}} + {{if $.root.IsAttachmentEnabled}} + <div class="field"> + {{template "repo/upload" $.root}} + </div> + {{end}} + <div class="field footer gt-mx-3"> <span class="markup-info">{{svg "octicon-markup"}} {{ctx.Locale.Tr "repo.diff.comment.markdown_info"}}</span> <div class="gt-text-right"> diff --git a/templates/repo/diff/comments.tmpl b/templates/repo/diff/comments.tmpl index b3d06ed6bc..b795074e49 100644 --- a/templates/repo/diff/comments.tmpl +++ b/templates/repo/diff/comments.tmpl @@ -61,7 +61,10 @@ {{end}} </div> <div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div> - <div class="edit-content-zone gt-hidden" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}"></div> + <div class="edit-content-zone gt-hidden" data-update-url="{{$.root.RepoLink}}/comments/{{.ID}}" data-context="{{$.root.RepoLink}}" data-attachment-url="{{$.root.RepoLink}}/comments/{{.ID}}/attachments"></div> + {{if .Attachments}} + {{template "repo/issue/view_content/attachments" dict "ctxData" $ "Attachments" .Attachments "Content" .RenderedContent}} + {{end}} </div> {{$reactions := .Reactions.GroupByType}} {{if $reactions}} diff --git a/templates/repo/issue/view_content/conversation.tmpl b/templates/repo/issue/view_content/conversation.tmpl index 1bc850d8cf..56f1af19b2 100644 --- a/templates/repo/issue/view_content/conversation.tmpl +++ b/templates/repo/issue/view_content/conversation.tmpl @@ -94,6 +94,9 @@ </div> <div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div> <div class="edit-content-zone gt-hidden" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div> + {{if .Attachments}} + {{template "repo/issue/view_content/attachments" dict "ctxData" $ "Attachments" .Attachments "Content" .RenderedContent}} + {{end}} </div> {{$reactions := .Reactions.GroupByType}} {{if $reactions}} |