blob: fca34bac1b22d85d4c86aa7494e483cced4629c0 (
plain) (
tree)
|
|
{{template "head.html" .}}
{{template "nav.html" .}}
{{template "util.html" .}}
{{ define "mbox-link" }}
{{ if not (.HasAttr "\\Noselect") }}
<a href="{{.URL}}" {{ if .Active }}class="active"{{ end }}>
{{- if eq .Name "INBOX" -}}
Inbox
{{- else -}}
{{ .Name }}
{{- end -}}
{{- if .HasAttr "\\HasChildren" }}/{{ end }}
{{ if and (ne .Unseen -1) (ne .Unseen 0) }}({{ .Unseen }}){{ end }}
</a>
{{ else }}
<span class="noselect">
{{.Name}}{{- if .HasAttr "\\HasChildren" }}/{{ end }}
</span>
{{ end }}
{{ end }}
<div class="page-wrap">
{{ template "aside" . }}
<div class="container">
<form id="messages-form" method="post"></form>
<main class="message-list">
<section class="actions">
{{ template "messages-header.html" . }}
</section>
<section class="messages">
<div class="message-grid">
{{range .Messages}}
{{ $classes := "message-list-item" }}
{{ if not (.HasFlag "\\Seen") }}
{{ $classes = printf "%s %s" $classes "message-list-unread" }}
{{ end }}
{{ if (.HasFlag "\\Deleted") }}
{{ $classes = printf "%s %s" $classes "message-list-deleted" }}
{{ end }}
{{ if not (.HasFlag "\\Deleted") }}
<div class="message-list-checkbox {{$classes}}">
<input type="checkbox" name="uids" value="{{.Uid}}" form="messages-form">
</div>
<div class="message-list-sender {{$classes}}">
{{ range .Envelope.From }}
{{ if .PersonalName }}
{{.PersonalName}}
{{ else }}
{{.MailboxName}}@{{.HostName}}
{{ end }}
{{ end }}
</div>
<div class="message-list-subject {{$classes}}">
<a href="{{if .TextPart}}{{.TextPart.URL false}}{{else}}{{.URL}}{{end}}">
{{if .Envelope.Subject}}
{{.Envelope.Subject}}
{{else}}
(No subject)
{{end}}
</a>
</div>
<div class="message-list-date {{$classes}}">
{{ .Envelope.Date | formatdate }}
</div>
{{ else }}
<div class="message-list-checkbox {{$classes}}">
<input type="checkbox" form="messages-form" disabled readonly>
</div>
<div class="message-list-sender {{$classes}}"></div>
<div class="message-list-subject {{$classes}}">
<em>(this email was deleted by another client)</em>
</div>
<div class="message-list-date {{$classes}}"></div>
{{ end }}
{{ end }}
{{if not .Messages}}
<p class="empty-list">Nothing here yet.</p>
{{end}}
</div>
</section>
<section class="actions">
{{ template "messages-header.html" . }}
</section>
</main>
</div>
</div>
{{template "foot.html"}}
|