{% extends 'base.html' %}

{% block title %}
    Anatomy
{% endblock %}

{% block navigation %}

    <nav class="navbar navbar-expand-lg navbar-dark submenu">
        <div class="container-fluid">
            <a class="navbar-brand" href="{% url 'anatomy:index' %}">Anatomy</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#anatomyNavbarNav" aria-controls="anatomyNavbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="anatomyNavbarNav">
                <ul class="navbar-nav">
                    {% if request.user.is_authenticated %}
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'anatomy:exam_list' %}"><i class="bi bi-mortarboard"></i> Exams</a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link" href="{% url 'anatomy: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 'anatomy:exam_create' %}" title="Create a new exam"><i class="bi bi-mortarboard"></i> Exam</a></li>
                                <li><a class="dropdown-item" href="{% url 'anatomy:question_create' %}" title="Create a new question"><i class="bi bi-question-circle"></i> Question</a></li>
                            </ul>
                        </li>

                        {% if request.user.is_superuser %}
                            <li class="nav-item">
                                <a class="nav-link" href="{% url 'anatomy:user_answer_table_view' %}" title="User answers">Answers</a>
                            </li>
                        {% endif %}
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>
{% endblock %}
{% block content %}
    {% if simple_content %}
        {{simple_content}}
    {% endif %}

{% endblock %}
