mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-20 02:57:05 +00:00
Attachment display & downloading!
This commit is contained in:
@@ -327,3 +327,28 @@ table.metrics {
|
||||
.metrics td.sparkline {
|
||||
width: 170px;
|
||||
}
|
||||
|
||||
#emailAttachments {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
#emailAttachments th, #emailAttachments td {
|
||||
text-align: left;
|
||||
padding: 0 3px 3px 0;
|
||||
}
|
||||
|
||||
#emailAttachments .fileName:before {
|
||||
content: '\203A\00A0';
|
||||
}
|
||||
|
||||
#emailAttachments a {
|
||||
background: #8ac6dc;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#emailAttachments a:hover {
|
||||
background: #becf74;
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user