Fix pagination on month archive, keep account
This commit is contained in:
parent
a0bc1a6608
commit
14755df86b
6 changed files with 7 additions and 7 deletions
|
@ -14,7 +14,7 @@
|
||||||
{% include "statement/statement_table.html" %}
|
{% include "statement/statement_table.html" %}
|
||||||
<h3>{% translate "Transactions" %}</h3>
|
<h3>{% translate "Transactions" %}</h3>
|
||||||
{% include "transaction/transaction_table.html" %}
|
{% include "transaction/transaction_table.html" %}
|
||||||
{% if history.data %}
|
{% if history %}
|
||||||
<h3>{% translate "History" %}</h3>
|
<h3>{% translate "History" %}</h3>
|
||||||
{% include "history/plot.html" %}
|
{% include "history/plot.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -30,6 +30,6 @@ urlpatterns = [
|
||||||
path(
|
path(
|
||||||
"<account>/history/<int:year>/<int:month>",
|
"<account>/history/<int:year>/<int:month>",
|
||||||
TransactionMonthView.as_view(),
|
TransactionMonthView.as_view(),
|
||||||
name="transaction_month",
|
name="account_transaction_month",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
<th scope="row" class="l">
|
<th scope="row" class="l">
|
||||||
{% if cat.category %}
|
{% if cat.category %}
|
||||||
{% if month %}
|
{% if month %}
|
||||||
<a href="{% url "transaction_month" cat.category month.year month.month %}">{{ cat.category__name }}</a>
|
<a href="{% url "category_transaction_month" cat.category month.year month.month %}">{{ cat.category__name }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ cat.category__name }}
|
{{ cat.category__name }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -15,6 +15,6 @@ urlpatterns = [
|
||||||
path(
|
path(
|
||||||
"<category>/history/<int:year>/<int:month>",
|
"<category>/history/<int:year>/<int:month>",
|
||||||
TransactionMonthView.as_view(),
|
TransactionMonthView.as_view(),
|
||||||
name="transaction_month",
|
name="category_transaction_month",
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
<th class="date" scope="row">
|
<th class="date" scope="row">
|
||||||
{% if date.has_transactions %}
|
{% if date.has_transactions %}
|
||||||
{% if account %}
|
{% if account %}
|
||||||
<a href="{% url "transaction_month" account=account.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
|
<a href="{% url "account_transaction_month" account=account.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
|
||||||
{% elif category %}
|
{% elif category %}
|
||||||
<a href="{% url "transaction_month" category=category.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
|
<a href="{% url "category_transaction_month" category=category.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{% url "transaction_month" year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
|
<a href="{% url "transaction_month" year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% if month %}
|
{% if month %}
|
||||||
<a {% if cur %}class="cur"{% endif %}
|
<a {% if cur %}class="cur"{% endif %}
|
||||||
href="{% if category %}{% url "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>
|
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 %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue