allowances/templates/index.html

46 lines
2.1 KiB
HTML
Raw Permalink Normal View History

{{ define "title" }}Welcome{{ end }}
{{ define "content" }}
2013-03-05 23:15:25 -08:00
<div class="container">
<table class="table table-striped table-bordered">
2013-03-05 23:15:25 -08:00
<caption>Allowance totals for our children</caption>
</thead>
<tr class="info">
<td>
Name
</td>
<td>
Amount
</td>
</tr>
</thead>
<tbody>
2013-03-08 22:28:24 -08:00
{{ range $name, $money := .children }}
<tr class="child">
2013-03-08 22:28:24 -08:00
<td class="name {{ $name }}">{{ $name }}</td>
<td class="amount">{{ dollarize $money }}</td>
2013-03-05 23:15:25 -08:00
</tr>
<tr class="controls">
2013-03-05 23:31:51 -08:00
<td colspan=2 style="text-align: center;">
2013-03-05 23:15:25 -08:00
<div class="btn-group">
2013-03-08 22:28:24 -08:00
<button class="btn" value="/add/{{ $name}}/100">$1.00</button>
<button class="btn" value="/add/{{ $name}}/25">25&cent;</button>
<button class="btn" value="/add/{{ $name}}/10">10&cent;</button>
<button class="btn" value="/add/{{ $name}}/5">5&cent;</button>
2013-03-09 08:07:05 -08:00
<button class="btn" value="/add/{{ $name}}/1">1&cent;</button>
</div>
<div style="padding-top: 5px;" class="btn-group">
2013-03-09 08:07:05 -08:00
<button class="btn btn-danger" value="/add/{{ $name}}/-100">$1.00</button>
<button class="btn btn-danger" value="/add/{{ $name}}/-25">25&cent;</button>
<button class="btn btn-danger" value="/add/{{ $name}}/-10">10&cent;</button>
<button class="btn btn-danger" value="/add/{{ $name}}/-5">5&cent;</button>
<button class="btn btn-danger" value="/add/{{ $name}}/-1">1&cent;</button>
2013-03-05 23:15:25 -08:00
</div>
</td>
</tr>
{{ end }}
</tbody>
2013-03-05 22:40:17 -08:00
</table>
</div>
{{ end }}