{% extends "photologue/root.html" %}
{% load url from future %}
{% load roots_tags %}
{% load i18n %}

{% block title %}{% trans "Photo galleries" %}{% endblock %}

{% block content %}

{% if extended_latest %}
  {% for gallery, all_photos, sample in extended_latest %}
    {% define gallery_heading %}
    {{ gallery.title }}
    {% enddefine %}

    {% define gallery_content %}
      <div class="row">
      {% for photo in all_photos %}
        <a href="{{ photo.get_display_url }}" data-lightbox="{{ gallery.title  }}" title="{{ photo.caption }}">
          {% if photo in sample %}
            <span class="gallery-photo col-xs-3">
              <img src="{{ photo.get_thumbnail_url }}" class="{% block gallery-photo-class %}{% endblock %} img-responsive img-rounded" alt="{{ photo.title }}"/>
            </span>
          {% endif %}
        </a>
      {% endfor %}
    </div>
    {% enddefine %}

    {% define gallery_footer %}
    &nbsp;
    <div class="pull-right">
      <span class="glyphicon glyphicon-time"></span>
      {{ gallery.date_added }}
    </div>
    {% enddefine %}

    {% include "base/panel.html" with content_heading=gallery_heading content=gallery_content content_footer=gallery_footer %}

  {% endfor %}
{% else %}
    <p>{% trans "No galleries were found." %}</p>
{% endif %}

{% endblock %}

{% extends "photologue/root.html" %}
{% load url from future %}
{% load roots_tags %}
{% load i18n %}

{% block title %}{% trans "Photo galleries" %}{% endblock %}

{% block content %}

{% if extended_latest %}
  {% for gallery, all_photos, sample in extended_latest %}
    {% define gallery_heading %}
      <a href="{{ gallery.get_absolute_url }}">{{ gallery.title }}</a>
    {% enddefine %}

    {% define gallery_content %}
      <div class="row">
      {% for photo in all_photos %}
        <a href="{{ photo.get_display_url }}" data-lightbox="{{ gallery.title  }}" title="{{ photo.caption }}">
          {% if photo in sample %}
            <span class="gallery-photo col-xs-3">
              <img src="{{ photo.get_thumbnail_url }}" class="{% block gallery-photo-class %}{% endblock %} img-responsive img-rounded" alt="{{ photo.title }}"/>
            </span>
          {% endif %}
        </a>
      {% endfor %}
    </div>
    {% enddefine %}

    {% define gallery_footer %}
    &nbsp;
    <div class="pull-right">
      <span class="glyphicon glyphicon-time"></span>
      {{ gallery.date_added }}
    </div>
    {% enddefine %}

    {% include "base/panel.html" with content_heading=gallery_heading content=gallery_content content_footer=gallery_footer %}

  {% endfor %}
{% else %}
    <p>{% trans "No galleries were found." %}</p>
{% endif %}

{% endblock %}

Put back link to the gallery view
templates: Put back link to the gallery view
