summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2021-03-03 13:03:05 (GMT)
committerChristian Pointner <equinox@helsinki.at>2021-03-03 13:03:05 (GMT)
commit255b58b8b47f4fc12c634d5b3098538b2ab250b3 (patch)
tree668736b948cf3b59852a99a2688eca8318023d3e /program
parent82cd389025255354027134a7ba0dd2f41faa8fdc (diff)
parenta0ee1c483fe320e9b6b719a2ce103954f5b00e92 (diff)
Merge branch 'new-homepage' into stable
Diffstat (limited to 'program')
-rw-r--r--program/templates/v2/current_show.html56
-rw-r--r--program/templates/v2/day_schedule.html10
-rw-r--r--program/templates/v2/filters/broadcastformat.html2
-rw-r--r--program/templates/v2/filters/language.html2
-rw-r--r--program/templates/v2/filters/musicfocus.html2
-rw-r--r--program/templates/v2/filters/showinformation.html2
-rw-r--r--program/templates/v2/filters/showtopic.html2
-rw-r--r--program/templates/v2/recommendation.html28
-rw-r--r--program/templates/v2/show_list.html17
-rw-r--r--program/urls.py2
-rw-r--r--program/views.py22
11 files changed, 13 insertions, 132 deletions
diff --git a/program/templates/v2/current_show.html b/program/templates/v2/current_show.html
deleted file mode 100644
index ab5f843..0000000
--- a/program/templates/v2/current_show.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!doctype html>
-<html>
-<head>
- <meta charset="utf-8"/>
- <title>Current program box</title>
-</head>
-<body>
- <ul>
-{% if previous_timeslot %}
- <li id="previous" class="bf-{{ previous_timeslot.show.broadcastformat.slug }}">
- <div class="time">{{ previous_timeslot.start|date:"H:i" }}</div>
- <div class="show-name">
- <a href="{% url "timeslot-detail-v2" previous_timeslot.id %}">{{ previous_timeslot.show.name }}</a>
- </div>
- <div class="show-content">
- </div>
- </li>
-{% endif %}
-{% if current_timeslot %}
- <li id="current" class="bf-{{ current_timeslot.show.broadcastformat.slug }}">
- <div class="time">{{ current_timeslot.start|date:"H:i" }}</div>
- <div class="show-name">
- <a href="{% url "timeslot-detail-v2" current_timeslot.id %}">{{ current_timeslot.show.name }}</a>
- </div>
- <div class="show-content">
-{% if current_timeslot.note %}
- {{ current_timeslot.note.title }}
-{% else %}
- {{ current_timeslot.show.short_description }}
-{% endif %}
- </div>
- </li>
-{% endif %}
-{% if next_timeslot %}
- <li id="next" class="bf-{{ next_timeslot.show.broadcastformat.slug }}">
- <div class="time">{{ next_timeslot.start|date:"H:i" }}</div>
- <div class="show-name">
- <a href="{% url "timeslot-detail-v2" next_timeslot.id %}">{{ next_timeslot.show.name }}</a>
- </div>
- <div class="show-content">
- </div>
- </li>
-{% endif %}
-{% if after_next_timeslot %}
- <li id="after_next" class="bf-{{ after_next_timeslot.show.broadcastformat.slug }}">
- <div class="timer">{{ after_next_timeslot.start|date:"H:i" }}</div>
- <div class="show-name">
- <a href="{% url "timeslot-detail-v2" after_next_timeslot.id %}">{{ after_next_timeslot.show.name }}</a>
- </div>
- <div class="show-content">
- </div>
- </li>
-{% endif %}
- </ul>
-</body>
-</html>
diff --git a/program/templates/v2/day_schedule.html b/program/templates/v2/day_schedule.html
index 4a36bdb..a4e1bde 100644
--- a/program/templates/v2/day_schedule.html
+++ b/program/templates/v2/day_schedule.html
@@ -5,14 +5,8 @@
<body>
{% load filters %}
-<div id="filter-format">
- {% broadcastformatV2 %}
-</div>
-
-<div id="filter-topic">
- <dl id="filter-header" class="portlet">
- <dt class="portletHeader"><span>Filter</span></dt>
- </dl>
+<div id="filter">
+{% broadcastformatV2 %}
{% musicfocusV2 %}
{% showinformationV2 %}
{% showtopicV2 %}
diff --git a/program/templates/v2/filters/broadcastformat.html b/program/templates/v2/filters/broadcastformat.html
index 922c99c..4081323 100644
--- a/program/templates/v2/filters/broadcastformat.html
+++ b/program/templates/v2/filters/broadcastformat.html
@@ -1,6 +1,6 @@
{% if broadcastformat_list %}
<ul id="filter_broadcastformat">
{% for bf in broadcastformat_list %}
- <li><a title="Sendungen mit dem Sendungsformat {{ bf.format }} anzeigen." href="?broadcastformat={{ bf.slug }}">{{ bf.format }}</a></li>{% endfor %}
+ <li><a title="Sendungen mit dem Sendungsformat {{ bf.format }} anzeigen." class="bf-{{ bf.slug }}" href="?broadcastformat={{ bf.slug }}">{{ bf.format }}</a></li>{% endfor %}
</ul>
{% endif %}
diff --git a/program/templates/v2/filters/language.html b/program/templates/v2/filters/language.html
index c79122f..75a2d89 100644
--- a/program/templates/v2/filters/language.html
+++ b/program/templates/v2/filters/language.html
@@ -1,6 +1,6 @@
{% if language_list %}
<ul id="filter_language">
{% for language in language_list %}
- <li><a title="Sendungen auf {{ language.name }} anzeigen." href="?language={{ language.slug }}">{{ language.name }}/{{ language.native_name }}</a></li>{% endfor %}
+ <li><a title="Sendungen auf {{ language.name }} anzeigen." class="lang-{{ language.slug }}" href="?language={{ language.slug }}">{{ language.name }}/{{ language.native_name }}</a></li>{% endfor %}
</ul>
{% endif %}
diff --git a/program/templates/v2/filters/musicfocus.html b/program/templates/v2/filters/musicfocus.html
index 99bbb20..b2897e2 100644
--- a/program/templates/v2/filters/musicfocus.html
+++ b/program/templates/v2/filters/musicfocus.html
@@ -1,6 +1,6 @@
{% if musicfocus_list %}
<ul id="filter_musicfocus">
{% for mf in musicfocus_list %}
- <li><a title="Sendungen mit der Musiktendenz {{ mf.focus }} anzeigen." class="abbrev mf-{{ mf.abbrev }}" href="?musicfocus={{ mf.slug }}">{{ mf.focus }}</a></li>{% endfor %}
+ <li><a title="Sendungen mit der Musiktendenz {{ mf.focus }} anzeigen." class="mf-{{ mf.abbrev }}" href="?musicfocus={{ mf.slug }}">{{ mf.focus }}</a></li>{% endfor %}
</ul>
{% endif %}
diff --git a/program/templates/v2/filters/showinformation.html b/program/templates/v2/filters/showinformation.html
index bcd6cb1..75c5c78 100644
--- a/program/templates/v2/filters/showinformation.html
+++ b/program/templates/v2/filters/showinformation.html
@@ -1,6 +1,6 @@
{% if showinformation_list %}
<ul id="filter_showinformation">
{% for si in showinformation_list %}
- <li><a title="Sendungen mit der Information {{ si.information }} anzeigen." href="?showinformation={{ si.slug }}">{{ si.information }}</a></li>{% endfor %}
+ <li><a title="Sendungen mit der Information {{ si.information }} anzeigen." class="si-{{ si.abbrev }}" href="?showinformation={{ si.slug }}">{{ si.information }}</a></li>{% endfor %}
</ul>
{% endif %}
diff --git a/program/templates/v2/filters/showtopic.html b/program/templates/v2/filters/showtopic.html
index 070d82a..6ecdb34 100644
--- a/program/templates/v2/filters/showtopic.html
+++ b/program/templates/v2/filters/showtopic.html
@@ -1,6 +1,6 @@
{% if showtopic_list %}
<ul id="filter_showtopic">
{% for showtopic in showtopic_list %}
- <li><a title="Sendungen mit dem Schwerpunkt {{ showtopic.topic }} anzeigen." href="?showtopic={{ showtopic.slug }}">{{ showtopic.topic }}</a></li>{% endfor %}
+ <li><a title="Sendungen mit dem Schwerpunkt {{ showtopic.topic }} anzeigen." class="st-{{ showtopic.abbrev }}" href="?showtopic={{ showtopic.slug }}">{{ showtopic.topic }}</a></li>{% endfor %}
</ul>
{% endif %}
diff --git a/program/templates/v2/recommendation.html b/program/templates/v2/recommendation.html
deleted file mode 100644
index 3dfeed2..0000000
--- a/program/templates/v2/recommendation.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!doctype html>
-<html>
-<head>
- <meta charset="utf-8"/>
- <title>Recomendations box</title>
-</head>
-<body>
- <ul>
-{% for recommendation in recommendation_list %}
- <li class="bf-{{ recommendation.show.broadcastformat.slug }}">
- <div class="time">{{ recommendation.start|date:"d.m. H:i" }} - {{ recommendation.end|date:"H:i" }}</td>
- <div class="show-name">
- <a href="{% url "timeslot-detail-v2" recommendation.id %}">{{ recommendation.show.name }}</a>
- </div>
- <div class="show-content">
-{% if recommendation.note %}
- {{ recommendation.note.title }}
-{% else %}
- {{ recommendation.show.short_description }}
-{% endif %}
- <br/>
- <a href="{% url "timeslot-detail-v2" recommendation.id %}">[weiter]</a>
- </div>
- </li>
-{% endfor %}
- </ul>
-</body>
-</html>
diff --git a/program/templates/v2/show_list.html b/program/templates/v2/show_list.html
index 50cae57..c4d123b 100644
--- a/program/templates/v2/show_list.html
+++ b/program/templates/v2/show_list.html
@@ -5,17 +5,12 @@
<body>
{% load filters %}
-<div id="filter-format">
- {% broadcastformatV2 %}
-</div>
-<div id="filter-topic">
- <dl id="filter-header" class="portlet">
- <dt class="portletHeader"><span>Filter</span></dt>
- </dl>
- {% musicfocusV2 %}
- {% showinformationV2 %}
- {% showtopicV2 %}
- {% languageV2 %}
+<div id="filter">
+{% broadcastformatV2 %}
+{% musicfocusV2 %}
+{% showinformationV2 %}
+{% showtopicV2 %}
+{% languageV2 %}
</div>
<div id="content-main" class="show-list">
diff --git a/program/urls.py b/program/urls.py
index 378faf1..0abce53 100644
--- a/program/urls.py
+++ b/program/urls.py
@@ -25,11 +25,9 @@ urlpatterns = patterns('',
# V2 Patterns for new Homepage 2021
url(r'^v2/today/?$', views.DayScheduleViewV2.as_view()),
url(r'^v2/(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/?$', views.DayScheduleViewV2.as_view()),
- url(r'^v2/current_box/?$', cache_page(60)(views.CurrentShowBoxViewV2.as_view())),
url(r'^v2/hosts/?$', views.HostListViewV2.as_view()),
url(r'^v2/hosts/(?P<pk>\d+)/?$', views.HostDetailViewV2.as_view(), name='host-detail-v2'),
url(r'^v2/tips/?$', views.RecommendationsListViewV2.as_view()),
- url(r'^v2/tips_box/?$', views.RecommendationsBoxViewV2.as_view()),
url(r'^v2/shows/?$', views.ShowListViewV2.as_view()),
url(r'^v2/shows/(?P<slug>[\w-]+)/?$', views.ShowDetailViewV2.as_view(), name='show-detail-v2'),
url(r'^v2/(?P<pk>\d+)/?$', views.TimeSlotDetailViewV2.as_view(), name='timeslot-detail-v2'),
diff --git a/program/views.py b/program/views.py
index 2a7609c..61a6207 100644
--- a/program/views.py
+++ b/program/views.py
@@ -259,28 +259,6 @@ class RecommendationsListViewV2(ListView):
start__range=(now, end))).order_by('start')[:20]
-class RecommendationsBoxViewV2(RecommendationsListViewV2):
- template_name = 'v2/recommendation.html'
-
-
-class CurrentShowBoxViewV2(TemplateView):
- context_object_name = 'recommendation_list'
- template_name = 'v2/current_show.html'
-
- def get_context_data(self, **kwargs):
- current_timeslot = TimeSlot.objects.get_or_create_current()
- previous_timeslot = current_timeslot.get_previous_by_start()
- next_timeslot = current_timeslot.get_next_by_start()
- after_next_timeslot = next_timeslot.get_next_by_start()
-
- context = super(CurrentShowBoxViewV2, self).get_context_data(**kwargs)
- context['current_timeslot'] = current_timeslot
- context['previous_timeslot'] = previous_timeslot
- context['next_timeslot'] = next_timeslot
- context['after_next_timeslot'] = after_next_timeslot
- return context
-
-
class DayScheduleViewV2(TemplateView):
template_name = 'v2/day_schedule.html'