mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-10 06:42:49 +02:00
@@ -91,6 +91,12 @@ def month_year_picker(request):
|
|||||||
for date in all_months
|
for date in all_months
|
||||||
]
|
]
|
||||||
|
|
||||||
|
today_url = (
|
||||||
|
reverse(url, kwargs={"month": current_date.month, "year": current_date.year})
|
||||||
|
if url
|
||||||
|
else ""
|
||||||
|
)
|
||||||
|
|
||||||
return render(
|
return render(
|
||||||
request,
|
request,
|
||||||
"common/fragments/month_year_picker.html",
|
"common/fragments/month_year_picker.html",
|
||||||
@@ -98,6 +104,7 @@ def month_year_picker(request):
|
|||||||
"month_year_data": result,
|
"month_year_data": result,
|
||||||
"current_month": current_month,
|
"current_month": current_month,
|
||||||
"current_year": current_year,
|
"current_year": current_year,
|
||||||
|
"today_url": today_url,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -48,4 +48,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="w-full text-end">
|
||||||
|
<a class="btn btn-outline-primary btn-sm" href="{{ today_url }}" role="button" hx-boost="true">{% trans 'Today' %}</a>
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user