{% load i18n %}
{% load nav_helpers %}

{% if user.is_authenticated  %}
<ul class="nav nav-pills">
    <li role="presentation" class="{% nav_active_class current 'list_summary' %}"><a href="{% url 'list_summary' list.list_id %}">{% trans 'Info' %}</a></li>
    {% if user.is_superuser or user.is_list_owner or user.is_list_moderator %}
        <li role="presentation" class="{% nav_active_class current 'list_subscription_requests' %}"><a href="{% url 'list_subscription_requests' list.list_id %}">{% trans 'Subscription requests' %}</a></li>
        <li role="presentation" class="{% nav_active_class current 'list_held_messages' %}"><a href="{% url 'list_held_messages' list.list_id %}">{% trans 'Held messages' %}</a></li>
    {% endif %}
    {% if user.is_superuser or user.is_list_owner %}
        <li role="presentation" class="{% nav_active_class current 'list_members' %} dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown"
               role="button" aria-haspopup="true" aria-expanded="false">
                {% trans 'Members' %}<span class="caret"></span>
            </a>
            <ul class="dropdown-menu">
              <li><a href="{% url 'list_members' list.list_id 'owner' %}">{% trans 'Owners' %}</a></li>
              <li><a href="{% url 'list_members' list.list_id 'moderator' %}">{% trans 'Moderators' %}</a></li>
              <li><a href="{% url 'list_members' list.list_id 'subscriber' %}">{% trans 'Subscribers' %}</a></li>
            </ul>
        </li>
        <li role="presentation" class="{% nav_active_class current 'list_settings' %}"><a href="{% url 'list_settings' list.list_id %}">{% trans 'Settings' %}</a></li>
        <li role="presentation" class="{% nav_active_class current 'mass_subscribe' %}"><a href="{% url 'mass_subscribe' list.list_id %}">{% trans 'Mass subscribe' %}</a></li>
        <li role="presentation" class="{% nav_active_class current 'mass_removal' %}"><a href="{% url 'mass_removal' list.list_id %}">{% trans 'Mass removal' %}</a></li>
        <li role="presentation" class="{% nav_active_class current 'list_bans' %}"><a href="{% url 'list_bans' list.list_id %}">{% trans 'Banned addresses' %}</a></li>
        <li role="presentation" class="{% nav_active_class current 'list_delete' %}"><a href="{% url 'list_delete' list.list_id %}">{% trans 'Delete list' %}</a></li>
    {% endif %}
</ul>
{% endif %}

<div class="page-header">
    {% if current == 'list_summary' %}
        <h1>{{ list.display_name }} <small>{{ list.fqdn_listname }}</small></h1>
    {% else %}
        <h3>{{ title }} {% if subtitle %}<small>{{ subtitle }}</small>{% endif %}</h3>
    {% endif %}
</div>
