mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-30 05:06:21 +01:00
33391e04fe
* Prevent empty div when editing comment The template for attachments needs to remove whitespace and return empty when there are no attachments. Fix #10220
15 lines
589 B
Cheetah
15 lines
589 B
Cheetah
{{- range .Attachments -}}
|
|
<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" 16}}</span>
|
|
{{else}}
|
|
<span class="ui image">{{svg "octicon-desktop-download" 16}}</span>
|
|
{{end}}
|
|
<span><strong>{{.Name}}</strong></span>
|
|
</a>
|
|
</div>
|
|
<div class="four wide column" style="padding: 0px;">
|
|
<span class="ui text grey right">{{.Size | FileSize}}</span>
|
|
</div>
|
|
{{end -}}
|