2020-05-13 14:58:22 +00:00
|
|
|
{{template "head.html" .Global}}
|
2020-02-12 00:20:21 +00:00
|
|
|
{{template "nav.html" .Global}}
|
2019-12-12 18:54:57 +00:00
|
|
|
|
|
|
|
<!-- TODO: Share tabs if reasonable -->
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12 header-tabbed">
|
|
|
|
<h2>{{.Mailbox.Name}}</h2>
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
<li class="nav-item">
|
|
|
|
<a
|
|
|
|
class="nav-link active"
|
|
|
|
href="/mailbox/{{.Mailbox.Name | pathescape }}"
|
2020-02-11 23:40:23 +00:00
|
|
|
>Messages</a>
|
2019-12-12 18:54:57 +00:00
|
|
|
</li>
|
|
|
|
<li class="nav-item">
|
|
|
|
<a class="nav-link" href="/compose">Compose</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="container-fluid mailbox-container">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-2 mailboxes-column">
|
|
|
|
<ul class="nav flex-column">
|
|
|
|
{{$current := .Mailbox }}
|
|
|
|
{{range .Mailboxes}}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a
|
|
|
|
{{ if eq $current.Name .Name }}
|
|
|
|
class="nav-link active"
|
|
|
|
{{ else }}
|
|
|
|
class="nav-link"
|
|
|
|
{{ end }}
|
|
|
|
href="/mailbox/{{.Name | pathescape}}"
|
|
|
|
>{{.Name}}</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-10 messages-column">
|
2019-12-25 18:34:24 +00:00
|
|
|
<div class="nav flex-column">
|
|
|
|
<form method="get" action="">
|
|
|
|
<input type="text" name="query" value="{{.Query}}"
|
2020-02-11 23:40:23 +00:00
|
|
|
class="form-control" placeholder="Search" autofocus>
|
2019-12-25 18:34:24 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2019-12-12 18:54:57 +00:00
|
|
|
{{if .Messages}}
|
|
|
|
<ul class="nav flex-column">
|
|
|
|
{{range .Messages}}
|
|
|
|
<li class="nav-item">
|
|
|
|
<a
|
|
|
|
class="nav-link"
|
|
|
|
href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}"
|
|
|
|
>
|
|
|
|
<span class="text-muted date">
|
2019-12-17 10:33:29 +00:00
|
|
|
{{ .Envelope.Date | formatdate }}
|
2019-12-12 18:54:57 +00:00
|
|
|
</span>
|
|
|
|
<span class="text-normal from">
|
|
|
|
{{ range .Envelope.From }}
|
|
|
|
{{ .PersonalName }}
|
|
|
|
{{ end }}
|
|
|
|
</span>
|
2020-02-11 16:11:46 +00:00
|
|
|
<span class="{{if not (.HasFlag "\\Seen")}}font-weight-bold{{end}}">
|
|
|
|
{{if .Envelope.Subject}}
|
|
|
|
{{.Envelope.Subject}}
|
|
|
|
{{else}}
|
|
|
|
(No subject)
|
|
|
|
{{end}}
|
|
|
|
</span>
|
2019-12-12 18:54:57 +00:00
|
|
|
</a></li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
{{if ge .PrevPage 0}}
|
|
|
|
<a href="?page={{.PrevPage}}">Prev</a>
|
|
|
|
{{end}}
|
|
|
|
{{if and (ge .PrevPage 0) (ge .NextPage 0)}}·{{end}}
|
|
|
|
{{if ge .NextPage 0}}
|
|
|
|
<a href="?page={{.NextPage}}">Next</a>
|
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
{{else}}
|
2019-12-17 10:33:29 +00:00
|
|
|
<p>No message.</p>
|
2019-12-12 18:54:57 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{template "foot.html"}}
|