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

{% block breadcrumbs %}
    <li class="breadcrumb-item"><a href="{% url 'ditto:home' %}">Home</a></li>
    <li class="breadcrumb-item"><a href="{% url 'flickr:home' %}">Flickr</a></li>
    <li class="breadcrumb-item"><a href="{% url 'flickr:user_detail' nsid=user.nsid %}">{{ user.name }}</a></li>
    <li class="breadcrumb-item"><a href="{% url 'flickr:user_photoset_list' nsid=user.nsid %}">Albums</a></li>
    <li class="breadcrumb-item active">{{ photoset.title }}</li>
{% endblock %}

{% block content %}

    <h1 class="my-4">
        {% block title %}
            {{ photoset.title }}
        {% endblock %}
    </h1>

    <div class="row">
        <div class="col-md-3">
            <div class="card mb-3">
                <div class="card-header">
                    An album by <a href="{% url 'flickr:user_detail' nsid=photoset.user.nsid %}">{{ photoset.user.name }}</a>
                </div>
                {% if photoset.description %}
                    <div class="card-body">
                        <p class="card-text">
                            {{ photoset.description|safe }}
                        </p>
                    </div>
                {% endif %}
                <ul class="list-group list-group-flush">
                    <li class="list-group-item">
                        {% include 'flickr/includes/photoset_counts.html' with photoset=photoset only %}
                    </li>
                    <li class="list-group-item">
                        {{ photoset.view_count }} view{{ photoset.view_count|pluralize }}
                    </li>
                    <li class="list-group-item">
                        {{ photoset.comment_count }} comment{{ photoset.comment_count|pluralize }}
                    </li>
                    <li class="list-group-item">
                        <a href="{{ photoset.permalink }}">At Flickr.com</a></li>
                    </li>
                    <li class="list-group-item text-muted">
                        {% load ditto_core %}
                        <small>As of {% display_time photoset.fetch_time %}</small>
                    </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 %}

