mirror of
https://github.com/jhillyerd/inbucket.git
synced 2026-01-28 14:05:57 +00:00
webui: Renamed themes dir to ui
- Eliminated intermediate bootstrap dir
This commit is contained in:
1
ui/templates/mailbox/_html.html
Normal file
1
ui/templates/mailbox/_html.html
Normal file
@@ -0,0 +1 @@
|
||||
{{.body}}
|
||||
127
ui/templates/mailbox/_show.html
Normal file
127
ui/templates/mailbox/_show.html
Normal file
@@ -0,0 +1,127 @@
|
||||
{{$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>
|
||||
Raw 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>To:</dt>
|
||||
<dd>
|
||||
{{range $i, $addr := .message.To}}
|
||||
{{- if $i}},{{end}}
|
||||
{{$addr -}}
|
||||
{{end}}
|
||||
</dd>
|
||||
<dt>Date:</dt>
|
||||
<dd>{{.message.Date}}</dd>
|
||||
<dt>Subject:</dt>
|
||||
<dd>{{.message.Subject}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{with .mimeErrors}}
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<strong>Notice:</strong> MIME parsing <u>W</u>arnings and/or <u>E</u>rrors were encountered
|
||||
<ul>
|
||||
{{range $i, $err := .}}
|
||||
<li>{{$err}}</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<nav>
|
||||
<ul id="body-tabs" class="nav nav-tabs" role="tablist">
|
||||
{{if .htmlAvailable}}
|
||||
<li role="presentation">
|
||||
<a href="#body-html" aria-controls="body-html" role="tab" data-toggle="tab">Safe HTML</a>
|
||||
</li>
|
||||
{{end}}
|
||||
<li role="presentation">
|
||||
<a href="#body-text" aria-controls="body-text" role="tab" data-toggle="tab">Plain Text</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane message-body" id="body-html">{{.htmlBody}}</div>
|
||||
<div role="tabpanel" class="tab-pane message-body" id="body-text">{{.body}}</div>
|
||||
</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}}
|
||||
80
ui/templates/mailbox/index.html
Normal file
80
ui/templates/mailbox/index.html
Normal file
@@ -0,0 +1,80 @@
|
||||
{{define "title"}}{{printf "Inbucket for %v" .name}}{{end}}
|
||||
{{$name := .name}}
|
||||
|
||||
{{define "script"}}
|
||||
<script src="/public/mailbox.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
var selected = "{{.selected}}";
|
||||
var mailbox = "{{.name}}";
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#nav-mail').addClass("active");
|
||||
onDocumentReady();
|
||||
});
|
||||
</script>
|
||||
<script type="text/html" id="list-entry-template">
|
||||
<button data-id="id" type="button" class="message-list-entry list-group-item">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 col-md-12 text-primary" data-content-text="subject"
|
||||
data-format="subject"/>
|
||||
<div class="col-sm-4 col-md-12 small" data-content-text="from"/>
|
||||
<div class="col-sm-4 col-md-12 small" data-content="date" data-format="date"/>
|
||||
</div>
|
||||
</button>
|
||||
</script>
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading mailbox-header">
|
||||
<span class="glyphicon glyphicon-inbox" aria-hidden="true"></span>
|
||||
{{.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group">
|
||||
<input id="message-search"
|
||||
type="search"
|
||||
class="form-control"
|
||||
placeholder="search"
|
||||
data-toggle="tooltip"
|
||||
data-placement="top"
|
||||
title="Search Sender and Subject"/>
|
||||
<div class ="input-group-btn">
|
||||
<button class="btn btn-default"
|
||||
type="button"
|
||||
data-toggle="tooltip"
|
||||
data-placement="top"
|
||||
title="Clear Search"
|
||||
onclick="clearMessageSearch()">
|
||||
<span class="glyphicon glyphicon-remove-circle"></span>
|
||||
</button>
|
||||
<button class="btn btn-default"
|
||||
type="button"
|
||||
data-toggle="tooltip"
|
||||
data-placement="top"
|
||||
title="Refresh List"
|
||||
onclick="loadList()">
|
||||
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
|
||||
</button>
|
||||
<button class="btn btn-default"
|
||||
type="button"
|
||||
data-toggle="tooltip"
|
||||
data-placement="top"
|
||||
title="Delete Mailbox"
|
||||
onclick="deleteMailbox()">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="message-list-wrapper">
|
||||
<div id="message-list" class="list-group"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="message-container" class="col-md-9">
|
||||
<div id="message-content">
|
||||
<p>Select a message at left, or enter a different username into the box on upper right.</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user