]> git.parisson.com Git - django_quiz.git/commitdiff
Added templates for respective views
authorNitesh Rijal <rijal.it@gmail.com>
Thu, 20 Mar 2014 02:13:58 +0000 (07:58 +0545)
committerNitesh Rijal <rijal.it@gmail.com>
Thu, 20 Mar 2014 02:13:58 +0000 (07:58 +0545)
templates/quiz/quiz_index.html [new file with mode: 0644]
templates/quiz/user_previous_exam.html [new file with mode: 0644]
templates/quiz/view_quiz_category.html [new file with mode: 0644]

diff --git a/templates/quiz/quiz_index.html b/templates/quiz/quiz_index.html
new file mode 100644 (file)
index 0000000..03ca776
--- /dev/null
@@ -0,0 +1,19 @@
+{% extends 'base.html' %}
+{% block title %}All Quiz{% endblock %}
+
+{% block left-sidebar %}
+<h2>Categories</h2>
+    {% if categories %}
+        <ul>
+        {% for category in categories %}
+            <li><a href="{{ category.get_absolute_url }}">{{ category.category }}</a></li>
+        {% endfor %}
+        </ul>
+    {% else %}
+        <p>There are no categories.</p>
+    {% endif %}
+{% endblock %}
+
+{% block right-sidebar %}
+<h2>Sponsored Advertisements</h2>
+{% endblock %}
diff --git a/templates/quiz/user_previous_exam.html b/templates/quiz/user_previous_exam.html
new file mode 100644 (file)
index 0000000..42bda82
--- /dev/null
@@ -0,0 +1,4 @@
+<td>{{ title }}</td>
+<td>{{ score }}</td>
+<td>{{ possible }}</td>
+<td>{{ percent }}</td>
diff --git a/templates/quiz/view_quiz_category.html b/templates/quiz/view_quiz_category.html
new file mode 100644 (file)
index 0000000..e8e1ad1
--- /dev/null
@@ -0,0 +1,15 @@
+{% extends 'base.html' %}
+{% block title %}Quizzes related to {{ category.category }}{% endblock %}
+
+{% block content %}
+    {% if quizzes %}
+    <h1>Quizzes in {{ category.category }}</h1>
+        <ul>
+        {% for quiz in quizzes %}
+            <li><a href="{{ BASE_URL }}/quiz/{{ quiz.url }}">{{ quiz.title }}</a></li>
+        {% endfor %}
+        </ul>
+    {% else %}
+        <p>There are no quizzes.</p>
+    {% endif %}
+{% endblock %}