vale981_fahrschule/templates/quizzes.html
2014-04-29 20:27:42 +02:00

97 lines
2.9 KiB
HTML

<!--Force IE6 into quirks mode with this comment tag-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Tobermann Truck</title>
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static 'css/quizz.css' %}"/>
<script type="text/javascript" src="{% static 'jquery/jquery.js' %}"></script>
</head>
<body>
{% if user.is_staff == False %}<img src="/media/pics/head.png" style="position: fixed;" width="100%">{% endif %}
{% if user.is_staff == True %}
<div id="framecontent">
<div class="innertube_men">
{% block menu %}
<div class="men_div">
<a id="men" href="/quiz/all">Übersicht</a>
</div>
{% if user.is_staff %}
<div class="men_div">
<a id="men" href="/admin">Admin</a>
</div>
<div class="men_div">
<a id="men" href="/quiz/auswertung">Ergebnisse</a>
</div>
{% endif %}
{% if user.is_authenticated %}
<div class="men_div">
<a href="/logout/" id="men"> Logout</a>
</div>
{% else %}
<div class="men_div">
<a href="/login/" id="men"> Login</a>
</div>
{% endif %}
{% endblock %}
</div>
</div>
{% endif %}
{% if user.is_staff == False %}<div id="maincontent">{% else %}<div id="maincontent_without_head">{% endif %}
<div class="innertube" align="center">
{% block content %}
{% if user.is_authenticated %}
{% block main %}
<br>
<div id="main_content">
{% if quizes.count == 0 %}
<h1 id="main_link" align="center">Keine Fragebogen vorhanden!</h1>
{% elif user_quiz.allowed_quiz.count == 0 %}
<h1 id="main_link" align="center">Keine Fragebogen vorhanden!</h1>
{% endif %}
<br>
<table class="bordered" style="width: 100%;">
{% for quiz in user_quiz.allowed_quiz.all %}
<tr style="width: auto; background-color:{{ quiz.color }};"><td onclick="document.location = '/quiz/get/{{ quiz.id }}';"><br><x id="main_link">{{ quiz.title }}</x>
<br>
{{ quiz.description }}<br>
<br></td></tr>
{% endfor %}
</table>
</div>
<br>
{% endblock %}
{% else %}
<h1 id="main_link" align="center">Sie sind nicht angemeldet! Bitte <a href="/login">einloggen!</a> </h1>
{% endif %}
<br>
<a href="/logout/"><input type="submit" class="button" value="Schließen"/></a>
{% endblock %}
</div>
</div>
</body>
</html>