{% extends "layout.html" %}
{% block content %}
<div class="container">
    <div class="row">
        <div class="col-md-3">
            <ul class="list-group position-fixed" style="width:20%">

                {% if request.url[21:] == url_for('staff_dashboard')%}
                    <a class="active list-group-item list-group-item-action list-group-item-success" href="{{ url_for('home') }}">Dashboard</a>
                {% else %}
                    <a class="list-group-item list-group-item-action list-group-item-success" href="{{ url_for('home') }}">Dashboard</a>
                {% endif %}

                {% if request.url[21:] == url_for('staff_profile')%}
                    <a class="active list-group-item list-group-item-action list-group-item-primary" href="{{ url_for('staff_profile') }}">Profile</a>
                {% else %}
                    <a class="list-group-item list-group-item-action list-group-item-primary" href="{{ url_for('staff_profile') }}">Profile</a>
                {% endif %}
                
                {% if request.url[21:] == url_for('create_exam_auto_form')%}
                    <a class="active list-group-item list-group-item-action list-group-item-success" href="{{ url_for('create_exam_auto_form') }}">Create Exam</a>
                {% else %}
                    <a class="list-group-item list-group-item-action list-group-item-success" href="{{ url_for('create_exam_auto_form') }}">Create Exam</a>
                {% endif %}

                {% if request.url[21:] == url_for('create_exam_manual_form')%}
                    <a class="active list-group-item list-group-item-action list-group-item-primary" href="{{ url_for('create_exam_manual_form') }}">Create Exam Manually</a>
                {% else %}
                    <a class="list-group-item list-group-item-action list-group-item-primary" href="{{ url_for('create_exam_manual_form') }}">Create Exam Manually</a>
                {% endif %}

                {% if request.url[21:] == url_for('create_subject_form')%}
                    <a class="active list-group-item list-group-item-action list-group-item-success" href="{{ url_for('create_subject_form') }}">Manage Subjects</a>
                {% else %}
                    <a class="list-group-item list-group-item-action list-group-item-success" href="{{ url_for('create_subject_form') }}">Manage Subjects</a>
                {% endif %}

                {% if request.url[21:] == url_for('unchecked_exams')%}
                    <a class="active list-group-item list-group-item-action list-group-item-primary" href="{{ url_for('unchecked_exams') }}">Unchecked Exams</a>
                {% else %}
                    <a class="list-group-item list-group-item-action list-group-item-primary" href="{{ url_for('unchecked_exams') }}">Unchecked Exams</a>
                {% endif %}
            </ul>
            <br>
        </div>
        <div class="col-md-9" id="staff-content">
            {% with messages = get_flashed_messages(with_categories=true) %}
            {% if messages %}
            {% for category, message in messages %}
            <div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
                {{ message }}
                <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
            </div>
            {% endfor %}
            {% endif %}
            {% endwith %}
            {% block staff_content %}
            {% endblock %}
        </div>
    </div>
</div>
{% endblock %}