aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/public/mailbox.html
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/public/mailbox.html')
-rw-r--r--plugins/base/public/mailbox.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/plugins/base/public/mailbox.html b/plugins/base/public/mailbox.html
new file mode 100644
index 0000000..ddd1260
--- /dev/null
+++ b/plugins/base/public/mailbox.html
@@ -0,0 +1,45 @@
+{{template "head.html"}}
+
+<h1>koushin</h1>
+
+<p>
+ <a href="/logout">Logout</a> · <a href="/compose">Compose</a>
+</p>
+
+<h2>{{.Mailbox.Name}}</h2>
+
+<p>Mailboxes:</p>
+<ul>
+ {{range .Mailboxes}}
+ <li><a href="/mailbox/{{.Name | pathescape}}">{{.Name}}</a></li>
+ {{end}}
+</ul>
+
+{{if .Messages}}
+ <p>Messages:</p>
+ <ul>
+ {{range .Messages}}
+ <li><a href="/message/{{$.Mailbox.Name | pathescape}}/{{.Uid}}?part={{.TextPartName}}">
+ {{if .Envelope.Subject}}
+ {{.Envelope.Subject}}
+ {{else}}
+ (No subject)
+ {{end}}
+ </a></li>
+ {{end}}
+ </ul>
+
+ <p>
+ {{if ge .PrevPage 0}}
+ <a href="?page={{.PrevPage}}">Prev</a>
+ {{end}}
+ {{if and (ge .PrevPage 0) (ge .NextPage 0)}}·{{end}}
+ {{if ge .NextPage 0}}
+ <a href="?page={{.NextPage}}">Next</a>
+ {{end}}
+ </p>
+{{else}}
+ <p>Mailbox is empty.</p>
+{{end}}
+
+{{template "foot.html"}}