From de060aca81bf86472d37b8fc157e2984ec8ce791 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Fri, 8 Apr 2011 23:12:00 +0200 Subject: optimizations diff --git a/helsinki/program/templates/program/bcformats_box.html b/helsinki/program/templates/program/bcformats_box.html new file mode 100644 index 0000000..3067805 --- /dev/null +++ b/helsinki/program/templates/program/bcformats_box.html @@ -0,0 +1,20 @@ + + + + + Broadcast Formats + + + + {% if broadcastformats %} +
+
Legende
+ {% for broadcastformat in broadcastformats %} +
+ {{ broadcastformat.format }} +
+ {% endfor %} +
+ {% endif %} + + diff --git a/helsinki/program/templates/program/day_schedule.html b/helsinki/program/templates/program/day_schedule.html index 3e7d4bc..9208e50 100644 --- a/helsinki/program/templates/program/day_schedule.html +++ b/helsinki/program/templates/program/day_schedule.html @@ -8,42 +8,32 @@
-
-
Programmhinweise
- {% for recommendation in recommendations %} -
-
{{ recommendation.timeslot.start|date:"d.m. H:i" }} - {{ recommendation.timeslot.end|date:"H:i" }}
- - -
- {% endfor %} -
+
+

Tagesansicht

+

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

-
-
Tagesansicht
-
{{ day|date:"l, d.m.Y" }}
{% for timeslot in timeslots %} -
+
{{ timeslot.start|date:"H:i" }}
-
  +
{% for showinformation in timeslot.show.showinformation.all %} - {{ showinformation.abbrev }} + {{ showinformation.abbrev }} {% endfor %} {% for showtopic in timeslot.show.showtopic.all %} - {{ showtopic.abbrev }} + {{ showtopic.abbrev }} {% endfor %} {% for musicfocus in timeslot.show.musicfocus.all %} - {{ musicfocus.abbrev }} + {{ musicfocus.abbrev }} {% endfor %}
- +

{{ timeslot.show.name }}

{% if timeslot.note %} -
Heute: {{ timeslot.note.title }}
+

Heute: {{ timeslot.note.title }}

{% else %} {% if timeslot.show.short_description != 'FIXME' %} -
{{ timeslot.show.short_description }}
+

{{ timeslot.show.short_description }}

{% endif %} {% endif %}
@@ -52,14 +42,6 @@
-
-
Legende
- {% for broadcastformat in broadcastformats %} - - {% endfor %} -
- \ 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 9cd2d8e..e2ae528 100644 --- a/helsinki/program/templates/program/show_detail.html +++ b/helsinki/program/templates/program/show_detail.html @@ -7,7 +7,12 @@
-
{{ show.name }}
+ +

{{ show.name }}

+ + {% if show.short_description != 'FIXME' %} +
{{ show.short_description }}
+ {% endif %}
{% for topic in show.showtopic.all %} @@ -39,9 +44,6 @@ {% endfor %}
- {% if show.short_description != 'FIXME' %} -
{{ show.short_description }}
- {% endif %}
{{ show.description|safe }}
@@ -59,4 +61,4 @@
- \ No newline at end of file + diff --git a/helsinki/program/templates/program/timeslot_detail.html b/helsinki/program/templates/program/timeslot_detail.html index f8dee29..36a1e5f 100644 --- a/helsinki/program/templates/program/timeslot_detail.html +++ b/helsinki/program/templates/program/timeslot_detail.html @@ -6,7 +6,11 @@
-
{{ timeslot.show.name }}
+

{{ timeslot.show.name }}

+ + {% if timeslot.show.short_description != 'FIXME' %} +
{{ timeslot.show.short_description }}
+ {% endif %}
{% for topic in timeslot.show.showtopic.all %} @@ -38,10 +42,6 @@ {% endfor %}
- {% if timeslot.show.short_description != 'FIXME' %} -
{{ timeslot.show.short_description }}
- {% endif %} -
{{ timeslot.show.description|safe }}
@@ -55,4 +55,4 @@
- \ No newline at end of file + diff --git a/helsinki/program/urls.py b/helsinki/program/urls.py index 06018e2..341923b 100644 --- a/helsinki/program/urls.py +++ b/helsinki/program/urls.py @@ -7,7 +7,7 @@ import os admin.autodiscover() urlpatterns = patterns('', - (r'^admin/', include(admin.site.urls)), + (r'^admin/', include(admin.site.urls)), (r'^program', include('helsinki.program.urls_program')), ) if settings.DEBUG: diff --git a/helsinki/program/urls_program.py b/helsinki/program/urls_program.py index f68d376..6f4ae3a 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 +from views import current_show, day_schedule, recommendations, show_list, today_schedule, week_schedule, bcformats urlpatterns = patterns('', ('^/today/?$', today_schedule), @@ -17,6 +17,7 @@ urlpatterns = patterns('', ('^/shows/?$', show_list), url('^/shows/(?P[\w-]+)/?$', object_detail, dict(template_object_name='show', queryset=Show.objects.all()), name='show-detail'), url('^/(?P\d+)/?$', object_detail, dict(template_object_name='timeslot', queryset=TimeSlot.objects.all()), name='timeslot-detail'), + ('^/bcformats_box/?$', bcformats), # TODO: implement ('^/week/?$', today_schedule), ('^/topics/?$', recommendations), diff --git a/helsinki/program/views.py b/helsinki/program/views.py index 2e9cd8a..584f24d 100644 --- a/helsinki/program/views.py +++ b/helsinki/program/views.py @@ -111,3 +111,12 @@ def week_schedule(request, year, week): extra_context['sunday_timeslots'] = TimeSlot.objects.filter(start__range=(sunday, next_monday)) return simple.direct_to_template(request, template='program/week_schedule.html', extra_context=extra_context) + + +def bcformats(request): + broadcastformats = BroadcastFormat.objects.all() + extra_context = dict(broadcastformats=broadcastformats) + return simple.direct_to_template( + request, + template='program/bcformats_box.html', + extra_context=extra_context) -- cgit v0.10.2