Update pagination on montharchive to keep category
This commit is contained in:
parent
68ff2ae8ad
commit
a0bc1a6608
2 changed files with 14 additions and 3 deletions
|
@ -9,8 +9,14 @@
|
|||
{% endif %}
|
||||
{% if month %}
|
||||
<p class="pagination">
|
||||
<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>
|
||||
{% 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 %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
|
5
nummi/main/templates/main/pagination_month.html
Normal file
5
nummi/main/templates/main/pagination_month.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% load i18n %}
|
||||
{% if month %}
|
||||
<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>
|
||||
{% endif %}
|
Loading…
Reference in a new issue