36 lines
1.5 KiB
HTML
36 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}Antworten{% endblock %}
|
|
{% block content %}
|
|
<div class="page-head">
|
|
<a href="/fragebogen/{{ q.id }}" class="back-link">← {{ q.name }}</a>
|
|
<h1>Antworten: {{ q.name }}</h1>
|
|
<p class="muted">{{ rows | length }} ausgefüllt. Löschst du eine Antwort, kann die Person den Fragebogen erneut ausfüllen.</p>
|
|
</div>
|
|
{% if rows %}
|
|
<div class="qn-answers">
|
|
{% for r in rows %}
|
|
<section class="panel">
|
|
<div class="panel-head">
|
|
<div>
|
|
<h2>{{ r.user_name }} <span class="muted small">{{ r.user_id }}</span></h2>
|
|
<p class="muted small">{{ r.completed_at | datetime }}{% if r.roles %} · Rollen: {{ r.roles | join(", ") }}{% endif %}</p>
|
|
</div>
|
|
<form method="post" action="/fragebogen/antwort/{{ r.id }}/loeschen" data-confirm="Die Antwort von {{ r.user_name }} löschen?">
|
|
<input type="hidden" name="csrf" value="{{ csrf }}">
|
|
<input type="hidden" name="qid" value="{{ q.id }}">
|
|
<button type="submit" class="btn btn-sm btn-danger">Löschen</button>
|
|
</form>
|
|
</div>
|
|
<dl class="qn-dl">
|
|
{% for question, answer in r.answers.items() %}
|
|
<dt>{{ question }}</dt><dd>{{ answer }}</dd>
|
|
{% endfor %}
|
|
</dl>
|
|
</section>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<section class="panel"><p class="muted">Noch hat niemand den Fragebogen ausgefüllt.</p></section>
|
|
{% endif %}
|
|
<script src="/static/js/confirm.js?v=1"></script>
|
|
{% endblock %}
|