mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
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
This commit is contained in:
parent
6f2784911f
commit
7eb8460132
6 changed files with 40 additions and 20 deletions
|
@ -2,7 +2,7 @@
|
|||
<div class="twelve wide column" style="padding: 6px;">
|
||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
|
||||
{{if FilenameIsImage .Name}}
|
||||
<span class="ui image">{{svg "octicon-file-media"}}</span>
|
||||
<span class="ui image">{{svg "octicon-file"}}</span>
|
||||
{{else}}
|
||||
<span class="ui image">{{svg "octicon-desktop-download"}}</span>
|
||||
{{end}}
|
||||
|
|
|
@ -57,9 +57,11 @@
|
|||
<div id="comment-{{.ID}}" class="raw-content hide">{{.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}" data-attachment-url="{{$.RepoLink}}/comments/{{.ID}}/attachments"></div>
|
||||
{{if .Attachments}}
|
||||
<div class="ui clearing divider"></div>
|
||||
<div class="ui middle aligned padded grid">
|
||||
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments}}
|
||||
<div class="dropzone-attachments">
|
||||
<div class="ui clearing divider"></div>
|
||||
<div class="ui middle aligned padded grid">
|
||||
{{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue