codekasten/umfrage_kirchenplatz2012/templates/db.html
lars cac5ec5db2 Datenbank-Zusammenfassung hinzugefuegt
Antworten werden nun nur noch gespeichert, wenn das Text- oder Bewertungsfeld nicht leer ist
2012-08-18 01:21:43 +00:00

47 lines
1 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:py="http://genshi.edgewall.org/"
lang="de">
<xi:include href="layout.html" />
<head/>
<body>
<h1>Datenbank</h1>
<h2>Antworten</h2>
<table border="1">
<tr>
<th>Frage #</th>
<th>Anzahl</th>
</tr>
<tr py:for="question in Question.select().orderBy('weight')">
<td>${question.weight}</td>
<td>${Answer.selectBy(question=question, option=Option.select()[0]).count()}</td>
</tr>
</table>
<h2>Sitzungen</h2>
<table border="1">
<tr>
<th>Sitzung #</th>
<th>Datum</th>
<th>Fragen</th>
<th>versandt</th>
<th>Standard?</th>
</tr>
<tr py:for="session in Session.select().orderBy('created')">
<td>${session.id}</td>
<td>${session.created}</td>
<td>${Answer.selectBy(session=session).count()}</td>
<td>${Submission.selectBy(session=session).count() > 0}</td>
<td>${Submission.selectBy(session=session, to_default_destination=True).count() > 0}</td>
</tr>
</table>
</body>
</html>