From 64f90d5075e485cf58f2b50c0ddd833237d3ee98 Mon Sep 17 00:00:00 2001 From: Shane Frischkorn Date: Sun, 15 Sep 2013 20:17:45 +1000 Subject: [PATCH] Moved multiple choice questions to their own template --- .../templates/three_d_viewer/detail.html | 36 +++++-------------- .../templates/three_d_viewer/question.html | 23 ++++++++++++ 2 files changed, 32 insertions(+), 27 deletions(-) create mode 100644 three_d_viewer/templates/three_d_viewer/question.html diff --git a/three_d_viewer/templates/three_d_viewer/detail.html b/three_d_viewer/templates/three_d_viewer/detail.html index fc6b31d..5a55bba 100644 --- a/three_d_viewer/templates/three_d_viewer/detail.html +++ b/three_d_viewer/templates/three_d_viewer/detail.html @@ -1,14 +1,12 @@ {% extends "three_d_viewer/base.html" %} {% load static %} -{% load dajaxice_templatetags %} {% block includes %} {{ block.super }} -{% dajaxice_js_import %} {% endblock %} {% block loadscript %}"load();"{% endblock %} {% block pageheader %} -

{{ sample.name }}

-

{{ sample.description }}

+

{{ sample.name }}

+

{{ sample.description }}

{% endblock %} {% block sidebar %} -
- {% include "three_d_viewer/sampletree.html" %} -
-
-
- {% if sample.questions %} - {{ sample.questions.all.0 }}
- {% for answer in sample.questions.all.0.answers.all %} - {{ answer}}
- {% endfor %} - - {% endif %} +
+ {% include "three_d_viewer/sampletree.html" %} +
+
+ {% include "three_d_viewer/question.html" %}
-
{% endblock %} {% block content %} - -

+ +

{% endblock %} diff --git a/three_d_viewer/templates/three_d_viewer/question.html b/three_d_viewer/templates/three_d_viewer/question.html new file mode 100644 index 0000000..d60a3d7 --- /dev/null +++ b/three_d_viewer/templates/three_d_viewer/question.html @@ -0,0 +1,23 @@ +{% load dajaxice_templatetags %} +{% dajaxice_js_import %} + + + +{% if sample.questions.all %} +
+ {{ sample.questions.all.0 }}
+ {% for answer in sample.questions.all.0.answers.all %} + {{ answer}}
+ {% endfor %} + +
+{% endif %} \ No newline at end of file