blob: f425dfea11232cffceb29ba925201d5258d694c0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{{ 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 }}
{{ if .Common.Inbox }}{{ with .Common.Inbox }}{{ template "mbox-link" . }}{{ end }}{{ end }}
{{ if .Common.Drafts }}{{ with .Common.Drafts }}{{ template "mbox-link" . }}{{ end }}{{ end }}
{{ if .Common.Sent }}{{ with .Common.Sent }}{{ template "mbox-link" . }}{{ end }}{{ end }}
{{ if .Common.Junk }}{{ with .Common.Junk }}{{ template "mbox-link" . }}{{ end }}{{ end }}
{{ if .Common.Trash }}{{ with .Common.Trash }}{{ template "mbox-link" . }}{{ end }}{{ end }}
{{ if .Common.Archive }}{{ with .Common.Archive }}{{ template "mbox-link" . }}{{ end }}{{ 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 }}
|