From 5df740f8e95e266c5d9417ac835c6765d4d7d0b6 Mon Sep 17 00:00:00 2001 From: Johannes Raggam 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 %} -
+
Legende
{% for broadcastformat in broadcastformats %} -
+
{{ broadcastformat.format }}
{% 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 %}
Musiktendenz
- {% for item in musicfoci %} -
- {{ item }} +
+
    + {% for item in musicfoci %} +
  • + {{ item }} +
  • + {% endfor %} +
- {% endfor %}
{% 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 %}
Schwerpunkt
- {% for item in showinformations %} -
- {{ item }} +
+
    + {% for item in showinformations %} +
  • + {{ item }} +
  • + {% endfor %} +
- {% endfor %}
{% 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 %}
Thema / Schwerpunkt
- {% for item in showtopics %} -
- {{ item }} +
+
    + {% for item in showtopics %} +
  • + {{ item }} +
  • + {% endfor %} +
- {% endfor %}
{% 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 @@
-
+{% load content_boxes %} +
+{% broadcastformat %} +
+
+
+
Filter
+
+{% musicfocus %} +{% showinformation %} +{% showtopic %} +
+ +

Tagesansicht

{{ day|date:"l, d.m.Y" }}

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 @@ -
+
{{ host.name }}
@@ -26,4 +26,4 @@
- \ No newline at end of file + 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 @@ -
+
{% for host in host_list %}
{{ host.name }} @@ -14,4 +14,4 @@
- \ No newline at end of file + 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 @@ -
+
Programmhinweise
{% for recommendation in recommendation_list %}
@@ -21,4 +21,4 @@
- \ No newline at end of file + 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 @@
-
+

{{ show.name }}

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 @@ -
-
Filter
- {% load content_boxes %} +
{% broadcastformat %} +
+
+
+
Filter
+
{% musicfocus %} {% showinformation %} {% showtopic %} -
-
+
{% for show in show_list %}
  @@ -52,6 +54,5 @@ {% endfor %}
- 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 @@ -
+

{{ timeslot.show.name }}

{% 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 @@ -
+
{{ monday|date:"l d.m.Y" }}
{% 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