]> git.parisson.com Git - teleforma.git/commitdiff
fix multiple docs
authoryomguy <yomguy@parisson.com>
Mon, 11 Jun 2012 14:35:26 +0000 (16:35 +0200)
committeryomguy <yomguy@parisson.com>
Mon, 11 Jun 2012 14:35:26 +0000 (16:35 +0200)
teleforma/templates/teleforma/inc/document_list.html

index b37e1f7d803d65f943a41a0b036ffac855f190fc..04de9caac962efed25c02676221bb0cb6851ffdc 100644 (file)
@@ -8,7 +8,7 @@
 </div>
 
 {% for doc_type in doc_types %}
-{% if course.document.all|from_doc_type:doc_type %}
+{% if course.document.all|from_course_type:type|from_doc_type:doc_type %}
 <span class="doc_type_title">{{ doc_type }}</span>
 <table class="listing" width="100%">
     <thead>
@@ -20,7 +20,7 @@
         </tr>
     </thead>
     <tbody>
-        {% for document in course.document.all|from_course_type:type %}
+        {% for document in course.document.all|from_course_type:type|from_doc_type:doc_type %}
         <tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
         <td>{% if document.file %}<a href="{% url teleforma-document-detail document.id %}" target="_blank">{% endif %}{{ document.title }}{% if document.file %}</a>{% endif %}</td>
         <td align="center">