summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nop/views.py27
-rw-r--r--program/templates/v2/day_schedule.html8
-rw-r--r--program/templates/v2/host_list.html1
-rw-r--r--program/templates/v2/recommendation_list.html3
-rw-r--r--program/templates/v2/show_detail.html3
-rw-r--r--program/templates/v2/show_list.html2
-rw-r--r--program/templates/v2/timeslot_detail.html9
7 files changed, 31 insertions, 22 deletions
diff --git a/nop/views.py b/nop/views.py
index 1237948..78e39a8 100644
--- a/nop/views.py
+++ b/nop/views.py
@@ -14,6 +14,7 @@ from datetime import datetime
DB = 'nop'
+
class NopForm(forms.Form):
date = forms.DateField(
required=True,
@@ -50,7 +51,7 @@ def _get_show(datetime=None):
else:
timeslot = TimeSlot.objects.get_or_create_current()
except (ObjectDoesNotExist, MultipleObjectsReturned):
- return {'start': None, 'id': None, 'name': None}
+ return {'start': None, 'timeslot-id': None, 'note': None, 'id': None, 'slug': None, 'name': None}
else:
try:
note = timeslot.note
@@ -58,9 +59,11 @@ def _get_show(datetime=None):
note = None
return {'start': _dtstring(timeslot.start.timetuple()),
+ 'timeslot-id': timeslot.id,
+ 'note': note,
'id': timeslot.show.id,
- 'name': timeslot.show.name,
- 'note': note}
+ 'slug': timeslot.show.slug,
+ 'name': timeslot.show.name}
def _current():
@@ -76,8 +79,10 @@ def _current():
title = result.title
album = result.album
- return {'show': show['name'],
- 'start': show['start'],
+ return {'start': show['start'],
+ 'timeslot': show['timeslot-id'],
+ 'show': show['slug'],
+ 'show-title': show['name'],
'artist': artist,
'title': title,
'album': album}
@@ -87,8 +92,10 @@ def _bydate(year=None, month=None, day=None, hour=None, minute=None):
show = _get_show(datetime(year, month, day, hour, minute))
if show['id'] and show['id'] not in settings.MUSIKPROG_IDS:
- return [{'show': show['name'],
- 'start': show['start'],
+ return [{'start': show['start'],
+ 'timeslot': show['timeslot-id'],
+ 'show': show['slug'],
+ 'show-title': show['name'],
'artist': None,
'title': None,
'album': None}]
@@ -96,8 +103,10 @@ def _bydate(year=None, month=None, day=None, hour=None, minute=None):
ts = int(time.mktime((int(year), int(month), int(day), int(hour),
int(minute), 0, 0, 0, -1))) * 1000000
result = _which(ts).objects.using(DB).filter(carttype__exact='pool').filter(timestamp__lt=ts)[:5]
- return [{'show': show['name'],
- 'start': _dtstring(time.localtime(item.timestamp//1000000)),
+ return [{'start': _dtstring(time.localtime(item.timestamp//1000000)),
+ 'timeslot': show['timeslot-id'],
+ 'show': show['slug'],
+ 'show-title': show['name'],
'artist': item.artist,
'title': item.title,
'album': item.album} for item in result]
diff --git a/program/templates/v2/day_schedule.html b/program/templates/v2/day_schedule.html
index e97d5ad..113705d 100644
--- a/program/templates/v2/day_schedule.html
+++ b/program/templates/v2/day_schedule.html
@@ -5,7 +5,7 @@
<body>
<div id="content-main" class="day-schedule">
- <h1 id="date">{{ day|date:"l, d.m.Y" }}</h1>
+ <h1>{{ day|date:"l, d.m.Y" }}</h1>
<div id="timeslots">
{% for timeslot in timeslots %}
@@ -23,7 +23,7 @@
<span title="{{ mf.focus }}" class="category category-mf mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span>
{% endfor %}
{% for lang in default_show.language.all %}
- <span title="{{ lang.name }}/{{ lang.native_name }}" class="catetory category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
+ <span title="{{ lang.name }}/{{ lang.native_name }}" class="category category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
{% endfor %}
</div>
<div class="show-detail">
@@ -45,7 +45,7 @@
<span title="{{ mf.focus }}" class="category category-mf mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span>
{% endfor %}
{% for lang in timeslot.show.language.all %}
- <span title="{{ lang.name }}/{{ lang.native_name }}" class="catetory category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
+ <span title="{{ lang.name }}/{{ lang.native_name }}" class="category category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
{% endfor %}
</div>
<div class="show-detail">
@@ -71,7 +71,7 @@
<span title="{{ mf.focus }}" class="category category-mf mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span>
{% endfor %}
{% for lang in default_show.language.all %}
- <span title="{{ lang.name }}/{{ lang.native_name }}" class="catetory category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
+ <span title="{{ lang.name }}/{{ lang.native_name }}" class="category category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
{% endfor %}
</div>
<div class="show-detail">
diff --git a/program/templates/v2/host_list.html b/program/templates/v2/host_list.html
index b2c1542..b8a4677 100644
--- a/program/templates/v2/host_list.html
+++ b/program/templates/v2/host_list.html
@@ -6,6 +6,7 @@
<div id="content-main" class="host-list">
<h1>Sendungsmachende A-Z</h1>
+
<div id="hosts">
{% for host in host_list %}
<div class="host"><a href="/program/hosts/{{ host.id }}">{{ host.name }}</a></div>
diff --git a/program/templates/v2/recommendation_list.html b/program/templates/v2/recommendation_list.html
index a2b6b54..c98cd72 100644
--- a/program/templates/v2/recommendation_list.html
+++ b/program/templates/v2/recommendation_list.html
@@ -6,6 +6,7 @@
<div id="content-main" class="recommendation-list">
<h1>Programmhinweise</h1>
+
<div id="shows">
{% for recommendation in recommendation_list %}
<div class="show recommendation bf-{{ recommendation.show.broadcastformat.slug }}">
@@ -20,7 +21,7 @@
<span title="{{ mf.focus }}" class="category category-mf mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span>
{% endfor %}
{% for lang in recommendation.show.language.all %}
- <span title="{{ lang.name }}/{{ lang.native_name }}" class="catetory category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
+ <span title="{{ lang.name }}/{{ lang.native_name }}" class="category category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
{% endfor %}
</div>
<div class="show-detail">
diff --git a/program/templates/v2/show_detail.html b/program/templates/v2/show_detail.html
index ded171e..0041cfa 100644
--- a/program/templates/v2/show_detail.html
+++ b/program/templates/v2/show_detail.html
@@ -5,7 +5,6 @@
<body>
<div id="content-main" class="show-detail">
-
<h1>{{ show.name }}</h1>
<div class="show-detail-header bf-{{ show.broadcastformat.slug }}">
@@ -30,7 +29,7 @@
<span title="{{ mf.focus }}" class="category category-mf mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span>
{% endfor %}
{% for lang in show.language.all %}
- <span title="{{ lang.name }}/{{ lang.native_name }}" class="catetory category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
+ <span title="{{ lang.name }}/{{ lang.native_name }}" class="category category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
{% endfor %}
</div>
diff --git a/program/templates/v2/show_list.html b/program/templates/v2/show_list.html
index 466cf77..8455425 100644
--- a/program/templates/v2/show_list.html
+++ b/program/templates/v2/show_list.html
@@ -21,7 +21,7 @@
<span title="{{ mf.focus }}" class="category categor-mf mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span>
{% endfor %}
{% for lang in show.language.all %}
- <span title="{{ lang.name }}/{{ lang.native_name }}" class="catetory category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
+ <span title="{{ lang.name }}/{{ lang.native_name }}" class="category category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
{% endfor %}
</div>
<div class="show-detail">
diff --git a/program/templates/v2/timeslot_detail.html b/program/templates/v2/timeslot_detail.html
index d4ac952..cbb3559 100644
--- a/program/templates/v2/timeslot_detail.html
+++ b/program/templates/v2/timeslot_detail.html
@@ -5,7 +5,6 @@
<body>
<div id="content-main" class="timeslot-detail">
-
<h1><a href="/program/shows/{{ timeslot.show.slug }}">{{ timeslot.show.name }}</a></h1>
<div class="show-detail-header bf-{{ timeslot.show.broadcastformat.slug }}">
@@ -16,16 +15,16 @@
<div class="show-categories">
{% for si in timeslot.show.showinformation.all %}
- <span title="{{ si.information }}" class="catetory catetory-si si-{{ si.abbrev }}"><span>{{ si.abbrev }}</span></span>
+ <span title="{{ si.information }}" class="category category-si si-{{ si.abbrev }}"><span>{{ si.abbrev }}</span></span>
{% endfor %}
{% for st in timeslot.show.showtopic.all %}
- <span title="{{ st.topic }}" class="catetory catetory-st st-{{ st.abbrev }}"><span>{{ st.abbrev }}</span></span>
+ <span title="{{ st.topic }}" class="category category-st st-{{ st.abbrev }}"><span>{{ st.abbrev }}</span></span>
{% endfor %}
{% for mf in timeslot.show.musicfocus.all %}
- <span title="{{ mf.focus }}" class="catetory catetory-mf mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span>
+ <span title="{{ mf.focus }}" class="category category-mf mf-{{ mf.abbrev }}"><span>{{ mf.abbrev }}</span></span>
{% endfor %}
{% for lang in timeslot.show.language.all %}
- <span title="{{ lang.name }}/{{ lang.native_name }}" class="catetory catetory-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
+ <span title="{{ lang.name }}/{{ lang.native_name }}" class="category category-lang lang-{{ lang.slug }}"><span>{{ lang.slug }}</span></span>
{% endfor %}
</div>