Add date-nav to bottom

Only if date has any events (otherwise no scrolling is necessary)

Fixes #229
This commit is contained in:
Ohad Lutzky 2021-08-11 21:07:06 +01:00 committed by Christopher Charbonneau Wells
parent 5bc98bd7f0
commit 3922966815
1 changed files with 15 additions and 0 deletions

View File

@ -82,6 +82,21 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
<h3 class="text-center">
{% if date_previous %}
<a class="btn btn-sm btn-default" href="?date={{ date_previous|date:"Y-m-d" }}" aria-label="{% trans "Previous" %}">
<i class="icon icon-chevron-left" aria-hidden="true"></i>
<span class="sr-only">{% trans "Previous" %}</span>
</a>
{% endif %}
{{ date|date }}
{% if date_next %}
<a class="btn btn-sm btn-default" href="?date={{ date_next|date:"Y-m-d" }}" aria-label="{% trans "Next" %}">
<i class="icon icon-chevron-right" aria-hidden="true"></i>
<span class="sr-only">{% trans "Next" %}</span>
</a>
{% endif %}
</h3>
{% else %} {% else %}
<div class="text-center">No events</div> <div class="text-center">No events</div>
{% endif %} {% endif %}