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

{% has_perm user site_settings.change_setting as can_edit_setting %}
{% has_perm user files.add_file as can_add_file %}

<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">{% trans "Files" %}</a>
            <div>
            <ul class="dropdown-menu">
                <li><a href="{% url files %}">{% trans "File List" %}</a></li>
                {% if can_add_file %}
                <li><a href="{% url file.add %}">{% trans "Add a File" %}</a></li>
                <li><a href="{% url file.bulk_add %}">{% trans "Add Multiple Files" %}</a></li>
                {% endif %}
                <li class="divider"></li>
                {% if user.profile.is_staff %}
                <li><a href="{% url file.report_most_viewed %}">{% trans "Most Viewed" %}</a></li>
                {% endif %}
            </ul>
            </div>
    </li>
    {% if MODULE_ARTICLES_ENABLED %}
    <li><a href="{% url articles %}">{% firstof MODULE_ARTICLES_LABEL trans 'Articles' %}</a></li>
    {% endif %}
    {% if MODULE_NEWS_ENABLED %}
    <li><a href="{% url news %}">{% firstof MODULE_NEWS_LABEL trans 'News' %}</a></li>
    {% endif %}
</ul>
