mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 00:32:14 +01:00
261c3a56a2
* Handle if two or more attachments have the same name * previously only the first could be downloaded - now each is downloadable * dos also take care of #6506 (fix was: #6512) * use func DownloadURL() at issue attatchments too
9 lines
422 B
Cheetah
9 lines
422 B
Cheetah
{{range .Attachments}}
|
|
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
|
|
{{if FilenameIsImage .Name}}
|
|
<img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'>
|
|
{{else}}
|
|
<span class="ui image octicon octicon-desktop-download" title='{{$.ctx.i18n.Tr "repo.issues.attachment.download" .Name}}'></span>
|
|
{{end}}
|
|
</a>
|
|
{{end}}
|