{% extends 'longs/exams.html' %}

{% block navigation %}
    {{ block.super }}
    {% include 'generic/exam_overview_headers.html' %}
{% endblock navigation %}

{% block content %}

    {% load thumbnail %}
    <div class="longs">


        <ol id="full-question-list" class="sortable">
            {% for question in questions.all %}

                <li data-question_pk={{question.pk}}>
                    <span class="flex-col-2">
                        Description: {{ question.description}}
                        <br />
                        History: {{ question.history}}
                        <br />
                        <div>
                            Author(s): {{question.get_authors}}
                        </div>
                        <div>
                            <a href="{% url 'longs:exam_question_detail' exam.id forloop.counter0 %}"
                               title="View the question">View</a> / <a href="{% url 'longs:long_update' question.id %}"
                                                                    title="Edit the question">Edit</a>
                            <span class="id"><a href="{% url 'longs:question_detail' question.id %}">[id:
                                {{question.pk}}]</a></span>
                        </div>
                    </span>
                    <span class="flex-col-3">
                        {% for seriesdetail in question.seriesdetail_set.all %}
                            <div class="series-block">
                                Series {{forloop.counter }}:<br />
                                {{seriesdetail.longseries.get_block}}
                            </div>
                        {% empty %}
                            No series
                        {% endfor %}
                    </span>
                </li>
            {% endfor %}
        </ol>
        <div>
            Author: {% for author in exam.author.all %}
                {{ author }},
            {% endfor %}
        </div>

        {% include 'generic/exam_footer.html' %}

    </div>
    {% include 'exam_overview_js.html' %}
{% endblock %}
