diff --git a/nummi/account/templates/account/account_form.html b/nummi/account/templates/account/account_form.html index 93918d4..7045203 100644 --- a/nummi/account/templates/account/account_form.html +++ b/nummi/account/templates/account/account_form.html @@ -14,7 +14,7 @@ {% include "statement/statement_table.html" %}

{% translate "Transactions" %}

{% include "transaction/transaction_table.html" %} - {% if history.data %} + {% if history %}

{% translate "History" %}

{% include "history/plot.html" %} {% endif %} diff --git a/nummi/account/urls.py b/nummi/account/urls.py index b46816f..e15f4d4 100644 --- a/nummi/account/urls.py +++ b/nummi/account/urls.py @@ -30,6 +30,6 @@ urlpatterns = [ path( "/history//", TransactionMonthView.as_view(), - name="transaction_month", + name="account_transaction_month", ), ] diff --git a/nummi/category/templates/category/category_plot.html b/nummi/category/templates/category/category_plot.html index 33d67fd..91d919e 100644 --- a/nummi/category/templates/category/category_plot.html +++ b/nummi/category/templates/category/category_plot.html @@ -23,7 +23,7 @@ {% if cat.category %} {% if month %} - {{ cat.category__name }} + {{ cat.category__name }} {% else %} {{ cat.category__name }} {% endif %} diff --git a/nummi/category/urls.py b/nummi/category/urls.py index 4809677..5bdc9c1 100644 --- a/nummi/category/urls.py +++ b/nummi/category/urls.py @@ -15,6 +15,6 @@ urlpatterns = [ path( "/history//", TransactionMonthView.as_view(), - name="transaction_month", + name="category_transaction_month", ), ] diff --git a/nummi/history/templates/history/plot.html b/nummi/history/templates/history/plot.html index 16e2b94..e8d7aa0 100644 --- a/nummi/history/templates/history/plot.html +++ b/nummi/history/templates/history/plot.html @@ -29,9 +29,9 @@ {% if date.has_transactions %} {% if account %} - {{ date.month|date:"Y-m" }} + {{ date.month|date:"Y-m" }} {% elif category %} - {{ date.month|date:"Y-m" }} + {{ date.month|date:"Y-m" }} {% else %} {{ date.month|date:"Y-m" }} {% endif %} diff --git a/nummi/main/templates/main/pagination_month.html b/nummi/main/templates/main/pagination_month.html index 019ecf8..207b354 100644 --- a/nummi/main/templates/main/pagination_month.html +++ b/nummi/main/templates/main/pagination_month.html @@ -1,5 +1,5 @@ {% load i18n %} {% if month %} {{ month|date:"F Y"|capfirst }} + href="{% if account %}{% url "account_transaction_month" account.id month|date:"Y" month|date:"m" %}{% elif category %}{% url "category_transaction_month" category.id month|date:"Y" month|date:"m" %}{% else %}{% url "transaction_month" month|date:"Y" month|date:"m" %}{% endif %}">{{ month|date:"F Y"|capfirst }} {% endif %}