1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-18 10:07:02 +00:00
Files
go-inbucket/themes/bootstrap/templates/mailbox/index.html
James Hillyerd 6fd9f1f98c Load message list over JSON
- 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
2016-03-06 13:15:13 -08:00

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}}