{% extends 'flickr/base.html' %}
{% load l10n %}

{% block breadcrumbs %}
    <li><a href="{% url 'ditto:home' %}">Home</a></li>
    <li><a href="{% url 'flickr:home' %}">Flickr</a></li>
    <li><a href="{% url 'flickr:user_detail' nsid=user.nsid %}">{{ user.name }}</a></li>
    <li class="active">{{ tag.name }}</li>
{% endblock %}

{% block content %}

    <h1 class="m-y-2">
        {% block title %}
            Photos by {{ user.name }} tagged with “{{ tag.name }}”
        {% endblock %}
    </h1>

    <div class="row">
        <div class="col-md-3">
            <div class="card">
                <div class="card-block">
                    <p class="card-text">
                        {{ page_obj.paginator.count|localize }} photo{{ page_obj.paginator.count|pluralize }}
                    </p>
                </div>
                <ul class="list-group list-group-flush">
                    <li class="list-group-item">
                        <a href="{% url 'flickr:user_detail' nsid=user.nsid %}">All {{ user.name }}’s photos</a>
                    </li>
                    <li class="list-group-item">
                        <a href="{% url 'flickr:tag_detail' slug=tag.slug %}">All photos tagged with “{{ tag.name }}”</a>
                    </li>
                    <li class="list-group-item">
                        <a href="{% url 'flickr:tag_list' %}">The most common tags</a>
                    </li>
                </ul>
            </div>
        </div> <!-- .col -->

        <div class="col-md-9">
            {% include 'flickr/includes/sorting.html' with request=request order=order only %}

            {% include 'flickr/includes/photo_columns.html' with request=request photo_list=photo_list order=order page_obj=page_obj perms=perms only %}
        </div> <!-- .col -->
    </div> <!-- .row -->


{% endblock content %}

