user_pictures.jinja 1.01 KB
Newer Older
Skia's avatar
Skia committed
1
2
3
4
5
6
7
8
{% extends "core/base.jinja" %}
{% from "core/macros.jinja" import user_link_with_pict, delete_godfather %}

{% block title %}
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s pictures{% endtrans %}
{% endblock %}

{% block content %}
Skia's avatar
Skia committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{% set album = None %}
{% set new_album = True %}
{% for r in profile.pictures.exclude(picture=None).order_by('-picture__parent__id', 'id') -%}
    {%- if album != r.picture.parent %}
        {%- if album %}
    </div>
        {% endif -%}
    {% set new_album = True %}
    {% set album = r.picture.parent %}
    <div style="padding: 10px">
        <h4>{{ album.name }}</h4>
        <hr>
    {% else %}
        {% set new_album = False %}
    {%- endif %}
        <div class="picture">
            <a href="{{ url("sas:picture", picture_id=r.picture.id) }}#pict">
                <img src="{{ r.picture.as_picture.get_download_thumb_url() }}" alt="{{ r.picture.get_display_name() }}" style="max-width: 100%"/>
            </a>
        </div>
{%- endfor %}
Skia's avatar
Skia committed
30
    </div>
Skia's avatar
Skia committed
31
32
{% endblock %}