{% extends "admin/base.html" %}

{% block access_control %}
    <ul class="nav navbar-nav navbar-right">
        {% if g.admin_user %}
            <li role="presentation" class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-expanded="false">
                    <span class="label label-danger">{{ g.admin_user.username }}</span>
                    <span class="caret"></span>
                </a>
                <ul class="dropdown-menu" role="menu" >
                    <li><a href="{{ url_for('adminauthview.logout') }}">退出</a></li>
                </ul>
            </li>
        {% else %}
            <li><a href="{{ url_for('adminauthview.login') }}" >登录</a></li>
        {% endif %}
    </ul>
{% endblock %}
