{% extends 'base.html' %}

{% block title %}
    Physics
{% endblock %}

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

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