65 lines
1.8 KiB
HTML
65 lines
1.8 KiB
HTML
{{ define "content" }}
|
||
<a href="/account/tickets/add_ticket">+ Add Ticket</a>
|
||
<h2>My Tickets</h2>
|
||
|
||
{{ if eq (len .Tickets) 0 }}
|
||
<p>You haven’t logged any tickets yet.</p>
|
||
{{ else }}
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Game</th>
|
||
<th>Draw Date</th>
|
||
<th>Numbers</th>
|
||
<th>Bonus</th>
|
||
<th>Purchased</th>
|
||
<th>Via</th>
|
||
<th>Image</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{{ range .Tickets }}
|
||
<tr>
|
||
<td>{{ .GameType }}</td>
|
||
<td>{{ .DrawDate }}</td>
|
||
<td>
|
||
<div class="flex flex-wrap gap-1">
|
||
{{ range .Balls }}
|
||
<div class="ball">{{ . }}</div>
|
||
{{ end }}
|
||
</div>
|
||
|
||
<div style="color: red; font-size: 0.75rem; margin-top: 0.25rem;">
|
||
MatchedMain: {{ .MatchedMain }} | MatchedBonus: {{ .MatchedBonus }}
|
||
</div>
|
||
</td>
|
||
<td>
|
||
{{ if eq .GameType "Lotto" }}
|
||
<span style="color: lightgray; font-style: italic;">–</span>
|
||
{{ else if gt (intVal .Bonus2) 0 }}
|
||
<div class="flex flex-wrap gap-1">
|
||
{{ if gt (intVal .Bonus1) 0 }}
|
||
<div class="ball bonus">{{ intVal .Bonus1 }}</div>
|
||
{{ end }}
|
||
<div class="ball bonus">{{ intVal .Bonus2 }}</div>
|
||
</div>
|
||
{{ else if gt (intVal .Bonus1) 0 }}
|
||
<div class="ball bonus">{{ intVal .Bonus1 }}</div>
|
||
{{ else }}
|
||
<span style="color: lightgray;">–</span>
|
||
{{ end }}
|
||
</td>
|
||
<td>{{ .PurchaseDate }}</td>
|
||
<td>{{ .PurchaseMethod }}</td>
|
||
<td>
|
||
{{ if .ImagePath }}
|
||
<a href="/{{ .ImagePath }}" target="_blank">View</a>
|
||
{{ else }}–{{ end }}
|
||
</td>
|
||
</tr>
|
||
{{ end }}
|
||
</tbody>
|
||
</table>
|
||
{{ end }}
|
||
{{ end }}
|