diff options
author | Simon Ser <contact@emersion.fr> | 2020-03-27 10:50:58 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-03-27 10:50:58 +0100 |
commit | f079bcc704cf4d5aef86dbd99ad5eed5a1a9a04f (patch) | |
tree | 5b276c838b4520954b01bc20f8e79fe613f071d4 /themes/alps | |
parent | e4e826dde2459e02ee8c7f1b76a4f4afa526c858 (diff) | |
download | alps-f079bcc704cf4d5aef86dbd99ad5eed5a1a9a04f.tar.gz alps-f079bcc704cf4d5aef86dbd99ad5eed5a1a9a04f.zip |
themes/alps: fix hardcoded mailbox list in message view
Diffstat (limited to 'themes/alps')
-rw-r--r-- | themes/alps/message.html | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/themes/alps/message.html b/themes/alps/message.html index 3f5a689..29c0617 100644 --- a/themes/alps/message.html +++ b/themes/alps/message.html @@ -6,13 +6,20 @@ <aside> <!-- the logo image, dimensions 200x32 may be present or not --> <a href="/compose" class="compose-mail">Compose Mail</a> - <!-- TODO: get mailbox list from render data --> - <a href="/mailbox/INBOX" {{ if eq $current.Name "INBOX" }}class="active"{{ end }}>Inbox {{ if $current.Unseen }}({{ $current.Unseen }}){{ end }}</a> - <a href="/mailbox/Drafts" {{ if eq $current.Name "Drafts" }}class="active"{{ end }}>Drafts</a> - <a href="/mailbox/Sent" {{ if eq $current.Name "Sent" }}class="active"{{ end }}>Sent</a> - <a href="/mailbox/Archive" {{ if eq $current.Name "Archive" }}class="active"{{ end }}>Archive {{ if $current.Unseen }}({{ $current.Unseen }}){{ end }}</a> - <a href="/mailbox/Junk" {{ if eq $current.Name "Junk" }}class="active"{{ end }}>Junk {{ if $current.Unseen }}({{ $current.Unseen }}){{ end }}</a> - <a href="/mailbox/Trash" {{ if eq $current.Name "Trash" }}class="active"{{ end }}>Trash</a> + {{$current := .Mailbox}} + {{range .Mailboxes}} + <a href="{{.URL}}" + {{ if eq $current.Name .Name }}class="active"{{ end }}> + {{ if eq .Name "INBOX" }} + Inbox + {{else}} + {{.Name}} + {{end}} + {{ if eq $current.Name .Name }} + {{ if $current.Unseen }}({{ $current.Unseen }}){{ end }} + {{ end }} + </a> + {{end}} </aside> <div class="container"> |