2016-02-14 16:15:13 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
{% load staticfiles %}
|
|
|
|
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
|
|
|
<link href="{% static 'images/favicon.ico' %}" rel="shortcut icon">
|
2016-02-21 22:41:24 +01:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
2016-02-14 16:15:13 +01:00
|
|
|
<title>{{ settings.title }}</title>
|
2016-02-21 22:41:24 +01:00
|
|
|
|
|
|
|
<!-- Latest compiled and minified CSS -->
|
|
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
|
|
|
|
|
|
|
<!-- Optional theme -->
|
|
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
|
2016-03-05 12:22:46 +01:00
|
|
|
|
|
|
|
<!-- Clipboard.js -->
|
|
|
|
<script src="https://cdn.jsdelivr.net/clipboard.js/1.5.8/clipboard.min.js"></script>
|
|
|
|
|
|
|
|
<script language='javascript' type="text/javascript">
|
|
|
|
var url = location.protocol + '//' + location.host + '/start';
|
|
|
|
|
|
|
|
function getUserUrl(token) {
|
|
|
|
return url + "?token=" + token;
|
|
|
|
}
|
|
|
|
</script>
|
2016-02-14 16:15:13 +01:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div class="container">
|
|
|
|
<img src="{{ settings.logo }}" class="mainLogo">
|
|
|
|
<h1>{{ settings.title }}</h1>
|
|
|
|
<p>Welcome to the statistic backend!</p>
|
|
|
|
<hr/>
|
|
|
|
<div class="margin50" ></div>
|
|
|
|
|
|
|
|
<h2>Users</h2>
|
2016-02-21 22:41:24 +01:00
|
|
|
<table class="table">
|
2016-02-14 16:15:13 +01:00
|
|
|
<tr class="table_headline">
|
|
|
|
<td>name</td>
|
|
|
|
<td>questions answered</td>
|
|
|
|
<td>last seen</td>
|
2016-03-05 12:22:46 +01:00
|
|
|
<td>url (click to copy)</td>
|
2016-02-14 16:15:13 +01:00
|
|
|
</tr>
|
|
|
|
{% for user in users %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ user.name }}</td>
|
|
|
|
<td>{{ user.questions_answered }}</td>
|
|
|
|
<td>{{ user.last_seen }}</td>
|
2016-03-05 12:22:46 +01:00
|
|
|
<td><a class="userlink" id="userlink{{ user.token }}" href="javascript:void(0)"></a></td>
|
|
|
|
<script>document.getElementById("userlink{{ user.token }}").innerHTML = getUserUrl('{{ user.token }}')</script>
|
2016-02-14 16:15:13 +01:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="margin50" ></div>
|
|
|
|
|
|
|
|
<h2>Questions</h2>
|
2016-02-21 22:41:24 +01:00
|
|
|
<table class="table">
|
2016-02-14 16:15:13 +01:00
|
|
|
<tr class="table_headline">
|
|
|
|
<td>title</td>
|
|
|
|
<td>answers</td>
|
2016-02-17 23:58:07 +01:00
|
|
|
<td>correct</td>
|
|
|
|
<td>correct percentage</td>
|
2016-02-14 16:15:13 +01:00
|
|
|
</tr>
|
|
|
|
{% for question in questions %}
|
|
|
|
<tr>
|
|
|
|
<td>{{ question.title }}</td>
|
|
|
|
<td>{{ question.answers }}</td>
|
2016-02-17 23:58:07 +01:00
|
|
|
<td>{{ question.correct_answers }}</td>
|
|
|
|
<td>{{ question.correct_answers_percentage }}</td>
|
2016-02-14 16:15:13 +01:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="margin50" ></div>
|
|
|
|
<hr/>
|
2016-02-21 22:41:24 +01:00
|
|
|
<div class="container footer">
|
|
|
|
{{ settings.footer }}
|
|
|
|
</div>
|
|
|
|
|
2016-03-05 12:22:46 +01:00
|
|
|
<script language='javascript' type="text/javascript">
|
|
|
|
new Clipboard('.userlink', {
|
|
|
|
text: function(trigger) {
|
|
|
|
return trigger.text;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
2016-02-14 16:15:13 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
2016-03-19 17:56:32 +01:00
|
|
|
</html>
|
|
|
|
|