1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-22 20:17:02 +00:00

Attachment display & downloading!

This commit is contained in:
James Hillyerd
2012-11-05 21:35:34 -08:00
parent 09b8534b9b
commit 1da98a9f7e
5 changed files with 120 additions and 41 deletions

View File

@@ -1,3 +1,5 @@
{{$name := .name}}
{{$id := .message.Id}}
<div id="emailActions">
<a href="javascript:deleteMessage('{{.message.Id}}');">Delete</a>
<a href="javascript:messageSource('{{.message.Id}}');">Source</a>
@@ -15,6 +17,21 @@
<td>{{.message.Date}}</td>
</tr>
<table>
{{with .attachments}}
<table id="emailAttachments">
<tr><th colspan="4">Attachments:</th></tr>
{{range $i, $e := .}}
<tr>
<td class="fileName">{{$e.FileName}}</td>
<td>({{$e.ContentType}})</td>
<td><a href="/mailbox/vattach/{{$name}}/{{$id}}/{{$i}}/{{$e.FileName}}" target="_blank">View</a></td>
<td><a href="/mailbox/dattach/{{$name}}/{{$id}}/{{$i}}/{{$e.FileName}}">Download</a></td>
</tr>
{{end}}
</table>
{{end}}
<div id="emailSubject"><h3>{{.message.Subject}}</h3></div>
<div id="emailBody">{{.body}}</div>