Get ticket functionality.
This commit is contained in:
53
templates/account/tickets/my_tickets.html
Normal file
53
templates/account/tickets/my_tickets.html
Normal file
@@ -0,0 +1,53 @@
|
||||
{{ 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>
|
||||
{{ .Ball1 }} {{ .Ball2 }} {{ .Ball3 }} {{ .Ball4 }} {{ .Ball5 }}
|
||||
{{ if ne .Ball6 0 }} {{ .Ball6 }} {{ end }}
|
||||
</td>
|
||||
<td>
|
||||
{{ if eq .GameType "Lotto" }}
|
||||
<span style="color: lightgray; font-style: italic;">–</span>
|
||||
{{ else if gt (intVal .Bonus2) 0 }}
|
||||
{{ if gt (intVal .Bonus1) 0 }}{{ intVal .Bonus1 }}, {{ end }}
|
||||
{{ intVal .Bonus2 }}
|
||||
{{ else if gt (intVal .Bonus1) 0 }}
|
||||
{{ intVal .Bonus1 }}
|
||||
{{ 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 }}
|
||||
Reference in New Issue
Block a user