Add ability to select month for budget

This commit is contained in:
2021-12-07 13:40:24 +00:00
parent 53c51ceb8d
commit 646560267a
2 changed files with 14 additions and 5 deletions

View File

@ -1,7 +1,9 @@
{{template "base" .}}
{{define "title"}}Budget{{end}}
{{define "title"}}
{{printf "Budget for %s %d" .Date.Month .Date.Year}}
{{end}}
{{define "new"}}
{{template "transaction-new"}}
@ -13,8 +15,8 @@
<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>
<a href="{{printf "/budget/%s/%d/%d" .Budget.ID .Previous.Year .Previous.Month}}">Previous Month</a>
<a href="{{printf "/budget/%s/%d/%d" .Budget.ID .Next.Year .Next.Month}}">Next Month</a>
</div>
<table class="container col-lg-12" id="content">
{{range .Categories}}