{% extends "repapp/base.html" %}
{% load static %}
{% load crispy_forms_tags %}
{% block title %}
    - Rückfrage zum Gerät
{% endblock title %}
{% block page_title %}
    Rückfrage zum Gerät
{% endblock page_title %}
{% block content %}
    <p>
        <a onclick="history.back()" class="btn btn-primary">Zurück</a>
    </p>
    <hr class="mt-0 mb-4">
    <h1 class="mt-2">Rückfrage zum Gerät</h1>
    <h2>{{ question.device.device }} - {{ question.device.manufacturer }} vom {{ question.date|date }}</h2>
    {% if show_guest %}<p>Gast: {{ question.device.guest.name }} ({{ question.device.guest.mail }})</p>{% endif %}
    {% if question.device.cafe %}<p>Repair-Café: {{ question.device.cafe.event_date|date }}</p>{% endif %}
    {% if question.organisator %}<p>Organisator: {{ question.organisator.name }}</p>{% endif %}
    {% if question.reparateur %}<p>Reparateur: {{ question.reparateur.name }}</p>{% endif %}
    <p>
        Offen:
        {% if question.open %}
            Ja
        {% else %}
            Nein
        {% endif %}
    </p>
    <hr class="mt-0 mb-4">
    <h3>Frage</h3>
    <div>{{ question.question|safe }}</div>
    <hr class="mt-0 mb-4">
    <h3>Antwort</h3>
    {% if question.answer %}
        <div>
            <pre>{{ question.answer|safe }}</pre>
        </div>
    {% else %}
        Der Gast hat noch nicht geantwortet.
    {% endif %}
{% endblock content %}
