1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2026-01-08 20:21:55 +00:00
Files
go-inbucket/themes/bootstrap/templates/mailbox/_show.html
2015-08-23 15:28:49 -07:00

75 lines
2.2 KiB
HTML

{{$name := .name}}
{{$id := .message.Id}}
<div class="btn-group btn-group-sm message-controls" role="group" aria-label="Message Controls">
<button type="button"
class="btn btn-primary"
onClick="window.open('/link/{{$name}}/{{$id}}');">
<span class="glyphicon glyphicon-link" aria-hidden="true"></span>
Link
</button>
<button type="button"
class="btn btn-danger"
onClick="deleteMessage('{{.message.Id}}');">
<span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
Delete
</button>
<button type="button"
class="btn btn-primary"
onClick="messageSource('{{.message.Id}}');">
<span class="glyphicon glyphicon-education" aria-hidden="true"></span>
Source
</button>
{{if .htmlAvailable}}
<button type="button"
class="btn btn-primary"
onClick="htmlView('{{.message.Id}}');">
<span class="glyphicon glyphicon-new-window" aria-hidden="true"></span>
HTML
</button>
{{end}}
</div>
<div class="panel panel-default message-header">
<div class="panel-body">
<dl class="dl-horizontal">
<dt>From:</dt>
<dd>{{.message.From}}</dd>
<dt>Date:</dt>
<dd>{{.message.Date}}</dd>
<dt>Subject:</dt>
<dd>{{.message.Subject}}</dd>
</dl>
</div>
</div>
<div class="message-body">{{.body}}</div>
{{with .attachments}}
<div class="well message-attachments">
<ul class="list-unstyled">
{{range $i, $e := .}}
<li>
<span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span>
{{$e.FileName}}
({{$e.ContentType}})
<a class="btn btn-success btn-sm"
role="button"
href="/mailbox/vattach/{{$name}}/{{$id}}/{{$i}}/{{$e.FileName}}"
target="_blank"
aria-label="View">
<span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>
View
</a>
<a class="btn btn-primary btn-sm"
role="button"
href="/mailbox/dattach/{{$name}}/{{$id}}/{{$i}}/{{$e.FileName}}"
aria-label="Download">
<span class="glyphicon glyphicon-download" aria-hidden="true"></span>
Download
</a>
</li>
{{end}}
</ul>
</div>
{{end}}