{% load static %}
<div id="user_menu" class="menu">
    {% if user.has_usable_password %}
        <div id="menu_username">
            {% firstof user.get_short_name user.get_username %}
        </div>
    {% endif %}
    <button class="menu_button img_button" id="user_menu_button" title="User"></button>
    <div id="user_menu_panel" class="panel">
        <a href="/prefs/" class="links menu_links">Preferences</a>
        {% if user.is_active %}
            <a href="{% url 'history' %}" class="links menu_links">History</a>
            <a href="{% url 'admin:password_change' %}" class="links menu_links">Change pass</a>
            <a href="{% url 'logout' %}" class="links menu_links">Log out</a>
        {% else %}
            <a href="{% url 'login' %}" class="links menu_links">Log in</a>
        {% endif %}
        <a href="https://sosse.readthedocs.io/en/stable/" class="links menu_links">Documentation</a>
        <a href="{% url 'about' %}" class="links menu_links">About</a>
    </div>
</div>
{% if user.is_active and user.is_staff %}
    <div id="conf_menu" class="menu">
        <button class="menu_button img_button" id="conf_menu_button" title="Configuration"></button>
        <div id="conf_menu_panel" class="panel">
            <a href="/stats/" class="links menu_links">Statistics</a>
            <a href="/admin/" class="links menu_links">Administration</a>
        </div>
    </div>
{% endif %}
