aboutsummaryrefslogtreecommitdiff
path: root/themes/alps/util.html
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-11-19 13:14:12 -0500
committerDrew DeVault <sir@cmpwn.com>2020-11-19 13:14:12 -0500
commit51d762ac5fd21c6cac898b2e5eed2eabdb0fe841 (patch)
tree9a62e4920c44dd7f3c5afcd49f9ced7573d7f4de /themes/alps/util.html
parent8cc742f45df7544c20f43e781d2c7e4aa6a3f4f5 (diff)
downloadalps-51d762ac5fd21c6cac898b2e5eed2eabdb0fe841.tar.gz
alps-51d762ac5fd21c6cac898b2e5eed2eabdb0fe841.zip
Implement mailbox subscriptions
Diffstat (limited to 'themes/alps/util.html')
-rw-r--r--themes/alps/util.html37
1 files changed, 11 insertions, 26 deletions
diff --git a/themes/alps/util.html b/themes/alps/util.html
index 535714f..9cdfd86 100644
--- a/themes/alps/util.html
+++ b/themes/alps/util.html
@@ -1,43 +1,28 @@
{{ define "mbox-link" }}
-{{ if not (.HasAttr "\\Noselect") }}
-<li {{ if .Active }}class="active"{{ end }}>
- <a href="{{.URL}}">
- {{- if eq .Name "INBOX" -}}
+{{ if not (.Info.HasAttr "\\Noselect") }}
+<li {{ if .Info.Active }}class="active"{{ end }}>
+ <a href="{{.Info.URL}}">
+ {{- if eq .Info.Name "INBOX" -}}
Inbox
{{- else -}}
- {{ .Name }}
+ {{ .Info.Name }}
{{- end -}}
- {{- if .HasAttr "\\HasChildren" }}/{{ end }}
+ {{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
</a>
- <!-- TODO
- <button
- type="submit"
- name="subscribe"
- value="{{.Name}}"
- form="subscribe-form"
- {{ if eq .Name "INBOX" }}
- title="Unsubscribe"
- {{ else }}
- title="Subscribe"
- {{ end }}
- >
- {{ if eq .Name "INBOX" }}
- ◉
- {{ else }}
- ○
+ {{ if .Status }}
+ {{ if .Status.Unseen }}
+ <span class="unseen">({{.Status.Unseen}})</span>
+ {{ end }}
{{ end }}
- </button>
- -->
</li>
{{ else }}
<li class="noselect">
- {{.Name}}{{- if .HasAttr "\\HasChildren" }}/{{ end }}
+ {{.Info.Name}}{{- if .Info.HasAttr "\\HasChildren" }}/{{ end }}
</li>
{{ end }}
{{ end }}
{{ define "aside" }}
-<form id="subscribe-form" method="POST"></form>
<aside>
<ul>
<!-- the logo image, dimensions 200x32 may be present or not -->