summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorErnesto Rico Schmidt <ernesto@ontolabs.com>2020-09-09 22:12:24 (GMT)
committerChristian Pointner <equinox@helsinki.at>2020-09-12 14:32:17 (GMT)
commita5913f48176214eaf9a5c6a851701e57a2d9609d (patch)
tree5ea89876eb840031d29e449e881f5ad79a210ba5 /program
parent943ce9db0959edee22dcdc6f613421862e345216 (diff)
Fix week schedule, remove dead code
Diffstat (limited to 'program')
-rw-r--r--program/templates/week_schedule_timeslot.html29
1 files changed, 16 insertions, 13 deletions
diff --git a/program/templates/week_schedule_timeslot.html b/program/templates/week_schedule_timeslot.html
index 532f750..693f5f9 100644
--- a/program/templates/week_schedule_timeslot.html
+++ b/program/templates/week_schedule_timeslot.html
@@ -6,12 +6,6 @@
</div>
{% endif %}
-{% if forloop.first and timeslot.start == timeslot.get_next_by_start.end and timeslot.start != "06:00" %}
- <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 %}
-
{% 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>
@@ -19,21 +13,24 @@
{% 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>
-{% endif %}
-
-{% if forloop.first and 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>
+ {% 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;">
@@ -44,14 +41,20 @@
{% 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><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
+ <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 %}