Compare commits

..

No commits in common. "14755df86bc2ac97e42082777d3386b6252a6704" and "68ff2ae8adc02a8ed557e94aba32a3b49f542b80" have entirely different histories.

7 changed files with 9 additions and 20 deletions

View file

@ -14,7 +14,7 @@
{% include "statement/statement_table.html" %}
<h3>{% translate "Transactions" %}</h3>
{% include "transaction/transaction_table.html" %}
{% if history %}
{% if history.data %}
<h3>{% translate "History" %}</h3>
{% include "history/plot.html" %}
{% endif %}

View file

@ -30,6 +30,6 @@ urlpatterns = [
path(
"<account>/history/<int:year>/<int:month>",
TransactionMonthView.as_view(),
name="account_transaction_month",
name="transaction_month",
),
]

View file

@ -23,7 +23,7 @@
<th scope="row" class="l">
{% if cat.category %}
{% if month %}
<a href="{% url "category_transaction_month" cat.category month.year month.month %}">{{ cat.category__name }}</a>
<a href="{% url "transaction_month" cat.category month.year month.month %}">{{ cat.category__name }}</a>
{% else %}
{{ cat.category__name }}
{% endif %}

View file

@ -15,6 +15,6 @@ urlpatterns = [
path(
"<category>/history/<int:year>/<int:month>",
TransactionMonthView.as_view(),
name="category_transaction_month",
name="transaction_month",
),
]

View file

@ -29,9 +29,9 @@
<th class="date" scope="row">
{% if date.has_transactions %}
{% if account %}
<a href="{% url "account_transaction_month" account=account.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
<a href="{% url "transaction_month" account=account.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
{% elif category %}
<a href="{% url "category_transaction_month" category=category.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
<a href="{% url "transaction_month" category=category.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
{% else %}
<a href="{% url "transaction_month" year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
{% endif %}

View file

@ -9,14 +9,8 @@
{% endif %}
{% if month %}
<p class="pagination">
{% with month=previous_month %}
{% include "main/pagination_month.html" %}
{% endwith %}
{% with cur=True %}
{% include "main/pagination_month.html" %}
{% endwith %}
{% with month=next_month %}
{% include "main/pagination_month.html" %}
{% endwith %}
<a href="{% url "transaction_month" previous_month|date:"Y" previous_month|date:"m" %}">{{ previous_month|date:"F Y"|capfirst }}</a>
<a href="" class="cur">{{ month|date:"F Y"|capfirst }}</a>
<a href="{% url "transaction_month" next_month|date:"Y" next_month|date:"m" %}">{{ next_month|date:"F Y"|capfirst }}</a>
</p>
{% endif %}

View file

@ -1,5 +0,0 @@
{% load i18n %}
{% if month %}
<a {% if cur %}class="cur"{% endif %}
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 }}</a>
{% endif %}