]> git.parisson.com Git - telemeta.git/commitdiff
correct bug on collections display in haystack search results
authorafilsaime <shadow_kungfu@hotmail.fr>
Thu, 23 Apr 2015 08:55:11 +0000 (10:55 +0200)
committerafilsaime <shadow_kungfu@hotmail.fr>
Thu, 23 Apr 2015 08:55:11 +0000 (10:55 +0200)
telemeta/templates/search/mediaitem_listhaystack.html

index 8d516e3a5c041a2bccbeb60e1e4ca378c4561475..bfd9b7ae5438ab81d8f2556a239c64c8c316c683 100644 (file)
 {% for result in page.object_list %}
 <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
     <td class="highlight">
-        <a href="{% url "telemeta-item-detail" result.object.public_id %}">{{ result.object.title }}</a>
+        {%ifequal type 'item'%}
+            <a href="{% url "telemeta-item-detail" result.object.public_id %}">{{ result.object.title }}</a>
+        {%else%}
+            {%ifequal type 'collection'%}
+                <a href="{% url "telemeta-collection-detail" result.object.public_id %}">{{ result.object.title }}</a>
+            {%endifequal%}
+        {%endifequal%}
     </td>
     <td align="center">
         {% if result.object.file %}