Files
Tablequizwiki/templates/quiz/as_table.html

84 lines
1.9 KiB
HTML
Raw Normal View History

2024-07-03 21:41:03 +02:00
{% load strings %}
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<style type="text/css">
* {
font-family: Ubuntu, Verdana, 'sans-serif';
}
table {
border: 0;
border-collapse: collapse;
}
tr {
margin: 0;
padding: 0;
}
th,
td {
border: 1px solid #000;
border-collapse: collapse;
padding: .5em 1em;
margin: 0;
text-align: left;
vertical-align: top;
}
table.nav td {
border: 0;
}
.text-right {
text-align: right;
}
</style>
</head>
<body>
<h1>{{ name.title }}</h1>
{% if not print %}
<table class="nav">
<tr>
<td>Download:</td>
<td><a href="{{ request.path | replace:'as_table,as_zip' }}" target="_blank">ZIP (with all medias)</a></td>
<td><a href="{{ request.path | replace:'as_table,as_pdf' }}" target="_blank">PDF</a></td>
<td><a href="{{ request.path | replace:'as_table,as_csv' }}" target="_blank">CSV</a></td>
</tr>
</table>
<hr/>
{% endif %}
<table cellpadding="0" cellspacing="0">
<tr>
<th>#</th>
{% for key in items.0.keys %}
<th>{{ key.title }}</th>
{% endfor %}
</tr>
{% for row in items %}
<tr class="row">
<td>{{ forloop.counter }}</td>
{% for name, val in row.items %}
<td class="col">
{% if name != 'medias' and name != 'links' %}
{{ val }}
{% else %}
{% for it in val %}
<li>{{ it }}</li>
{% endfor %}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</table>
<!--
<pre>
{# json #}
</pre>
-->
</body>
</html>