<div class="long {% if question.scrapped %}long-scrapped{% endif %}">
    <div class="date">
        {{ question.created_date|date:"d/m/Y" }}
    </div>
    <div class="id">
        ID: {{ question.id }}
    </div>
    <p class="pre-whitespace"><b>Description:</b> {{ question.description }}</p>

    <p class="pre-whitespace"><b>History:</b> {{ question.history }}</p>

    <div class="pre-whitespace multi-image-block"><b>Series:</b>
        {% for series in question.series.all %}
            <span class="series-block">
                <span>
                    <span class="series-block-series-number">Series {{ forloop.counter }}:</span>
                    <a href="{% url 'longs:series_detail' pk=series.pk %}">
                        {{series.get_block}}
                    </a>

                    <br>
                    <span class="series-block-popup-link">
                        <a href="#"
                           onclick="return window.create_popup_window('/longs/series/{{series.pk}}', 'Series')">Popup</a>
                    </span>
                </span>
            </span>
        {% endfor %}
        <a href="{% url 'longs:long_series_id_create' pk=question.pk %}">Add new series</a><br />
    </div>
    <p><b>Author(s):</b> {% for author in question.author.all %} <a
        href="{% url 'longs:author_detail' pk=author.pk %}">{{author}}</a>, {% endfor %}</p>
    <p><b>Checked by:</b> {% for verified in question.verified.all %} <a
        href="{% url 'longs:verified_detail' pk=verified.pk %}">{{verified}}</a>, {% endfor %}</p>
    {% comment %} <p><b>Scrapped:</b> {{ question.scrapped }} <a
            href="{% url 'longs:long_scrap' pk=question.pk %}">(toggle)</a> {% endcomment %}

    <div class="long-answer">
        <p class="pre-whitespace"><b>Feedback:</b>
                <pre>{{ question.feedback | safe}}</pre>
        </p>
        <details>
            <summary>
                <b>Model answers</b>
            </summary>

            {% if not question.model_differential_diagnosis and not question.model_interpretation and not question.model_management and not question.model_observations and not question.model_principle_diagnosis %}
                <div class="alert alert-warning">No model answers.
                    {% if can_edit %}
                        <a href="{% url 'longs:long_update' pk=question.pk %}">Add some nowr.</a>
                    {% endif %}
                </div>
            {% endif %}

            <p class="pre-whitespace"><b>Observations:</b>
                    <pre>{{ question.model_observations|default:"None" }}</pre>
            </p>
            <p class="pre-whitespace"><b>Interpretation:</b>
                    <pre>{{ question.model_interpretation|default:"None" }}</pre>
            </p>
            <p class="pre-whitespace"><b>Principle Diagnosis:</b>
                    <pre>{{ question.model_principle_diagnosis|default:"None" }}</pre>
            </p>
            <p class="pre-whitespace"><b>Differential Diagnosis:</b>
                    <pre>{{ question.model_differential_diagnosis|default:"None" }}</pre>
            </p>
            <p class="pre-whitespace"><b>Managment:</b>
                    <pre>{{ question.model_management|default:"None" }}</pre>
            </p>
        </details>

        <p class="pre-whitespace">
            <details>
                <summary><b>Mark Scheme:</b></summary>
                    <pre>{{ question.mark_scheme | safe}}</pre>
            </details>
        </p>
    </div>
</p>
<div>
    Exam(s): {% for exam in question.exams.all %}
        <a href="{% url 'longs:exam_overview' pk=exam.pk %}">{{ exam }}</a>,
    {% endfor %}
</div>
<div>
    {% include 'question_notes.html' %}

</div>
<div>
    JSON creation time: {{question.json_creation_time}} ({{question.json_creation_time|date:"c"}}),
    JSON creation id: {{question.question_json_id}}
    {% if question.recreate_json %}[JSON out of date]{% endif %}
</div>
<a href="{% url 'longs:question_json' pk=question.pk %}">JSON</a>
<a href="{% url 'longs:question_json_unbased' pk=question.pk %}">JSON (unbased)</a>
<a href="{% url 'longs:question_json_recreate' pk=question.pk %}">Refresh JSON cache</a>