{% comment %}
Display a list of the accounts we're showing photos for.

Expects:
* account_list - All the accounts we're showing photos for.
* count - How many photos, favorites or photosets are available.
* list_type - 'recent' (default), 'favorites' or 'photosets'.
{% endcomment %}

{% load l10n %}

<div class="card">
    <div class="card-block">
        <p class="card-text">
            {% with list_type=list_type|default_if_none:'recent' %}
                {{ count|localize }}
                {% if list_type == 'photosets' %}
                    Album{{ count|pluralize }}
                {% else %}
                    Photo{{ count|pluralize }}
                    {% if list_type == 'favorites' %}
                        favorited
                    {% endif %}
                {% endif %}
            {% endwith %}
            {% if account_list|length == 1 %}
                by <a href="{{ account_list.0.get_absolute_url }}">{{ account_list.0.user.name }}</a>
            {% else %}
                by {{ account_list|length }}&nbsp;user{{ account_list|length|pluralize }}
            {% endif %}
        </p>
    </div>

    {% if account_list|length > 1 %}
        <ul class="list-group list-group-flush">
            {% for account in account_list %}
                <li class="list-group-item">
                    <a href="{{ account.get_absolute_url }}">
                        {{ account.user.name }}
                    </a>
                </li>
            {% endfor %}
        </ul>
    {% endif %}
</div>


