<tr><th></th>{% for d in days %}<thcolspan="{{d.maxcol}}">{{ d.date.strftime("%A (%d.%m.%Y)") }}</th>{% endfor %}</tr>
<tr><th></th>{% for d in days if (d.index <5)or(d.lectures|length)> 0%}<thcolspan="{{d.maxcol}}">{{ d.date.strftime("%A (%d.%m.%Y)") }}</th>{% endfor %}</tr>
{% for t in times %}
{% set time_loop = loop %}
<trheight="10px">
{% if ((loop.index - 1) is divisibleby 4) %} <tdrowspan=4>{{ t }}</td> {% endif %}
{% for d in days %}
<trheight="15px">
{% if ((loop.index - 1) is divisibleby 4) %} <tdrowspan="4"style="vertical-align: top;">{{ t.strftime("%H:%M") }}</td> {% endif %}
{% for d in days if (d.index <5)or(d.lectures|length)> 0 %}
{% for i in range(1,d.maxcol+1) %}
{% for l in d.lectures|selectattr('schedule_col','equalto',i) if (((l.time_asdate.time() > t) and (l.time_asdate.time() <times[time_loop.index+1]))!=(l.time_asdate.time() ==t))%}