{% extends "porticus/base.html" %}
{% load i18n mptt_tags thumbnail %}

{% block head_title %}{{ gallery_object.name }} - {{ block.super }}{% endblock %}

{% block porticus_content %}
<div class="row">
    <div class="gallery-detail-{{ gallery_object.id }}">
        <h3>{{ gallery_object.name }}</h3>
        {% if gallery_object.description %}
            <p>{{ gallery_object.description }}</p>
        {% endif %}
        
        <hr>
        
        <ul class="root">
            {% recursetree album_list %}
                <li>{% spaceless %}
                    <div class="row panel">
                        <div class="small-6 large-3 columns item equalized-item">
                        <a href="{% url 'porticus-album-detail' gallery_slug=gallery_object.slug album_slug=node.slug %}">
                            <div class="large-6 columns thumb">
                                {% if node.image  %}
                                    <img src="{% thumbnail node.image 105x80 crop %}" alt="">
                                {% endif %}
                            </div>
                            <div class="large-6 columns content">
                                <p>{{ node.name }}</p>
                            </div>
                        </a>
                        </div>
                    </div>
                    {% endspaceless %}
                    {% if not node.is_leaf_node %}
                        <ul class="children">
                            {{ children }}
                        </ul>
                    {% endif %}
                </li>
            {% endrecursetree %}
        </ul>
</div>
{% endblock%}