67 lines
2.4 KiB
HTML
67 lines
2.4 KiB
HTML
|
|
{{define "email-attachments"}}
|
||
|
|
<div class="table-container">
|
||
|
|
<table class="table is-fullwidth">
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Name</th>
|
||
|
|
<th>Type</th>
|
||
|
|
<th>Size</th>
|
||
|
|
<th>Date</th>
|
||
|
|
<th>Actions</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
{{range .}}
|
||
|
|
<tr>
|
||
|
|
<td>
|
||
|
|
{{if .IsMessageBody}}
|
||
|
|
<span class="icon has-text-info">
|
||
|
|
<i class="fas fa-envelope"></i>
|
||
|
|
</span>
|
||
|
|
<span class="has-text-weight-semibold">{{.Name}}</span>
|
||
|
|
<span class="tag is-small is-info ml-2">Body</span>
|
||
|
|
{{else}}
|
||
|
|
<span class="icon has-text-grey">
|
||
|
|
<i class="fas fa-paperclip"></i>
|
||
|
|
</span>
|
||
|
|
{{.Name}}
|
||
|
|
{{end}}
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<span class="tag is-light">{{.Type}}</span>
|
||
|
|
</td>
|
||
|
|
<td>{{.Size}} bytes</td>
|
||
|
|
<td class="is-size-7">
|
||
|
|
{{.Created}}
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
{{if .GmailAttachmentID}}
|
||
|
|
<a href="/api/v1/emails/attachments/{{.ID}}/stream"
|
||
|
|
target="_blank" class="button is-small is-info">
|
||
|
|
<span class="icon">
|
||
|
|
<i class="fas fa-cloud-download-alt"></i>
|
||
|
|
</span>
|
||
|
|
<span>Stream</span>
|
||
|
|
</a>
|
||
|
|
{{else}}
|
||
|
|
<a href="/api/v1/emails/attachments/{{.ID}}"
|
||
|
|
target="_blank" class="button is-small is-success">
|
||
|
|
<span class="icon">
|
||
|
|
<i class="fas fa-download"></i>
|
||
|
|
</span>
|
||
|
|
<span>Download</span>
|
||
|
|
</a>
|
||
|
|
{{end}}
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
{{else}}
|
||
|
|
<tr>
|
||
|
|
<td colspan="5" class="has-text-centered">
|
||
|
|
<p class="has-text-grey">No attachments found</p>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
{{end}}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
{{end}}
|