41 lines
924 B
Go Template
41 lines
924 B
Go Template
{{define "body"}}
|
|
<h1>Lishwist</h1>
|
|
<nav>
|
|
<ul>
|
|
<li>
|
|
<a href="/">Home</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<h2>{{.Username}}'s list</h2>
|
|
<form method="post" action="/{{.UserReference}}/update_claim" autocomplete="off">
|
|
<input type="submit" value="Update">
|
|
<ul>
|
|
{{range .Gifts}}
|
|
<li>
|
|
{{if eq .ClaimantId $.CurrentUserId}}
|
|
<label>
|
|
<input type="checkbox" name="unclaim" value="{{.Id}}">
|
|
{{.Name}}
|
|
</label>
|
|
<span style="color: blue;">Claimed by you</span>
|
|
{{else}}
|
|
{{if .ClaimantId}}
|
|
<label>
|
|
<input type="checkbox" disabled>
|
|
{{.Name}}
|
|
</label>
|
|
<span style="color: red;">Claimed by {{.ClaimantName}}</span>
|
|
{{else}}
|
|
<label>
|
|
<input type="checkbox" name="claim" value="{{.Id}}">
|
|
{{.Name}}
|
|
</label>
|
|
{{end}}
|
|
{{end}}
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
</form>
|
|
{{end}}
|