mirror of
https://github.com/go-gitea/gitea
synced 2025-08-09 11:08:19 +00:00
Backport #24202 Close #24195 Fix the bug: 1. The old code doesn't handle `removedfile` event correctly 2. The old code doesn't provide attachments for type=CommentTypeReview --------- Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<div class="dropzone-attachments">
|
||||
{{if .Attachments}}
|
||||
<div class="ui clearing divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
<div class="ui middle aligned padded grid">
|
||||
{{$hasThumbnails := false}}
|
||||
{{- range .Attachments -}}
|
||||
<div class="twelve wide column" style="padding: 6px;">
|
||||
{{$hasThumbnails := false}}
|
||||
{{- range .Attachments -}}
|
||||
<div class="gt-df">
|
||||
<div class="gt-f1 gt-p-3">
|
||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.locale.Tr "repo.issues.attachment.open_tab" .Name}}'>
|
||||
{{if FilenameIsImage .Name}}
|
||||
{{if not (containGeneric $.Content .UUID)}}
|
||||
@@ -18,14 +18,14 @@
|
||||
<span><strong>{{.Name}}</strong></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="four wide column" style="padding: 0px;">
|
||||
<div class="gt-p-3 gt-df gt-ac">
|
||||
<span class="ui text grey right">{{.Size | FileSize}}</span>
|
||||
</div>
|
||||
{{end -}}
|
||||
</div>
|
||||
</div>
|
||||
{{end -}}
|
||||
|
||||
{{if $hasThumbnails}}
|
||||
<div class="ui clearing divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui small thumbnails">
|
||||
{{- range .Attachments -}}
|
||||
{{if FilenameIsImage .Name}}
|
||||
|
Reference in New Issue
Block a user