Skip to content
Snippets Groups Projects
Verified Commit b9adbe8e authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Move week select to own template

parent 6e2d0e91
No related branches found
No related tags found
1 merge request!47Advanced data in timetable views
{% load i18n %}
<div class="col s12 m6 right">
<div class="col s2 no-print">
<a class="waves-effect waves-teal btn-flat btn-flat-medium right" href="{{ url_prev }}">
<i class="material-icons center">navigate_before</i>
</a>
</div>
<div class="input-field col s8 no-margin hide-on-med-and-up">
<select id="calendar-week-1">
{% for week in weeks %}
<option value="{{ week.week }}" {% if week == wanted_week %}
selected {% endif %}>{% trans "CW" %} {{ week.week }} ({{ week.0|date:"SHORT_DATE_FORMAT" }}–{{ week.6|date:"SHORT_DATE_FORMAT" }})
</option>
{% endfor %}
</select>
</div>
<div class="input-field col s8 no-margin hide-on-med-and-down">
<select id="calendar-week-2">
{% for week in weeks %}
<option value="{{ week.week }}" {% if week == wanted_week %}
selected {% endif %}>{% trans "CW" %} {{ week.week }} ({{ week.0|date:"j.n." }}–{{ week.6|date:"SHORT_DATE_FORMAT" }})
</option>
{% endfor %}
</select>
</div>
<div class="input-field col s8 no-margin hide-on-small-and-down hide-on-large-only">
<select id="calendar-week-3">
{% for week in weeks %}
<option value="{{ week.week }}" {% if week == wanted_week %}
selected {% endif %}>{% trans "CW" %} {{ week.week }} ({{ week.0|date:"j.n." }}–{{ week.6|date:"j.n." }})
</option>
{% endfor %}
</select>
</div>
<div class="col s2 no-print">
<a class="waves-effect waves-teal btn-flat btn-flat-medium left" href="{{ url_next }}">
<i class="material-icons center">navigate_next</i>
</a>
</div>
</div>
...@@ -57,54 +57,7 @@ ...@@ -57,54 +57,7 @@
</div> </div>
{# Week select #} {# Week select #}
<div class="col s12 m6 right"> {% include "chronos/partials/week_select.html" with wanted_week=week %}
<div class="col s2 no-print">
<a class="waves-effect waves-teal btn-flat btn-flat-medium right" href="{{ url_prev }}">
<i class="material-icons center">navigate_before</i>
</a>
</div>
{% with wanted_week=week %}
<div class="input-field col s8 no-margin hide-on-med-and-up">
<select id="calendar-week-1">
{% for week in weeks %}
<option value="{{ week.week }}" {% if week == wanted_week %}
selected {% endif %}>{% trans "CW" %} {{ week.week }}
({{ week.0|date:"SHORT_DATE_FORMAT" }}–{{ week.6|date:"SHORT_DATE_FORMAT" }})
</option>
{% endfor %}
</select>
</div>
<div class="input-field col s8 no-margin hide-on-med-and-down">
<select id="calendar-week-2">
{% for week in weeks %}
<option value="{{ week.week }}" {% if week == wanted_week %}
selected {% endif %}>{% trans "CW" %} {{ week.week }}
({{ week.0|date:"j.n" }}–{{ week.6|date:"SHORT_DATE_FORMAT" }})
</option>
{% endfor %}
</select>
</div>
<div class="input-field col s8 no-margin hide-on-small-and-down hide-on-large-only">
<select id="calendar-week-3">
{% for week in weeks %}
<option value="{{ week.week }}" {% if week == wanted_week %}
selected {% endif %}>{% trans "CW" %} {{ week.week }}
({{ week.0|date:"j.n" }}–{{ week.6|date:"j.n" }})
</option>
{% endfor %}
</select>
</div>
{% endwith %}
<div class="col s2 no-print">
<a class="waves-effect waves-teal btn-flat btn-flat-medium left" href="{{ url_next }}">
<i class="material-icons center">navigate_next</i>
</a>
</div>
</div>
{% else %} {% else %}
{# Show if regular #} {# Show if regular #}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment