2016-11-20 10:40:49 +01:00
|
|
|
{% extends "core/base.jinja" %}
|
2025-02-20 18:13:40 +01:00
|
|
|
{% from "sas/macros.jinja" import download_button %}
|
2016-11-20 10:40:49 +01:00
|
|
|
|
2023-03-30 14:38:40 +02:00
|
|
|
{%- block additional_css -%}
|
2024-09-17 23:42:05 +02:00
|
|
|
<link rel="stylesheet" href="{{ static('sas/css/album.scss') }}">
|
2023-03-30 14:38:40 +02:00
|
|
|
{%- endblock -%}
|
|
|
|
|
2024-07-23 12:11:19 +02:00
|
|
|
{% block additional_js %}
|
2025-02-18 20:10:51 +01:00
|
|
|
<script type="module" src="{{ static('bundled/sas/user/pictures-index.ts') }}"></script>
|
2025-02-18 13:54:48 +01:00
|
|
|
<script type="module" src="{{ static('bundled/sas/pictures-download-index.ts') }}"></script>
|
2024-07-23 12:11:19 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
2016-11-20 10:40:49 +01:00
|
|
|
{% block title %}
|
2024-07-23 12:11:19 +02:00
|
|
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s pictures{% endtrans %}
|
2016-11-20 10:40:49 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2025-02-17 17:51:42 +01:00
|
|
|
<main x-data="user_pictures({ userId: {{ object.id }} })">
|
2025-02-17 15:13:38 +01:00
|
|
|
{% if user.id == object.id %}
|
2025-02-18 15:05:23 +01:00
|
|
|
{{ download_button(_("Download all my pictures")) }}
|
2025-02-17 15:13:38 +01:00
|
|
|
{% endif %}
|
2024-08-09 17:33:07 +02:00
|
|
|
|
2024-08-16 22:52:20 +02:00
|
|
|
<template x-for="[album, pictures] in Object.entries(albums)" x-cloak>
|
|
|
|
<section>
|
|
|
|
<br />
|
2025-02-18 13:54:48 +01:00
|
|
|
<div class="row">
|
|
|
|
<h4 x-text="album"></h4>
|
|
|
|
{% if user.id == object.id %}
|
2025-02-20 18:51:08 +01:00
|
|
|
{{ download_button("") }}
|
2025-02-18 13:54:48 +01:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2024-08-16 22:52:20 +02:00
|
|
|
<div class="photos">
|
|
|
|
<template x-for="picture in pictures">
|
2025-02-18 13:54:48 +01:00
|
|
|
<a :href="picture.sas_url">
|
2024-08-16 22:52:20 +02:00
|
|
|
<div
|
|
|
|
class="photo"
|
|
|
|
:class="{not_moderated: !picture.is_moderated}"
|
|
|
|
>
|
2025-02-19 00:12:30 +01:00
|
|
|
<img :src="picture.thumb_url" :alt="picture.name" loading="lazy" />
|
2024-08-16 22:52:20 +02:00
|
|
|
<template x-if="!picture.is_moderated">
|
|
|
|
<div class="overlay"> </div>
|
|
|
|
<div class="text">{% trans %}To be moderated{% endtrans %}</div>
|
|
|
|
</template>
|
|
|
|
<template x-if="picture.is_moderated">
|
|
|
|
<div class="text"> </div>
|
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
</div>
|
2024-08-10 15:16:37 +02:00
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
<div class="photos" :aria-busy="loading"></div>
|
2024-07-30 19:23:48 +02:00
|
|
|
</main>
|
2024-07-30 19:57:56 +02:00
|
|
|
{% endblock content %}
|