{% load base_tags %}
{% load perm_tags %}
{% load i18n %}

{% has_perm user site_settings.change_setting as can_edit_setting %}
{% has_perm user profiles.view_profile as can_view_user %}
{% has_perm user profiles.change_profile as can_edit_user %}
{% has_perm user profiles.add_profile as can_add_user %}


<ul id="module-tabs" class="tabs">
    {% if user.is_authenticated %}
    <li class="dropdown" data-dropdown="dropdown">
        <a href="#" class="dropdown-toggle">{% trans "Tendenci" %}</a>
        <ul class="dropdown-menu">
            <a href="{% url dashboard %}" title="Tendenci Home Page">{% trans "Dashboard" %}</a>
            <li><a href="{% url profile.index %}">{% trans "My Profile" %}</a></li>
            <li><a href="{% url auth_logout %}">{% trans "Log Off" %}</a></li>
        </ul>
    </li>
    {% endif %}
    <li class="dropdown active" data-dropdown="dropdown">
        <a href="#" class="dropdown-toggle">{% firstof MODULE_USERS_LABEL 'Users' %}</a>
            <div>
            <ul class="dropdown-menu">
            {% if can_edit_setting %}
                <li><a href="{% url settings.index "module" "users" %}">{% trans "Settings" %}</a></li>
            {% endif %}
            <li><a href="{% url profile.search %}">{% trans "Search Users" %}</a></li>
            {% if can_add_user %}
                <li><a href="{% url profile.add %}">{% trans "Add User" %}</a></li>
            {% endif %}
            {% if user.profile.is_superuser %}
            <li class="divider"></li>
            <li><a href="{% url import.user_upload_add %}">{% trans "Import" %}</a></li>

            {% endif %}
        </ul>
        </div>
    </li>
    <li><a href="{% url groups %}">{% trans "Groups" %}</a></li>
</ul>
