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