diff options
author | Johannes Raggam <raggam-nl@adm.at> | 2011-04-10 20:02:37 (GMT) |
---|---|---|
committer | Johannes Raggam <raggam-nl@adm.at> | 2011-04-10 20:02:37 (GMT) |
commit | f6a05a6a05e7c704f5bd8971ee9b0b7fe4f191e6 (patch) | |
tree | ea02a3b07c3e7b77d0d351effc011869c82d9b51 | |
parent | 59d24b4afc5b0ef61ae9e7a56c9187b525fb2ec3 (diff) |
more boxes
-rw-r--r-- | helsinki/program/templates/program/box_broadcastformat.html (renamed from helsinki/program/templates/program/box_broadcastformats.html) | 0 | ||||
-rw-r--r-- | helsinki/program/templates/program/box_musicfocus.html | 10 | ||||
-rw-r--r-- | helsinki/program/templates/program/box_showinformation.html | 10 | ||||
-rw-r--r-- | helsinki/program/templates/program/box_showtopic.html | 10 | ||||
-rw-r--r-- | helsinki/program/templates/program/show_list.html | 36 | ||||
-rw-r--r-- | helsinki/program/templatetags/content_boxes.py | 19 | ||||
-rw-r--r-- | helsinki/program/urls_program.py | 2 |
7 files changed, 53 insertions, 34 deletions
diff --git a/helsinki/program/templates/program/box_broadcastformats.html b/helsinki/program/templates/program/box_broadcastformat.html index aff4f05..aff4f05 100644 --- a/helsinki/program/templates/program/box_broadcastformats.html +++ b/helsinki/program/templates/program/box_broadcastformat.html 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), |