alps/public/mailbox.html
Simon Ser b386d1c2bb
Fix mailbox view when empty
This fixes the second part of #14.

References: https://todo.sr.ht/~sircmpwn/koushin/14
2019-12-03 17:52:56 +01:00

32 lines
543 B
HTML

{{template "head"}}
<h1>koushin</h1>
<p>
<a href="/logout">Logout</a> · <a href="/compose">Compose</a>
</p>
<h2>{{.Mailbox.Name}}</h2>
<p>Mailboxes:</p>
<ul>
{{range .Mailboxes}}
<li><a href="/mailbox/{{.Name | pathescape}}">{{.Name}}</a></li>
{{end}}
</ul>
{{if .Messages}}
<p>Messages:</p>
<ul>
{{range .Messages}}
<li><a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
{{.Envelope.Subject}}
</a></li>
{{end}}
</ul>
{{else}}
<p>Mailbox is empty.</p>
{{end}}
{{template "foot"}}