55 lines
1.6 KiB
HTML
55 lines
1.6 KiB
HTML
{{ define "mbox-link" }}
|
|
{{ if not (.Info.HasAttr "\\Noselect") }}
|
|
<li {{ if .Info.Active }}class="active"{{ end }}>
|
|
<a href="{{.Info.URL}}">
|
|
{{- if eq .Info.Name "INBOX" -}}
|
|
Inbox
|
|
{{- else -}}
|
|
{{ .Info.Name }}
|
|
{{- end -}}
|
|
{{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
|
|
</a>
|
|
{{ if .Status }}
|
|
{{ if .Status.Unseen }}
|
|
<span class="unseen">({{.Status.Unseen}})</span>
|
|
{{ end }}
|
|
{{ end }}
|
|
</li>
|
|
{{ else }}
|
|
<li class="noselect">
|
|
{{.Info.Name}}{{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
|
|
</li>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ define "aside" }}
|
|
<aside>
|
|
<ul>
|
|
<!-- the logo image, dimensions 200x32 may be present or not -->
|
|
<li>
|
|
<a href="/compose" class="new
|
|
{{ if eq $.GlobalData.URL.Path "/compose" }}active{{ end }}
|
|
">Compose mail</a>
|
|
</li>
|
|
{{ with .CategorizedMailboxes }}
|
|
{{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end }}
|
|
{{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end }}
|
|
{{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end }}
|
|
{{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end }}
|
|
{{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end }}
|
|
{{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end }}
|
|
{{ if .Additional }}
|
|
<hr />
|
|
{{ range .Additional }}
|
|
{{ template "mbox-link" . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
<li>
|
|
<a href="/new-mailbox" class="new
|
|
{{ if eq $.GlobalData.URL.Path "/new-mailbox" }}active{{ end }}
|
|
">Create new folder</a>
|
|
</li>
|
|
</ul>
|
|
</aside>
|
|
{{ end }}
|