{% extends 'base-site-authenticated.html' %}

{% import 'macros/navbar.html' as nav with context %}


{% block content %}

    <div class="container">

        <div class="row">

            <div class="col-2">

                <ul class="nav flex-column sticky-top my-3">
                    {{ nav.link('auth.edit_user', 'Edit profile') }}
                    {{ nav.link('auth.change_password', 'Change password') }}
                    {% if current_user.has_permission('register-user') %}
                        {{ nav.link('auth.users', 'Manage users') }}
                        {{ nav.link('auth.register', 'Register new user') }}
                    {% endif %}
                    {% if current_user.has_permission('edit-groups') %}
                        {{ nav.link('auth.index_groups', 'Manage groups') }}
                    {% endif %}
                    {% if current_user.is_admin %}
                        {{ nav.link('files.delete_orphans', 'Delete orphan files') }}
                    {% endif %}
                </ul>

            </div>

            <div class="col-10">

                {{ flash.flash() }}

                {% block content2 %}{% endblock %}

            </div>

        </div>

    </div>

{% endblock %}