mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 01:57:02 +00:00
- Display a warning when text was generated from HTML - Add a semi complicated, responsive HTML email for future testing - Closes #20
102 lines
3.1 KiB
HTML
102 lines
3.1 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="toggleMessageLink('{{.message.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 id="link-row" class="row" style="display: none; padding-bottom: 10px;">
|
|
<div class="col-lg-12">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-btn">
|
|
<button class="btn btn-default btn-clipboard"
|
|
type="button"
|
|
title="Copy"
|
|
data-toggle="tooltip"
|
|
data-placement="bottom"
|
|
data-clipboard-target="#link-input-control">
|
|
<span class="glyphicon glyphicon-copy" aria-hidden="true"></span>
|
|
</button>
|
|
</span>
|
|
<input id="link-input-control" type="text" class="form-control">
|
|
</div>
|
|
</div>
|
|
</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>
|
|
|
|
{{if .isTextFromHTML}}
|
|
<div class="alert alert-warning" role="alert">
|
|
<strong>Notice:</strong> Message did not contain a plain text portion;
|
|
the text below was converted from HTML automatically.
|
|
</div>
|
|
{{end}}
|
|
|
|
<div class="message-body">{{.body}}</div>
|
|
|
|
{{with .attachments}}
|
|
<div class="well message-attachments">
|
|
{{range $i, $e := .}}
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<span class="glyphicon glyphicon-paperclip" aria-hidden="true"></span>
|
|
{{$e.FileName}}
|
|
({{$e.ContentType}})
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<a class="btn btn-success btn-xs"
|
|
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-xs"
|
|
role="button"
|
|
href="/mailbox/dattach/{{$name}}/{{$id}}/{{$i}}/{{$e.FileName}}"
|
|
aria-label="Download">
|
|
<span class="glyphicon glyphicon-download" aria-hidden="true"></span>
|
|
Download
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|