1cf95af41e
This causes the mailbox to automatically reload the page every 60 seconds, without JavaScript. This also updates the base template data to include the full URL, and replaces the earlier "Path" field with a pre-split array of path components, which is more immediately useful to most templates given the limitations of string munging with text/template primitives.
34 lines
699 B
HTML
34 lines
699 B
HTML
{{template "head.html" .}}
|
|
|
|
<h1>alps</h1>
|
|
|
|
<p>
|
|
<a href="/">Back</a> · <a href="/contacts/create">Create new contact</a>
|
|
</p>
|
|
|
|
<h2>Contacts: {{.AddressBook.Name}}</h2>
|
|
|
|
<form method="get" action="">
|
|
<input type="search" name="query" value="{{.Query}}">
|
|
<input type="submit" value="Search">
|
|
</form>
|
|
|
|
{{if .AddressObjects}}
|
|
<ul>
|
|
{{range .AddressObjects}}
|
|
<li>
|
|
<a href="{{.URL}}">
|
|
{{.Card.Value "FN"}}
|
|
</a>
|
|
{{$email := .Card.PreferredValue "EMAIL"}}
|
|
{{if $email}}
|
|
<<a href="/compose?to={{$email}}">{{$email}}</a>>
|
|
{{end}}
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
{{else}}
|
|
<p>No contact.</p>
|
|
{{end}}
|
|
|
|
{{template "foot.html"}}
|