{% extends 'base.html' %}

{% block title %}
    Longs
{% endblock %}

{% block css %}
{% endblock %}

{% block js %}
{% endblock %}



{% block content %}
{% endblock %}
{% block navigation %}
    <nav class="navbar navbar-expand-lg navbar-dark submenu">
        <div class="container-fluid">
            <a class="navbar-brand" href="{% url 'longs:index' %}">Longs</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#longsNavbarNav" aria-controls="longsNavbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="longsNavbarNav">
                <ul class="navbar-nav">
                    {% if request.user.is_authenticated %}
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'longs:exam_list' %}"><i class="bi bi-mortarboard"></i> Exams</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'longs:question_view' %}"><i class="bi bi-question-circle"></i> Questions</a>
                        </li>
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false"><i class="bi bi-file-earmark-plus"></i> Create</a>
                            <ul class="dropdown-menu">
                                <li><a class="dropdown-item" href="{% url 'longs:exam_create' %}" title="Create a new exam"><i class="bi bi-mortarboard"></i> Exam</a></li>
                                <li><a class="dropdown-item" href="{% url 'longs:question_create' %}" title="Create a new question"><i class="bi bi-question-circle"></i> Question</a></li>
                                <li><a class="dropdown-item" href="{% url 'longs:series_create' %}" title="Create a new image series">Create Series</a></li>
                            </ul>
                        </li>

                        {% if request.user.is_superuser %}
                            <li class="nav-item">
                                <a class="nav-link" href="{% url 'longs:user_answer_table_view' %}" title="User answers">Answers</a>
                            </li>
                        {% endif %}
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>
    <div class="small text-body-secondary d-none d-lg-block mt-1">
        Longs:
        {% if request.user.is_authenticated %}
            <a href="{% url 'longs:exam_list' %}">Exams</a> /
            <a href="{% url 'longs:exam_create' %}" title="Create a new exam">Create Exam</a> /
            <a href="{% url 'longs:question_view' %}">Cases</a> /
            <a href="{% url 'longs:series_view' %}">Series</a> /
            <a href="{% url 'longs:question_create' %}" title="Create a new long case">Create Case</a> /
        {% endif %}
        {% if request.user.is_superuser %}
            / <a href="{% url 'longs:user_answer_table_view' %}" title="User answers">Answers</a>
        {% endif %}
    </div>
{% comment %} </br>
Questions by:
<span id="authors-link"><a href="{% url 'longs:author_list' %}">author</a></span> {% endcomment %}
{% endblock %}