14 lines
1.3 KiB
HTML
14 lines
1.3 KiB
HTML
{% load i18n %}
|
|
{% now "Y" as today_year %}
|
|
{% now "m" as today_month %}
|
|
{% now "j" as today_day %}
|
|
{% now "Ymj" as today %}
|
|
{% if not no_today %}
|
|
<a {% if active == 'day' and view.date|date:"Ymj" == today %}class="active"{% endif%} href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=today_year month=today_month day=today_day %}">{% trans 'Today' %}</a>
|
|
{% endif %}
|
|
<span class="buttons-group">
|
|
<a {% if active == 'day' %}class="active"{% endif%} href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=view.date|date:"Y"|default:today_year|default:today_year month=view.date|date:"m"|default:today_month day=view.date|date:"d"|default:today_day %}">{% trans 'Day' %}</a>
|
|
<a {% if active == 'week' %}class="active"{% endif%} href="{% url 'chrono-manager-resource-week-view' pk=resource.pk year=view.date|date:"Y"|default:today_year|default:today_year month=view.date|date:"m"|default:today_month day=view.date|date:"d"|default:today_day %}">{% trans 'Week' %}</a>
|
|
<a {% if active == 'month' %}class="active"{% endif%} href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=view.date|date:"Y"|default:today_year|default:today_year month=view.date|date:"m"|default:today_month day=view.date|date:"d"|default:today_day %}">{% trans 'Month' %}</a>
|
|
</span>
|