diff options
author | Johannes Raggam <raggam-nl@adm.at> | 2011-06-09 11:25:02 (GMT) |
---|---|---|
committer | Johannes Raggam <raggam-nl@adm.at> | 2011-06-09 11:25:02 (GMT) |
commit | af36a0ece529d149f52300aeb2090bc072438dac (patch) | |
tree | 0286f324896ab5eab8e52f3b091358a25155e8e4 | |
parent | 3fd396b6d940070d3004da09265e1b99559364e0 (diff) |
align current_box and recommendations_box with design
-rw-r--r-- | program/views.py | 6 | ||||
-rw-r--r-- | templates/program/boxes/current.html | 67 | ||||
-rw-r--r-- | templates/program/boxes/recommendations.html | 27 |
3 files changed, 67 insertions, 33 deletions
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 @@ </head> <body> - {% if current or next or after_next %} - <dl class="portlet program-current"> + {% if previous or current or next or after_next %} + <dl class="portlet program-box"> <dt class="portletHeader">Programm derzeit</dt> - <dd class="portletItem current-timeslot"> - <div class="start">{{ current.start|date:"H:i" }}</div> - <div class="show {{ current.show.broadcastformat.slug }}"> - <div class="name"><a href="{% url timeslot-detail current.id %}">{{ current.show.name }}</a></div> - {% if current.note %} - <div class="note-title">{{ current.note.title }}</div> - {% else %} - {% if current.show.short_description != 'FIXME' %} - <div class="short-description">{{ current.show.short_description }}</div> + <dd class="portletItem"> + <table> + <tr class="previous"> + <td class="start">{{ previous.start|date:"H:i" }}</td> + <td class="format bf-{{ previous.show.broadcastformat.slug }}"> </td> + <td class="show"> + <h3><a href="{% url timeslot-detail previous.id %}">{{ previous.show.name }}</a></h3> + </td> + <td class="show"></td> + </tr> + <tr class="current"> + <td class="start">{{ current.start|date:"H:i" }}</td> + <td class="format bf-{{ current.show.broadcastformat.slug }}">▶</td> + <td class="show"> + <h3><a href="{% url timeslot-detail current.id %}">{{ current.show.name }}</a></h3> + {% if current.note %} + <p>{{ current.note.title }}</p> + {% else %} + {% if current.show.short_description != 'FIXME' %} + <p>{{ current.show.short_description }}</p> + {% endif %} {% endif %} - {% endif %} - </div> - </dd> - <dd class="portletItem next-timeslot"> - <div class="start">{{ next.start|date:"H:i" }}</div> - <div class="show {{ next.show.broadcastformat.slug }}"> - <div class="name"><a href="{% url timeslot-detail next.id %}">{{ next.show.name }}</a></div> - </div> - </dd> - <dd class="portletItem next-timeslot"> - <div class="start">{{ after_next.start|date:"H:i" }}</div> - <div class="show {{ after_next.show.broadcastformat.slug }}"> - <div class="name"><a href="{% url timeslot-detail after_next.id %}">{{ after_next.show.name }}</div></a> - </div> + </td> + </tr> + <tr class="next"> + <td class="start">{{ next.start|date:"H:i" }}</td> + <td class="format bf-{{ next.show.broadcastformat.slug }}"> </td> + <td class="show"> + <h3><a href="{% url timeslot-detail next.id %}">{{ next.show.name }}</a></h3> + </td> + <td class="show"></td> + </tr> + <tr class="after_next"> + <td class="start">{{ after_next.start|date:"H:i" }}</td> + <td class="format bf-{{ after_next.show.broadcastformat.slug }}"> </td> + <td class="show"> + <h3><a href="{% url timeslot-detail after_next.id %}">{{ after_next.show.name }}</a></h3> + </td> + <td class="show"></td> + </tr> + </table> </dd> </dl> {% 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 @@ </head> <body> {% if recommendation_list %} - <dl id="recommendations" class="portlet program-recommendations"> + <dl id="recommendations" class="portlet program-box"> <dt class="portletHeader">Programmhinweise</dt> - {% for recommendation in recommendation_list %} - <dd class="portletItem program-recommendation {{ recommendation.show.broadcastformat.slug }}"> - <h3 class="show-name"><a href="{% url show-detail recommendation.show.slug %}">{{ recommendation.show.name }}</a></h3> - <p class="timeslot-start-end">{{ recommendation.timeslot.start|date:"d.m. H:i" }}-{{ recommendation.timeslot.end|date:"H:i" }}</p> - <p class="note-title"><a href="{% url timeslot-detail recommendation.timeslot.id %}">{{ recommendation.title }}</a></p> + <dd class="portletItem"> + <table> + {% for item in recommendation_list %} + <tr> + <td class="start"> </td> + <td class="format bf-{{ item.show.broadcastformat.slug }}"> </td> + <td class="show"> + {{ item.timeslot.start|date:"d.m. H:i" }} - + {{ item.timeslot.end|date:"H:i" }}<br /> + + <h3><a href="{% url show-detail item.timeslot.id %}">{{ item.show.name }}</a></h3> + <p class="note-title"> + {{ item.title }}<br /> + <a href="{% url timeslot-detail item.timeslot.id %}">[weiter]</a> + </p> + </td> + </tr> + {% endfor %} + </table> </dd> - {% endfor %} </dl> {% endif %} </body> |