summaryrefslogtreecommitdiff
path: root/program/templates/week_schedule_timeslot.html
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-04-15 18:41:03 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-04-15 18:41:03 (GMT)
commit17f110df8c14ea258d9227d08471a4a82bfa4657 (patch)
treef2aaf3e4bbf132fa3d0fbbbafca88a420f8225a7 /program/templates/week_schedule_timeslot.html
parent1d521e1c65babb8412b4959bd476596e0aa36aa6 (diff)
parent179a462bf561dc0cb4d19133e7e3684055278296 (diff)
merged master into stable after new deployment
Diffstat (limited to 'program/templates/week_schedule_timeslot.html')
-rw-r--r--program/templates/week_schedule_timeslot.html81
1 files changed, 42 insertions, 39 deletions
diff --git a/program/templates/week_schedule_timeslot.html b/program/templates/week_schedule_timeslot.html
index f1f6918..8942327 100644
--- a/program/templates/week_schedule_timeslot.html
+++ b/program/templates/week_schedule_timeslot.html
@@ -1,51 +1,54 @@
{% load timeslots %}
-{% if forloop.first %}
- {% if timeslot.start.hour < 6 %}
- {# the day starts with the first show until its end #}
- <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" {% duration_until timeslot.end %}>
- <div><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div>
- </div>
- {% else %}
- {# the day starts with a default show until the start of first show #}
- <div class="timeslot bf-{{ default_show.broadcastformat.slug }}" {% duration_until timeslot.start %}>
- <div>{{ default_show.name }}</div>
- </div>
- <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" {% duration timeslot.start timeslot.end %}>
- <div><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div>
- </div>
- {% endif %}
- {% if timeslot.end != timeslot.get_next_by_start.start %}
- {# a default show is needed to fill the time until the next show #}
- <div class="timeslot bf-{{ default_show.broadcastformat.slug }}" {% duration timeslot.end timeslot.get_next_by_start.start %}>
- <div>{{ default_show.name }}</div>
- </div>
- {% endif %}
-{% elif forloop.last %}
- {% if timeslot.end.hour < 6 %}
- {# the day ends with this show and a default show until 6 #}
- <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" {% duration timeslot.start timeslot.end %}>
- <div><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div>
- </div>
- <div class="timeslot bf-{{ default_show.broadcastformat.slug }}" {% duration_since timeslot.end %}>
- <div>{{ default_show.name }}</div>
- </div>
- {% else %}
- {# the days ends with this show #}
- <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" {% duration_since timeslot.start %}>
- <div><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div>
- </div>
- {% endif %}
-{% else %}
+{% if forloop.first and timeslot.start != timeslot.get_previous_by_start.end %}
+ <div class="timeslot bf-{{ default_show.broadcastformat.slug }}" {% duration_until timeslot.start %}>
+ <div>{{ default_show.name }}</div>
+ </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 }}" {% duration timeslot.start timeslot.end %}>
- <div><a href="{% url timeslot-detail timeslot.id %}">{{ timeslot.show.name }}</a></div>
+ <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 }}" {% duration_until timeslot.end %}>
+ <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 }}" {% duration timeslot.start timeslot.end %}>
+ <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
+ </div>
+{% endif %}
+
+{% if not forloop.first and not forloop.last %}
+ <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" {% duration timeslot.start timeslot.end %}>
+ <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
</div>
{% if timeslot.end != timeslot.get_next_by_start.start %}
- {# a default show is needed to fill the time until the next show #}
<div class="timeslot bf-{{ default_show.broadcastformat.slug }}" {% duration timeslot.end timeslot.get_next_by_start.start %}>
<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 }}" {% duration_since timeslot.start %}>
+ <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
+ </div>
+{% endif %}
+{% if forloop.last and timeslot.end != "06:00" and timeslot.show != default_show %}
+ <div class="timeslot bf-{{ timeslot.show.broadcastformat.slug }}" {% duration timeslot.start timeslot.end %}>
+ <div><a href="{% url "timeslot-detail" timeslot.id %}">{{ timeslot.show.name }}</a></div>
+ </div>
+{% endif %}
+
+{% if forloop.last and timeslot.end != timeslot.get_next_by_start.start %}
+ <div class="timeslot bf-{{ default_show.broadcastformat.slug }}" {% duration_since timeslot.end %}>
+ <div>{{ default_show.name }}</div>
+ </div>
+{% endif %}