summaryrefslogtreecommitdiff
path: root/program/templates/week_schedule_timeslot.html
blob: 693f5f919fd99dfd9ab73f7402ea53b698158357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{% load timeslots %}

{% if forloop.first and timeslot.start != timeslot.get_previous_by_start.end %}
    <div class="timeslot bf-{{ default_show.broadcastformat.slug }}" style="height: {% height_until timeslot.start %}px;">
        <div>{{ default_show.name }}</div>
    </div>
{% endif %}

{% if forloop.first and timeslot.start != "06:00" and timeslot.show == default_show %}
    <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" style="height: {% height_until timeslot.end %}px;">
        <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
    </div>
{% endif %}

{% if forloop.first and timeslot.start != "06:00" and timeslot.show != default_show %}
    {% if timeslot.end.hour > timeslot.start.hour %}
    <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" style="height: {% height timeslot.start timeslot.end %}px;">
        <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
    </div>
    {% else %}
    <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" style="height: {% height_until timeslot.end %}px;">
        <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
    </div>
    {% endif %}
{% endif %}

{% if not forloop.first and not forloop.last %}
    <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" style="height: {% height timeslot.start timeslot.end %}px;">
        {% if timeslot.show == default_show %}
        <div>{{ default_show.name }}</div>
        {% else %}
        <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
        {% endif %}
    </div>
    {% if timeslot.end != timeslot.get_next_by_start.start %}
        <div class="timeslot bf-{{ default_show.broadcastformat.slug }}" style="height: {% height timeslot.end timeslot.get_next_by_start.start %}px;">
            <div>{{ default_show.name }}</div>
        </div>
    {% endif %}
{% endif %}

{% if forloop.last and timeslot.end != "06:00" and timeslot.show == default_show %}
    <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" style="height: {% height_since timeslot.start %}px;">
        <div>{{ default_show.name }}</div>
    </div>
{% endif %}

{% if forloop.last and timeslot.end != "06:00" and timeslot.show != default_show %}
    {% if timeslot.end.hour <  timeslot.start.hour %}
    <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" style="height: {% height_since timeslot.start %}px;">
        <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
    </div>
    {% else %}
    <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" style="height: {% height timeslot.start timeslot.end %}px;">
        <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
    </div>
    {% endif %}
{% endif %}

{% if forloop.last and timeslot.end != timeslot.get_next_by_start.start %}
    <div class="timeslot bf-{{ default_show.broadcastformat.slug }}" style="height: {% height_since timeslot.end %}px;">
        <div>{{ default_show.name }}</div>
    </div>
{% endif %}