From 428cff5822194f2d934bc1892dc46d63f33c99b1 Mon Sep 17 00:00:00 2001
From: Ernesto Rico-Schmidt <e.rico.schmidt@gmail.com>
Date: Fri, 17 Feb 2012 18:25:41 +0100
Subject: fixed unnecesary bug in recommendations template.


diff --git a/templates/program/boxes/recommendations.html b/templates/program/boxes/recommendations.html
index a0dd4b2..2174654 100644
--- a/templates/program/boxes/recommendations.html
+++ b/templates/program/boxes/recommendations.html
@@ -18,24 +18,17 @@
           <td class="show">
             {{ item.start|date:"d.m. H:i" }} -
             {{ item.end|date:"H:i" }}<br />
-
-            {% if item.note %}
               <h3>
                 <a href="{% url timeslot-detail item.id %}">{{ item.show.name }}</a>
               </h3>
               <p class="note-title">
+              {% if item.note %}
                 {{ item.note.title }}<br />
-                <a href="{% url timeslot-detail item.id %}">[weiter]</a>
-              </p>
-            {% else %}
-              <h3>
-                <a href="{% url show-detail item.show.slug %}">{{ item.show.name }}</a>
-              </h3>
-              <p class="note-title">
+              {% else %}
                 {{ item.show.broadcastformat.format }}<br />
-                <a href="{% url show-detail item.show.slug %}">[weiter]</a>
+              {% endif %}
+                <a href="{% url timeslot-detail item.id %}">[weiter]</a>
               </p>
-            {% endif %}
           </td>
         </tr>
       {% endfor %}
diff --git a/templates/program/recommendations.html b/templates/program/recommendations.html
index c08634e..ba9a719 100644
--- a/templates/program/recommendations.html
+++ b/templates/program/recommendations.html
@@ -23,14 +23,19 @@
         <div class="show-detail">
           <h4>
             <a href="{% url show-detail item.show.slug %}">{{ item.show.name }}</a><br />
-            vom {{ item.timeslot.start|date:"d.m. H:i" }}-{{ item.timeslot.end|date:"H:i" }}
+            vom {{ item.start|date:"d.m. H:i" }}-{{ item.end|date:"H:i" }}
           </h4>
+        {% if item.note %}
           <h3 class="show-title">
-            <a href="{%  url timeslot-detail item.timeslot.id %}">{{ item.title }}</a>
+            <a href="{%  url timeslot-detail item.id %}">{{ item.note.title }}</a>
           </h3>
-          <div class="note-content">{{ item.content|safe}}</div>
-
-        </div>
+          <div class="note-content">{{ item.note.content|safe}}</div>
+        {% else %}
+            <h3 class="show-title">
+              <a href="{%  url timeslot-detail item.id %}">{{ item.show.broadcastformat.format }}</a>
+            </h3>
+        {% endif %}
+      </div>
     </div>
 {% endfor %}
   </div>
-- 
cgit v0.10.2