mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-20 05:03:23 +00:00
24 lines
873 B
Django/Jinja
24 lines
873 B
Django/Jinja
{% extends "core/base.jinja" %}
|
|
|
|
{% block title %}
|
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s pictures{% endtrans %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{% set picture_qs = profile.pictures.exclude(picture=None).order_by('-picture__parent__id', 'id').select_related('picture__parent__parent__name') %}
|
|
{% for a in picture_qs.distinct('picture__parent') %}
|
|
<div style="padding: 10px">
|
|
<h4>{{ a.picture.parent.name }}</h4>
|
|
<hr>
|
|
{% for r in picture_qs.filter(picture__parent=a.picture.parent) -%}
|
|
<div class="picture">
|
|
<a href="{{ url("sas:picture", picture_id=r.picture.id) }}#pict">
|
|
<img src="{{ r.picture.get_download_thumb_url() }}" alt="{{ r.picture.get_display_name() }}" style="max-width: 100%"/>
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|