mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 10:07:02 +00:00
- Add jquery-load-template to bower
- Add moment (date rendering) to bower
- Load message list JSON via /api/v1/mailbox
- Render message list using jquery template
- Fix resize related problems with message list height caused by
2092949dbc
61 lines
1.6 KiB
HTML
61 lines
1.6 KiB
HTML
{{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="listEntry list-group-item">
|
|
<div class="row">
|
|
<div class="col-sm-4 col-md-12 text-primary" data-content="subject"/>
|
|
<div class="col-sm-4 col-md-12 small" data-content="from"/>
|
|
<div class="col-sm-4 col-md-12 small" data-content="date" data-format="DateFormatter"/>
|
|
</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="text-center">
|
|
<a href="javascript:loadList()">
|
|
<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
|
|
Refresh
|
|
</a>
|
|
</div>
|
|
<div id="message-list-wrapper">
|
|
<div id="message-list" class="list-group"></div>
|
|
</div>
|
|
</div>
|
|
<div id="message-container" class="col-md-9">
|
|
{{with .ctx.Session.Flashes "errors"}}
|
|
<div class="errors">
|
|
<p>Please fix the following errors and resubmit:<p>
|
|
<ul>
|
|
{{range .}}
|
|
<li>{{.}}</li>
|
|
{{end}}
|
|
</ul>
|
|
</div>
|
|
{{end}}
|
|
<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}}
|
|
|