From f6a05a6a05e7c704f5bd8971ee9b0b7fe4f191e6 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Sun, 10 Apr 2011 22:02:37 +0200 Subject: more boxes diff --git a/helsinki/program/templates/program/box_broadcastformat.html b/helsinki/program/templates/program/box_broadcastformat.html new file mode 100644 index 0000000..aff4f05 --- /dev/null +++ b/helsinki/program/templates/program/box_broadcastformat.html @@ -0,0 +1,10 @@ +{% if broadcastformats %} +
+
Legende
+ {% for broadcastformat in broadcastformats %} +
+ {{ broadcastformat.format }} +
+ {% endfor %} +
+{% endif %} diff --git a/helsinki/program/templates/program/box_broadcastformats.html b/helsinki/program/templates/program/box_broadcastformats.html deleted file mode 100644 index aff4f05..0000000 --- a/helsinki/program/templates/program/box_broadcastformats.html +++ /dev/null @@ -1,10 +0,0 @@ -{% if broadcastformats %} -
-
Legende
- {% for broadcastformat in broadcastformats %} -
- {{ broadcastformat.format }} -
- {% endfor %} -
-{% endif %} diff --git a/helsinki/program/templates/program/box_musicfocus.html b/helsinki/program/templates/program/box_musicfocus.html new file mode 100644 index 0000000..cd91002 --- /dev/null +++ b/helsinki/program/templates/program/box_musicfocus.html @@ -0,0 +1,10 @@ +{% if musicfoci %} +
+
Musiktendenz
+ {% for item in musicfoci %} +
+ {{ item }} +
+ {% endfor %} +
+{% endif %} diff --git a/helsinki/program/templates/program/box_showinformation.html b/helsinki/program/templates/program/box_showinformation.html new file mode 100644 index 0000000..deef73c --- /dev/null +++ b/helsinki/program/templates/program/box_showinformation.html @@ -0,0 +1,10 @@ +{% if showinformations %} +
+
Schwerpunkt
+ {% for item in showinformations %} +
+ {{ item }} +
+ {% endfor %} +
+{% endif %} diff --git a/helsinki/program/templates/program/box_showtopic.html b/helsinki/program/templates/program/box_showtopic.html new file mode 100644 index 0000000..abeed2d --- /dev/null +++ b/helsinki/program/templates/program/box_showtopic.html @@ -0,0 +1,10 @@ +{% if showtopics %} +
+
Thema / Schwerpunkt
+ {% for item in showtopics %} +
+ {{ item }} +
+ {% endfor %} +
+{% endif %} diff --git a/helsinki/program/templates/program/show_list.html b/helsinki/program/templates/program/show_list.html index f938410..629b670 100644 --- a/helsinki/program/templates/program/show_list.html +++ b/helsinki/program/templates/program/show_list.html @@ -5,41 +5,15 @@ -{% load content_boxes %} -{% broadcastformats %} -
Filter
-
-
Thema/Schwerpunkt
- {% for topic in showtopics %} -
- {{ topic.abbrev }} - {{ topic }} -
- {% endfor %} -
- -
-
- {% for information in showinformations %} -
- {{ information.abbrev }} - {{ information }} -
- {% endfor %} -
+{% load content_boxes %} +{% broadcastformat %} +{% musicfocus %} +{% showinformation %} +{% showtopic %} -
-
Musiktendenz
- {% for focus in musicfoci %} -
- {{ focus.abbrev }} - {{ focus }} -
- {% endfor %} -
diff --git a/helsinki/program/templatetags/content_boxes.py b/helsinki/program/templatetags/content_boxes.py index c43d3f3..56c0afb 100644 --- a/helsinki/program/templatetags/content_boxes.py +++ b/helsinki/program/templatetags/content_boxes.py @@ -9,7 +9,22 @@ from helsinki.program.models import ( ShowInformation, ShowTopic) -@register.inclusion_tag('program/box_broadcastformats.html') -def broadcastformats(): +@register.inclusion_tag('program/box_broadcastformat.html') +def broadcastformat(): broadcastformats = BroadcastFormat.objects.all() return {'broadcastformats': broadcastformats} + +@register.inclusion_tag('program/box_musicfocus.html') +def musicfocus(): + musicfoci = MusicFocus.objects.all() + return {'musicfoci': musicfoci} + +@register.inclusion_tag('program/box_showinformation.html') +def showinformation(): + showinformations = ShowInformation.objects.all() + return {'showinformations': showinformations} + +@register.inclusion_tag('program/box_showtopic.html') +def showtopic(): + showtopics = ShowTopic.objects.all() + return {'showtopics': showtopics} diff --git a/helsinki/program/urls_program.py b/helsinki/program/urls_program.py index 48cdd79..4f4b981 100644 --- a/helsinki/program/urls_program.py +++ b/helsinki/program/urls_program.py @@ -3,7 +3,7 @@ from django.conf.urls.defaults import * from django.views.generic.list_detail import object_detail, object_list from models import Host, Show, TimeSlot -from views import current_show, day_schedule, recommendations, show_list, today_schedule, week_schedule, bcformats +from views import current_show, day_schedule, recommendations, show_list, today_schedule, week_schedule urlpatterns = patterns('', ('^/today/?$', today_schedule), -- cgit v0.10.2