|
1 |
| -{{- range .Attachments -}} |
2 |
| -<div class="twelve wide column" style="padding: 6px;"> |
3 |
| - <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> |
4 |
| - {{if FilenameIsImage .Name}} |
5 |
| - <span class="ui image">{{svg "octicon-file"}}</span> |
6 |
| - {{else}} |
7 |
| - <span class="ui image">{{svg "octicon-desktop-download"}}</span> |
8 |
| - {{end}} |
9 |
| - <span><strong>{{.Name}}</strong></span> |
10 |
| - </a> |
| 1 | +<div class="dropzone-attachments"> |
| 2 | + {{if .Attachments}} |
| 3 | + <div class="ui clearing divider"></div> |
| 4 | + {{end}} |
| 5 | + <div class="ui middle aligned padded grid"> |
| 6 | + {{$hasThumbnails := false}} |
| 7 | + {{- range .Attachments -}} |
| 8 | + <div class="twelve wide column" style="padding: 6px;"> |
| 9 | + <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> |
| 10 | + {{if FilenameIsImage .Name}} |
| 11 | + {{if not (containGeneric $.Content .UUID)}} |
| 12 | + {{$hasThumbnails = true}} |
| 13 | + {{end}} |
| 14 | + <span class="ui image">{{svg "octicon-file"}}</span> |
| 15 | + {{else}} |
| 16 | + <span class="ui image">{{svg "octicon-desktop-download"}}</span> |
| 17 | + {{end}} |
| 18 | + <span><strong>{{.Name}}</strong></span> |
| 19 | + </a> |
| 20 | + </div> |
| 21 | + <div class="four wide column" style="padding: 0px;"> |
| 22 | + <span class="ui text grey right">{{.Size | FileSize}}</span> |
| 23 | + </div> |
| 24 | + {{end -}} |
| 25 | + </div> |
| 26 | + |
| 27 | + {{if $hasThumbnails}} |
| 28 | + <div class="ui clearing divider"></div> |
| 29 | + <div class="ui small images thumbnails"> |
| 30 | + {{- range .Attachments -}} |
| 31 | + {{if FilenameIsImage .Name}} |
| 32 | + {{if not (containGeneric $.Content .UUID)}} |
| 33 | + <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}"> |
| 34 | + <img class="ui image" src="{{.DownloadURL}}" title='{{$.ctx.i18n.Tr "repo.issues.attachment.open_tab" .Name}}'> |
| 35 | + </a> |
| 36 | + {{end}} |
| 37 | + {{end}} |
| 38 | + {{end -}} |
| 39 | + </div> |
| 40 | + {{end}} |
| 41 | + |
11 | 42 | </div>
|
12 |
| -<div class="four wide column" style="padding: 0px;"> |
13 |
| - <span class="ui text grey right">{{.Size | FileSize}}</span> |
14 |
| -</div> |
15 |
| -{{end -}} |
|
0 commit comments