From f6a05a6a05e7c704f5bd8971ee9b0b7fe4f191e6 Mon Sep 17 00:00:00 2001
From: Johannes Raggam <raggam-nl@adm.at>
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 %}
+<dl id="bcformats" class="portlet program-bcformats">
+  <dt class="portletHeader"><span>Legende<span></dt>
+  {% for broadcastformat in broadcastformats %}
+  <dd class="portletItem bcformat bcformat-{{ broadcastformat.slug }}">
+    <a href="?broadcastformat={{ broadcastformat.slug }}">{{ broadcastformat.format }}</a>
+  </dd>
+  {% endfor %}
+</dl>
+{% 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 %}
-<dl id="bcformats" class="portlet program-bcformats">
-  <dt class="portletHeader"><span>Legende<span></dt>
-  {% for broadcastformat in broadcastformats %}
-  <dd class="portletItem bcformat bcformat-{{ broadcastformat.slug }}">
-    <a href="?broadcastformat={{ broadcastformat.slug }}">{{ broadcastformat.format }}</a>
-  </dd>
-  {% endfor %}
-</dl>
-{% 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 %}
+<dl id="box_musicfocus" class="portlet">
+  <dt class="portletHeader"><span>Musiktendenz<span></dt>
+  {% for item in musicfoci %}
+  <dd class="portletItem musicfocus mf-{{ item.abbrev }}">
+    <a href="?musicfocus={{ item.slug }}">{{ item }}</a>
+  </dd>
+  {% endfor %}
+</dl>
+{% 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 %}
+<dl id="box_showinformation" class="portlet">
+  <dt class="portletHeader"><span>Schwerpunkt<span></dt>
+  {% for item in showinformations %}
+  <dd class="portletItem showinformation mf-{{ item.abbrev }}">
+    <a href="?showinformation={{ item.slug }}">{{ item }}</a>
+  </dd>
+  {% endfor %}
+</dl>
+{% 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 %}
+<dl id="box_showtopic" class="portlet">
+  <dt class="portletHeader"><span>Thema / Schwerpunkt<span></dt>
+  {% for item in showtopics %}
+  <dd class="portletItem showtopic st-{{ item.abbrev }}">
+    <a href="?showtopic={{ item.slug }}">{{ item }}</a>
+  </dd>
+  {% endfor %}
+</dl>
+{% 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 @@
 </head>
 <body>
 
-{% load content_boxes %}
-{% broadcastformats %}
-
 <div id="filter">
     <div id="filter-title">Filter</div>
 
-    <div id="showtopics">
-        <div id="showtopics-title">Thema/Schwerpunkt</div>
-        {% for topic in showtopics %}
-        <div class="showtopic">
-            <span class="abbrev">{{ topic.abbrev }}</span>
-            <span class="topic"><a href="?showtopic={{ topic.slug }}">{{ topic }}</a></span>
-        </div>
-        {% endfor %}
-    </div>
-
-    <div id="showinformations">
-        <div id="showinformations-title"></div>
-        {% for information in showinformations %}
-        <div class="showinformation">
-            <span class="abbrev">{{ information.abbrev }}</span>
-            <span class="information"><a href="?showinformation={{ information.slug }}">{{ information }}</a></span>
-        </div>
-        {% endfor %}
-    </div>
+{% load content_boxes %}
+{% broadcastformat %}
+{% musicfocus %}
+{% showinformation %}
+{% showtopic %}
 
-    <div id="musicfoci">
-        <div id="musicfoci-title">Musiktendenz</div>
-        {% for focus in musicfoci %}
-        <div class="musicfocus">
-            <span class="abbrev">{{ focus.abbrev }}</span>
-            <span class="focus"><a href="?musicfocus={{ focus.slug }}">{{ focus }}</a></span>
-        </div>
-    {% endfor %}
-    </div>
 </div>
 
 <div id="shows">
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