From 5df740f8e95e266c5d9417ac835c6765d4d7d0b6 Mon Sep 17 00:00:00 2001
From: Johannes Raggam <raggam-nl@adm.at>
Date: Sun, 10 Apr 2011 22:34:49 +0200
Subject: include boxes where appropriate. simplifcations


diff --git a/helsinki/program/templates/program/box_broadcastformat.html b/helsinki/program/templates/program/box_broadcastformat.html
index aff4f05..20e914f 100644
--- a/helsinki/program/templates/program/box_broadcastformat.html
+++ b/helsinki/program/templates/program/box_broadcastformat.html
@@ -1,8 +1,8 @@
 {% if broadcastformats %}
-<dl id="bcformats" class="portlet program-bcformats">
+<dl id="broadcastformat" class="portlet">
   <dt class="portletHeader"><span>Legende<span></dt>
   {% for broadcastformat in broadcastformats %}
-  <dd class="portletItem bcformat bcformat-{{ broadcastformat.slug }}">
+  <dd class="portletItem bcformat bf-{{ broadcastformat.slug }}">
     <a href="?broadcastformat={{ broadcastformat.slug }}">{{ broadcastformat.format }}</a>
   </dd>
   {% endfor %}
diff --git a/helsinki/program/templates/program/box_musicfocus.html b/helsinki/program/templates/program/box_musicfocus.html
index cd91002..a1c8df8 100644
--- a/helsinki/program/templates/program/box_musicfocus.html
+++ b/helsinki/program/templates/program/box_musicfocus.html
@@ -1,10 +1,14 @@
 {% 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 class="portletItem">
+    <ul>
+      {% for item in musicfoci %}
+      <li class="mf-{{ item.abbrev }}">
+        <a href="?musicfocus={{ item.slug }}">{{ item }}</a>
+      </li>
+      {% endfor %}
+    </ul>
   </dd>
-  {% endfor %}
 </dl>
 {% endif %}
diff --git a/helsinki/program/templates/program/box_showinformation.html b/helsinki/program/templates/program/box_showinformation.html
index deef73c..20c4ba6 100644
--- a/helsinki/program/templates/program/box_showinformation.html
+++ b/helsinki/program/templates/program/box_showinformation.html
@@ -1,10 +1,14 @@
 {% 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 class="portletItem">
+    <ul>
+      {% for item in showinformations %}
+      <li class="si-{{ item.abbrev }}">
+        <a href="?showinformation={{ item.slug }}">{{ item }}</a>
+      </li>
+      {% endfor %}
+    </ul>
   </dd>
-  {% endfor %}
 </dl>
 {% endif %}
diff --git a/helsinki/program/templates/program/box_showtopic.html b/helsinki/program/templates/program/box_showtopic.html
index abeed2d..eeeac65 100644
--- a/helsinki/program/templates/program/box_showtopic.html
+++ b/helsinki/program/templates/program/box_showtopic.html
@@ -1,10 +1,14 @@
 {% 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 class="portletItem">
+    <ul>
+      {% for item in showtopics %}
+      <li class="st-{{ item.abbrev }}">
+        <a href="?showtopic={{ item.slug }}">{{ item }}</a>
+      </li>
+      {% endfor %}
+    </ul>
   </dd>
-  {% endfor %}
 </dl>
 {% endif %}
diff --git a/helsinki/program/templates/program/day_schedule.html b/helsinki/program/templates/program/day_schedule.html
index 880df08..a0e1ac4 100644
--- a/helsinki/program/templates/program/day_schedule.html
+++ b/helsinki/program/templates/program/day_schedule.html
@@ -8,7 +8,20 @@
 
 <div id="calendar"></div>
 
-<div id="content-main">
+{% load content_boxes %}
+<div id="filter-format">
+{% broadcastformat %}
+</div>
+<div id="filter-topic">
+  <dl id="filter-header" class="portlet">
+    <dt class="portletHeader"><span>Filter<span></dt>
+  </dl>
+{% musicfocus %}
+{% showinformation %}
+{% showtopic %}
+</div>
+
+<div id="content-main" class="day-schedule">
     <h2>Tagesansicht</h2>
     <h1 id="date">{{ day|date:"l, d.m.Y" }}</h1>
 
diff --git a/helsinki/program/templates/program/host_detail.html b/helsinki/program/templates/program/host_detail.html
index eff52d6..d28f582 100644
--- a/helsinki/program/templates/program/host_detail.html
+++ b/helsinki/program/templates/program/host_detail.html
@@ -5,7 +5,7 @@
 </head>
 <body>
 
-<div id="host-detail">
+<div id="content-main" class="host-detail">
     <div id="name">{{ host.name }}</div>
 
     <div id="shows">
@@ -26,4 +26,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/helsinki/program/templates/program/host_list.html b/helsinki/program/templates/program/host_list.html
index 5ab5c3f..9b83b29 100644
--- a/helsinki/program/templates/program/host_list.html
+++ b/helsinki/program/templates/program/host_list.html
@@ -5,7 +5,7 @@
 </head>
 <body>
 
-<div id="host-list">
+<div id="content-main" class="host-list">
 {% for host in host_list %}
     <div class="host">
         <a href="{% url host-detail host.id %}">{{ host.name }}</a>
@@ -14,4 +14,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/helsinki/program/templates/program/recommendations.html b/helsinki/program/templates/program/recommendations.html
index c34d5e5..85ec16e 100644
--- a/helsinki/program/templates/program/recommendations.html
+++ b/helsinki/program/templates/program/recommendations.html
@@ -5,7 +5,7 @@
 </head>
 <body>
 
-<div id="recommendations">
+<div id="content-main" class="recommendations">
     <div id="recommendations-title">Programmhinweise</div>
 {% for recommendation in recommendation_list %}
     <div class="recommendation {{ recommendation.show.broadcastformat.slug }}">
@@ -21,4 +21,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/helsinki/program/templates/program/show_detail.html b/helsinki/program/templates/program/show_detail.html
index e2ae528..0238ad3 100644
--- a/helsinki/program/templates/program/show_detail.html
+++ b/helsinki/program/templates/program/show_detail.html
@@ -6,7 +6,7 @@
 
 <div id="calendar"></div>
 
-<div id="show-detail">
+<div id="content-main" class="show-detail">
 
     <h1 id="name">{{ show.name }}</h1>
 
diff --git a/helsinki/program/templates/program/show_list.html b/helsinki/program/templates/program/show_list.html
index 629b670..6fe6525 100644
--- a/helsinki/program/templates/program/show_list.html
+++ b/helsinki/program/templates/program/show_list.html
@@ -5,18 +5,20 @@
 </head>
 <body>
 
-<div id="filter">
-    <div id="filter-title">Filter</div>
-
 {% load content_boxes %}
+<div id="filter-format">
 {% broadcastformat %}
+</div>
+<div id="filter-topic">
+  <dl id="filter-header" class="portlet">
+    <dt class="portletHeader"><span>Filter<span></dt>
+  </dl>
 {% musicfocus %}
 {% showinformation %}
 {% showtopic %}
-
 </div>
 
-<div id="shows">
+<div id="content-main" class="show-list">
 {% for show in show_list %}
     <div class="show">
         <div class="abbrevs">&nbsp;
@@ -52,6 +54,5 @@
 {% endfor %}
 </div>
 
-
 </body>
 </html>
diff --git a/helsinki/program/templates/program/timeslot_detail.html b/helsinki/program/templates/program/timeslot_detail.html
index 36a1e5f..04d56c2 100644
--- a/helsinki/program/templates/program/timeslot_detail.html
+++ b/helsinki/program/templates/program/timeslot_detail.html
@@ -5,7 +5,7 @@
 </head>
 <body>
 
-<div id="timeslot-detail">
+<div id="content-main" class="timeslot-detail">
     <h1 id="show-name">{{ timeslot.show.name }}</h1>
 
     {% if timeslot.show.short_description != 'FIXME' %}
diff --git a/helsinki/program/templates/program/week_schedule.html b/helsinki/program/templates/program/week_schedule.html
index f6e8f57..76aed5a 100644
--- a/helsinki/program/templates/program/week_schedule.html
+++ b/helsinki/program/templates/program/week_schedule.html
@@ -6,7 +6,7 @@
 
 <body>
 
-<div id="week-schedule">
+<div id="content-main" class="week-schedule">
     <div id="monday">
         <div class="weekday">{{ monday|date:"l d.m.Y" }}</div>
         {% for timeslot in monday_timeslots %}
diff --git a/helsinki/program/views.py b/helsinki/program/views.py
index 314de6a..1013f15 100644
--- a/helsinki/program/views.py
+++ b/helsinki/program/views.py
@@ -2,17 +2,18 @@ from django.views.generic import list_detail
 from django.views.generic import simple
 from django.shortcuts import get_object_or_404
 
-from helsinki.program.models import BroadcastFormat, MusicFocus, Note, Show, ShowInformation, ShowTopic, TimeSlot
+from helsinki.program.models import (
+        BroadcastFormat,
+        MusicFocus,
+        Note,
+        Show,
+        ShowInformation,
+        ShowTopic,
+        TimeSlot)
 
 from datetime import date, datetime, time, timedelta
 
 def show_list(request):
-    broadcastformats = BroadcastFormat.objects.all()
-    musicfoci = MusicFocus.objects.all()
-    showinformation = ShowInformation.objects.all()
-    showtopics = ShowTopic.objects.all()
-
-    extra_context = dict(broadcastformats=broadcastformats, musicfoci=musicfoci, showinformation=showinformation, showtopics=showtopics)
     
     if 'broadcastformat' in request.GET:
         broadcastformat = get_object_or_404(BroadcastFormat, slug=request.GET['broadcastformat'])
@@ -34,7 +35,7 @@ def show_list(request):
         queryset = Show.objects.all()
 
 
-    return list_detail.object_list(request, queryset=queryset, extra_context=extra_context, template_object_name='show')
+    return list_detail.object_list(request, queryset=queryset, template_object_name='show')
 
 def recommendations(request, template_name='program/recommendations.html'):
     now = datetime.now()
@@ -49,10 +50,9 @@ def today_schedule(request):
     today = datetime.combine(date.today(), time(6, 0))
     tomorrow = today + timedelta(days=1)
 
-    broadcastformats = BroadcastFormat.objects.all()
     recommendations = Note.objects.filter(status=1, timeslot__start__range=(now, tomorrow))
 
-    extra_context = dict(day=today, broadcastformats=broadcastformats, recommendations=recommendations)
+    extra_context = dict(day=today, recommendations=recommendations)
 
     if 'broadcastformat' in request.GET:
         broadcastformat = get_object_or_404(BroadcastFormat, slug=request.GET['broadcastformat'])
@@ -67,10 +67,9 @@ def day_schedule(request, year, month, day):
     this_day = datetime.strptime('%s__%s__%s__06__00' % (year, month, day), '%Y__%m__%d__%H__%M')
     that_day = this_day+timedelta(days=1)
 
-    broadcastformats = BroadcastFormat.objects.all()
     recommendations = Note.objects.filter(status=1, timeslot__start__range=(this_day, that_day))
 
-    extra_context = dict(day=this_day, broadcastformats=broadcastformats, recommendations=recommendations)
+    extra_context = dict(day=this_day, recommendations=recommendations)
 
     if 'broadcastformat' in request.GET:
         broadcastformat = get_object_or_404(BroadcastFormat, slug=request.GET['broadcastformat'])
-- 
cgit v0.10.2