]> git.parisson.com Git - teleforma.git/commitdiff
fix links when no script.file
authorGuillaume Pellerin <yomguy@parisson.com>
Tue, 4 Aug 2015 20:39:12 +0000 (22:39 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Tue, 4 Aug 2015 20:39:12 +0000 (22:39 +0200)
teleforma/exam/templates/exam/inc/script_list.html

index d38928774abf23c70df15ff82f763e4e9a88961f..ee5f474b6529609cbb6a1c2955a9c2fbfde9831e 100644 (file)
@@ -24,9 +24,9 @@
     <tbody id="spacing" class="script-list">
     {% for script in object_list %}
     <tr>
-     <td>{% if script.status != 2 %}<a href="{% url teleforma-exam-script-detail period.id script.id %}">{% endif %}{{ script.course.title }}{% if script.status != 2 %}</a>{% endif %}</td>
-     <td>{% if script.status != 2 %}<a href="{% url teleforma-exam-script-detail period.id script.id %}">{% endif %}{{ script.session }}{% if script.status != 2 %}</a>{% endif %}</td>
-     <td>{% if script.status != 2 %}<a href="{% url teleforma-exam-script-detail period.id script.id %}">{% endif %}{{ script.type }}{% if script.status != 2 %}</a>{% endif %}</td>
+     <td>{% if script.status != 2 and script.file %}<a href="{% url teleforma-exam-script-detail period.id script.id %}">{% endif %}{{ script.course.title }}{% if script.status != 2 and script.file %}</a>{% endif %}</td>
+     <td>{% if script.status != 2  and script.file%}<a href="{% url teleforma-exam-script-detail period.id script.id %}">{% endif %}{{ script.session }}{% if script.status != 2 and script.file %}</a>{% endif %}</td>
+     <td>{% if script.status != 2 and script.file %}<a href="{% url teleforma-exam-script-detail period.id script.id %}">{% endif %}{{ script.type }}{% if script.status != 2 and script.file %}</a>{% endif %}</td>
      <td>{% if script.author.username %}<a href="{% url teleforma-profile-detail script.author.username %}">{{ script.author.last_name }}</a>{% endif %}</td>
      <td>{% if script.author.username %}<a href="{% url teleforma-profile-detail script.author.username %}">{{ script.author.first_name }}</a>{% endif %}</td>
      <td>{{ script.date_added }}</td>