{% comment %}
Display information about a Pinboard account.

Expects:

* account -- A Pinboard Account object.
* perms -- Optional, Django perms.

{% endcomment %}

{% load l10n %}

<div class="card mb-3">
    <div class="card-block">
        <h4 class="card-title mb-0 pinboard-user-name">
            {{ account.username }}
        </h4>
    </div>
    <ul class="list-group list-group-flush">
        <li class="list-group-item">
            {% with count=account.public_bookmarks_count %}
                {{ count|localize }} bookmark{{ count|pluralize }}
            {% endwith %}
        </li>
        {% if account.is_active %}
            <li class="list-group-item">
                <a class="card-link" href="{{ account.url }}">At Pinboard.in</a>
            </li>
        {% endif %}

        {% if perms and perms.pinboard.can_change_account %}
            <li class="list-group-item">
                <a href="{% url 'admin:pinboard_account_change' account.id %}" title="Edit this account in the Django Admin">Edit</a>
            </li>
        {% endif %}
    </ul>
</div>
