summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBenedict Börger <benedict@0xb8000.de>2019-04-27 22:03:20 +0200
committerBenedict Börger <benedict@0xb8000.de>2019-04-27 22:03:20 +0200
commit36716cf5a971811019280614f8d6ea68c91cdba8 (patch)
tree94666c35227f9b85c6486a3fc827b08fb0b8b835 /templates
parentef11513f9385b3fb6b52eb90cf873a17f2a1d90b (diff)
[web_frontend] adapt URLs to be ablte to address spefic accounts
Diffstat (limited to 'templates')
-rw-r--r--templates/asset.html.tera2
-rw-r--r--templates/chart.html.tera8
-rw-r--r--templates/transaction.html.tera9
3 files changed, 9 insertions, 10 deletions
diff --git a/templates/asset.html.tera b/templates/asset.html.tera
index bd0e5b9..9e768d7 100644
--- a/templates/asset.html.tera
+++ b/templates/asset.html.tera
@@ -57,7 +57,7 @@
{% set amount_sum = 0 %}
{% for account in accounts %}
<tr>
- <td>{{ account.name }}</td>
+ <td><a href="/transactions/{{ account.name }}">{{ account.name }}</a></td>
<td>{{ account.category }}</td>
{% if account.balance >= 0 %}
<td class="text-success">{{ account.balance | round(method="common", precision=2)}}</td>
diff --git a/templates/chart.html.tera b/templates/chart.html.tera
index 64cb9b3..50adbef 100644
--- a/templates/chart.html.tera
+++ b/templates/chart.html.tera
@@ -44,9 +44,9 @@
{{ account_name }}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
- <a class="dropdown-item" href="/transactions">All Transactions</a>
- <a class="dropdown-item" href="/chart">Spending chart</a>
- <a class="dropdown-item" href="/balance">Balance</a>
+ <a class="dropdown-item" href="/transactions/{{ account_name }}">All Transactions</a>
+ <a class="dropdown-item" href="/chart/{{ account_name }}">Spending chart</a>
+ <a class="dropdown-item" href="/balance/{{ account_name }}">Balance</a>
</div>
</li>
<li class="nav-item dropdown active">
@@ -68,7 +68,7 @@
<div class="container">
<h1>Spending Chart <small class="text-muted">{{ account_name }}</small></h1>
<div style="text-align:center; margin: auto; width:100%">
- <form method="get" action="/chart"><input type="month" id="start" name="start" value="{{ date_start }}"> to <input type="month" id="end" name="end" value="{{ date_end }}">
+ <form method="get" action="/chart/{{ account_name }}"><input type="month" id="start" name="start" value="{{ date_start }}"> to <input type="month" id="end" name="end" value="{{ date_end }}">
<input type="submit" value="Show" class="btn btn-light">
</form>
</div>
diff --git a/templates/transaction.html.tera b/templates/transaction.html.tera
index a0f258f..b36b12a 100644
--- a/templates/transaction.html.tera
+++ b/templates/transaction.html.tera
@@ -22,9 +22,9 @@
{{ account_name }}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
- <a class="dropdown-item" href="/transactions">All Transactions</a>
- <a class="dropdown-item" href="/chart">Spending chart</a>
- <a class="dropdown-item" href="/balance">Balance</a>
+ <a class="dropdown-item" href="/transactions/{{ account_name }}">All Transactions</a>
+ <a class="dropdown-item" href="/chart/{{ account_name }}">Spending chart</a>
+ <a class="dropdown-item" href="/balance/{{account_name }}">Balance</a>
</div>
</li>
<li class="nav-item dropdown active">
@@ -33,7 +33,6 @@
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="/asset">Overview</a>
- <a class="dropdown-item" href="/chart">Girokonto</a>
</div>
</li>
<li class="nav-item">
@@ -45,7 +44,7 @@
<!-- content -->
<div class="container">
<div class="md-form mt-0" style="padding-top: 20px;">
- <form name="filter" method="get" action="/transactions">
+ <form name="filter" method="get" action="/transactions/{{ account_name }}">
{% if filter == "" %}
<input id="filter" name="filter" class="form-control" type="text" placeholder="Filter">
{% else %}