From af36a0ece529d149f52300aeb2090bc072438dac Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Thu, 9 Jun 2011 13:25:02 +0200 Subject: align current_box and recommendations_box with design diff --git a/program/views.py b/program/views.py index cfd3749..554641e 100644 --- a/program/views.py +++ b/program/views.py @@ -74,10 +74,14 @@ def day_schedule(request, year=None, month=None, day=None): def current_show(request): current = TimeSlot.objects.get_or_create_current() + previous = current.get_previous_by_start() next = current.get_next_by_start() after_next = next.get_next_by_start() - extra_context = dict(current=current, next=next, after_next=after_next) + extra_context = dict(current=current, + previous=previous, + next=next, + after_next=after_next) return simple.direct_to_template(request, template='program/boxes/current.html', extra_context=extra_context) diff --git a/templates/program/boxes/current.html b/templates/program/boxes/current.html index 620cb7f..a88d0ad 100644 --- a/templates/program/boxes/current.html +++ b/templates/program/boxes/current.html @@ -6,33 +6,50 @@ - {% if current or next or after_next %} -
+ {% if previous or current or next or after_next %} +
Programm derzeit
-
-
{{ current.start|date:"H:i" }}
-
- - {% if current.note %} -
{{ current.note.title }}
- {% else %} - {% if current.show.short_description != 'FIXME' %} -
{{ current.show.short_description }}
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
{{ previous.start|date:"H:i" }}  +

{{ previous.show.name }}

+
{{ current.start|date:"H:i" }} +

{{ current.show.name }}

+ {% if current.note %} +

{{ current.note.title }}

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

{{ current.show.short_description }}

+ {% endif %} {% endif %} - {% endif %} - - -
-
{{ next.start|date:"H:i" }}
- -
-
-
{{ after_next.start|date:"H:i" }}
- +
{{ next.start|date:"H:i" }}  +

{{ next.show.name }}

+
{{ after_next.start|date:"H:i" }}  +

{{ after_next.show.name }}

+
{% endif %} diff --git a/templates/program/boxes/recommendations.html b/templates/program/boxes/recommendations.html index 21afb90..305ffb3 100644 --- a/templates/program/boxes/recommendations.html +++ b/templates/program/boxes/recommendations.html @@ -6,15 +6,28 @@ {% if recommendation_list %} -
+
Programmhinweise
- {% for recommendation in recommendation_list %} -
-

{{ recommendation.show.name }}

-

{{ recommendation.timeslot.start|date:"d.m. H:i" }}-{{ recommendation.timeslot.end|date:"H:i" }}

-

{{ recommendation.title }}

+
+ + {% for item in recommendation_list %} + + + + + + {% endfor %} +
   + {{ item.timeslot.start|date:"d.m. H:i" }} - + {{ item.timeslot.end|date:"H:i" }}
+ +

{{ item.show.name }}

+

+ {{ item.title }}
+ [weiter] +

+
- {% endfor %}
{% endif %} -- cgit v0.10.2