37 lines
1.0 KiB
HTML
37 lines
1.0 KiB
HTML
|
|
{{template "base" .}}
|
|
|
|
{{define "title"}}Budget{{end}}
|
|
|
|
{{define "new"}}
|
|
{{template "transaction-new"}}
|
|
{{end}}
|
|
|
|
{{define "main"}}
|
|
<div class="budget-item">
|
|
<a href="#newtransactionmodal" data-toggle="modal" data-target="#newtransactionmodal">New Transaction</a>
|
|
<span class="time"></span>
|
|
</div>
|
|
<div>
|
|
<a href="/budget/{{.Budget.ID}}/{{.Date.Year}}/{{.Date.Month}}">Next Month</a>
|
|
<a href="/budget/{{.Budget.ID}}/{{.Date.Year}}/{{.Date.Month}}">Previous Month</a>
|
|
</div>
|
|
<table class="container col-lg-12" id="content">
|
|
{{range .Categories}}
|
|
<tr>
|
|
<td>{{.Group}}</td>
|
|
<td>{{.Name}}</td>
|
|
<td>
|
|
</td>
|
|
<td>
|
|
</td>
|
|
<td style="text-align: right;{{if .Balance.GetPositive}}{{else}}color: red;{{end}}">
|
|
{{printf "%.2f" .Balance.GetFloat64}}
|
|
</td>
|
|
<td style="text-align: right;{{if .Activity.GetPositive}}{{else}}color: red;{{end}}">
|
|
{{printf "%.2f" .Activity.GetFloat64}}
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</table>
|
|
{{end}} |