{% load i18n %}
{% load hk_generic %}

{% if mlist %}
<div class="hidden-tn hidden-xs col-sm-2">
<div class="row">
    {% if pagename != 'overview' %}
    <p><a href="{% url 'hk_list_overview' mlist_fqdn=mlist.name %}"
       class="btn btn-default btn-sm">
       <span class="fa fa-backward"></span>
       {% trans "List overview" %}</a></p>
    {% endif %}
    {% if pagename == 'thread' %}
    <p><a href="{% url 'hk_archives_latest' mlist_fqdn=mlist.name %}"
       class="btn btn-default btn-sm">
       <span class="fa fa-backward"></span>
       {% trans "All Threads" %}</a></p>
    {% endif %}

    <!-- Download as mbox -->
    {% if pagename == 'overview' %}
    <div class="btn-group">
        <button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown"
                aria-haspopup="true" aria-expanded="false">
            <i class="fa fa-download"></i>
            {% trans "Download" %} <span class="caret"></span>
        </button>
        <ul class="dropdown-menu">
            <li><a href="{{ export.recent }}">{% trans "Past 30 days" %} <small>(mbox)</small></a></li>
            <li><a href="{{ export.month }}">{% trans "This month" %} <small>(mbox)</small></a></li>
            <li role="separator" class="divider"></li>
            <li><a href="{% url 'hk_list_export_mbox' mlist_fqdn=mlist.name filename=mlist.name %}">
                {% trans "Entire archive" %} <small>(mbox)</small></a></li>
        </ul>
    </div>
    {% elif export %}
    <p><a href="{{ export.url }}" title="{{ export.title }}"
        class="btn btn-default btn-sm">
        <i class="fa fa-download"></i> {{ export.message }}</a>
    </p>
    {% endif %}
</div>
</div>
{% endif %}
