32518a3e7d74e0adbd70f19785aeb7a38a919837
[koed-quiz.git] / apps / quiz / templates / quiz / question_detail.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load url from future %}
4
5
6 {% block "title" %}{{ question.quiz.name }}{% endblock %}
7 {% block "header" %}{{ question.quiz.name }}{% endblock %}
8
9
10 {% block "body" %}
11
12
13 <h2>{{ question.title }}</h2>
14 {% if question.text %}
15     <div>
16     {{ question.text|safe }}
17     </div>
18 {% endif %}
19
20 <div>
21
22
23
24 <form class='question' method='post'>
25 {% csrf_token %}
26 {{ form.answer.errors }}
27 {{ form.answer }}
28
29 {% if valid %}
30     <button>{% trans "Send answer" %}</button>
31
32     {% if previous_url %}
33         <a class='button' href='{{ previous_url }}'>{% trans "Back to last question" %}</a>
34     {% endif %}
35
36 {% else %}
37     {% if valid_url %}
38         <a class='button' href='{{ valid_url }}'>{% trans "Back to my test" %}</a>
39     {% else %}
40         <a class='button' href='{% url "quiz" %}'>{% trans "Start from the beginning" %}</a>
41     {% endif %}
42 {% endif %}
43
44 </form>
45 </div>
46
47
48 {% if question.description %}
49     <div id='description'>
50     {{ question.description|safe }}
51     </div>
52 {% endif %}
53
54
55 {% endblock %}