lishwist/templates/home.gotmpl

27 lines
570 B
Go Template

{{define "body"}}
<form method="post" action="/logout">
<input type="submit" value="Logout">
</form>
<h1>Lishwist</h1>
<dl>
<dt>User reference:</dt>
<dd>
<pre>{{.Reference}}</pre>
</dd>
</dl>
<h2>Your list</h2>
<ul>
{{range .Gifts}}
<li>{{.Name}}
<form method="post" action="wishlist/delete">
<input type="hidden" name="gift_id" value="{{.Id}}">
<input type="submit" value="Delete">
</form>
</li>
{{end}}
</ul>
<form method="post" action="/wishlist/add">
<input name="gift_name" required>
<input type="submit">
</form>
{{end}}