<nav class="navbar navbar-expand-lg navbar-light bg-light" style="margin-bottom: 40px">
    <a class="navbar-brand" href="{% url "aerp-common:index" %}">{{ site_name }}</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
            aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item">
                <a class="nav-link" href="{% url "aerp-common:index" %}">首页</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{% url "aerp-common:support" %}">帮助</a>
            </li>
            <li class="nav-item active">
                {% if user.is_superuser %}
                    <a class="nav-link" href="/admin/" target="_blank">管理后台</a>
                {% endif %}
            </li>
            <li class="nav-item">
                {% if user.is_authenticated %}
                    <a class="nav-link" href="{% url "aerp-user:logout" %}">{{ user }}，登出</a>
                {% else %}
                    <a class="nav-link" href="{% url "aerp-user:login" %}">登录</a>
                {% endif %}
            </li>
            <li class="list-item">
                <a class="nav-link" href="{% url "aerp-user:register" %}">注册</a>
            </li>
        </ul>
    </div>
</nav>
