{{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");
  listInit();
});
</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:reloadList()">
      <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}}

