user_pictures.jinja 971 Bytes
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
{% for r in profile.pictures.exclude(picture=None).values('user__pictures__picture__parent').distinct() %}
Skia's avatar
Skia committed
10
<div style="padding: 10px">
Skia's avatar
Skia committed
11
    {% set album = profile.pictures.filter(picture__parent=r['user__pictures__picture__parent']).first().picture.parent %}
Skia's avatar
Skia committed
12
13
    <h4>{{ album.name }}</h4>
    <hr>
Skia's avatar
Skia committed
14
    {% for r in profile.pictures.exclude(picture=None).filter(picture__parent=album).order_by('id') %}
Skia's avatar
Skia committed
15
16
17
18
19
20
    <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
21
22
23
24
</div>
{% endfor %}
{% endblock %}