]> git.parisson.com Git - telemeta.git/commitdiff
fix no element in revision
authoryomguy <yomguy@parisson.com>
Tue, 29 Mar 2011 10:19:58 +0000 (12:19 +0200)
committeryomguy <yomguy@parisson.com>
Tue, 29 Mar 2011 10:19:58 +0000 (12:19 +0200)
telemeta/templates/telemeta_default/home.html

index eeaa08bf5ca381d5d302ddf1c2dd5ba79ccc65b0..3f8e2496f9763bf5dea923cb4ecc919b36e8a87c 100644 (file)
      <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
         <td>{{ r.revision.time }}</td>
         <td>
-        {% if r.revision.element_type == "collection" %}
+        {% if r.revision.element_type == "collection" and r.element %}
           <a href="{% url telemeta-collection-detail r.element.public_id %}">{{ r.element.title }}</a>
         {% endif %}
-        {% if r.revision.element_type == "item" %}
-         {% if r.element %}
+        {% if r.revision.element_type == "item" and r.element %}
           <a href="{% url telemeta-item-detail r.element.public_id %}">
-           {% if r.element.title != '' %}{{ r.element.title }}{% else %}{{ r.element.public_id }}{% endif %}
-           </a>
-         {% else %}
-          {{ r.element }}
-         {% endif %}
+           {% if r.element.title != '' %}{{ r.element.title }}{% else %}{{ r.element.public_id }}{% endif %}</a>
         {% endif %}
-        {% if r.revision.element_type == "marker" %}
+        {% if r.revision.element_type == "marker" and r.element %}
           <a href="{% url telemeta-item-detail-marker r.element.public_id %}">{{ r.element.title }}</a>
         {% endif %}
         </td>