album.html 2.01 KB
Newer Older
1
{% extends 'base.html' %}
2
{% load staticfiles i18n thumbnail shared_thumbnail %}
3

Joost Rijneveld's avatar
Joost Rijneveld committed
4
5
6
7
8
{% block css_head %}
{{ block.super }}
<link href="{% static "photos/css/style.css" %}" rel="stylesheet" type="text/css">
{% endblock %}

9
10
11
{% block body %}
<h1>{{ album.title }}</h1>
<h2>{{ album.date|date:"d-m-Y" }}</h2>
12
13
14
15
16
17
18
19
{% if album.shareable %}
<p class="tcenter">
    {% trans "Note: This album can be shared with people outside the association by sending them the following link:" %}<br>
    <small><a href="{% url 'photos:shared_album' album.slug album.access_token %}">
        {{ request.get_host }}{% url 'photos:shared_album' album.slug album.access_token %}
    </a></small>
</p>
{% endif %}
20
21
<div class="gallery">
    <ul class="gallery-photos row">
22
        {% for photo in photos %}
23
        <li class="post gallery-photo span3 has-overlay {% if forloop.counter0|divisibleby:4 %}first-child{% endif %}">
24
            <a data-fancybox-rotation="{{ photo.rotation }}" class="gallery-box" rel="gallery"
25
26
27
            {% if album.shareable %}
            data-download="{% url 'photos:shared-download' album.slug album.access_token photo %}" href="{% shared_thumbnail album.slug album.access_token photo '1024x768' fit=False %}"
            {% else %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
28
            data-download="{% url 'photos:download' photo %}" href="{% thumbnail photo.file '1024x768' fit=False %}"
29
            {% endif %}>
30
31
                <span class="post-inner">
                    <span class="inner-img">
32
                        {% if album.shareable %}
33
                        <img class="rotate{{ photo.rotation }}" src="{% shared_thumbnail album.slug album.access_token photo '220x220' %}" alt="" />
34
                        {% else %}
Sébastiaan Versteeg's avatar
Sébastiaan Versteeg committed
35
                        <img class="rotate{{ photo.rotation }}" src="{% thumbnail photo.file '220x220' %}" alt="" />
36
                        {% endif %}
37
38
39
40
41
42
43
44
45
46
                    </span>
                    <span class="post-overlay">
                    </span>
                </span>
            </a>
        </li>
        {% endfor %}
    </ul>
</div>
{% endblock %}