mirror of https://github.com/go-gitea/gitea
Improve representation of attachments in issues (#11141)
* Improves representation of attachments in issues to a list showing the file name and file size (see #6500 and #6089). Signed-off-by: Matthias Schoettle <git@mattsch.com> * Fixes indentation. Co-authored-by: zeripath <art27@cantab.net>pull/10967/head^2
parent
50475fff06
commit
33176e8d27
@ -1,9 +1,15 @@ |
|||||||
{{range .Attachments}} |
{{range .Attachments}} |
||||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> |
<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}} |
{{if FilenameIsImage .Name}} |
||||||
<img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> |
<span class="ui image">{{svg "octicon-file-media" 16}}</span> |
||||||
{{else}} |
{{else}} |
||||||
<span class="ui image" title='{{$.ctx.i18n.Tr "repo.issues.attachment.download" .Name}}'>{{svg "octicon-desktop-download" 16}}</span> |
<span class="ui image">{{svg "octicon-desktop-download" 16}}</span> |
||||||
{{end}} |
{{end}} |
||||||
|
<span><strong>{{.Name}}</strong></span> |
||||||
</a> |
</a> |
||||||
|
</div> |
||||||
|
<div class="four wide column" style="padding: 0px;"> |
||||||
|
<span class="ui text grey right">{{.Size | FileSize}}</span> |
||||||
|
</div> |
||||||
{{end}} |
{{end}} |
||||||
|
Loading…
Reference in new issue