Enhance category plot template with improved URL handling for transactions based on year, month, statement, and account

This commit is contained in:
Edgar P. Burkhart 2025-01-05 11:47:40 +01:00
parent e5ae5caf2a
commit d246843be0
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -21,8 +21,14 @@
<tr>
<th scope="row" class="l wi">
{% if cat.category %}
{% if year or month %}
<a href="{% history_url year=year month=month category=cat.category account=account.id %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
{% if year %}
<a href="{% history_url year=year category=cat.category account=account.id %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
{% elif month %}
<a href="{% url_get "transactions" start_date=month end_date=month|end_of_month account=account.id category=cat.category %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
{% elif statement %}
<a href="{% url_get "transactions" account=statement.account.id statement=statement.id category=cat.category %}">{{ cat.category_.icon|remix }}{{ cat.category__name }}</a>
{% elif account %}
<a href="{% url_get "transactions" account=account.id category=cat.category %}">{{ cat.category__icon|remix }}{{ cat.category__name }}</a>
{% else %}
{{ cat.category__icon|remix }}{{ cat.category__name }}
{% endif %}