2016-11-20 09:40:49 +00:00
|
|
|
{% extends "core/base.jinja" %}
|
|
|
|
|
2023-03-30 12:38:40 +00:00
|
|
|
{%- block additional_css -%}
|
2024-09-17 21:42:05 +00:00
|
|
|
<link rel="stylesheet" href="{{ static('sas/css/album.scss') }}">
|
2023-03-30 12:38:40 +00:00
|
|
|
{%- endblock -%}
|
|
|
|
|
2024-07-23 10:11:19 +00:00
|
|
|
{% block additional_js %}
|
2024-11-19 14:16:23 +00:00
|
|
|
<script type="module" src="{{ static('bundled/user/pictures-index.js') }}"></script>
|
2024-07-23 10:11:19 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
2016-11-20 09:40:49 +00:00
|
|
|
{% block title %}
|
2024-07-23 10:11:19 +00:00
|
|
|
{% trans user_name=profile.get_display_name() %}{{ user_name }}'s pictures{% endtrans %}
|
2016-11-20 09:40:49 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2024-08-10 12:49:02 +00:00
|
|
|
<main x-data="user_pictures">
|
2024-08-09 15:33:07 +00:00
|
|
|
{% if user.id == object.id %}
|
|
|
|
<div x-show="pictures.length > 0" x-cloak>
|
2024-07-30 17:23:48 +00:00
|
|
|
<button
|
2024-10-08 15:14:22 +00:00
|
|
|
:disabled="isDownloading"
|
2024-07-30 17:57:56 +00:00
|
|
|
class="btn btn-blue"
|
2024-10-08 15:14:22 +00:00
|
|
|
@click="downloadZip()"
|
2024-07-30 17:23:48 +00:00
|
|
|
>
|
2024-07-30 17:57:56 +00:00
|
|
|
<i class="fa fa-download"></i>
|
2024-07-30 17:23:48 +00:00
|
|
|
{% trans %}Download all my pictures{% endtrans %}
|
|
|
|
</button>
|
2024-10-08 15:14:22 +00:00
|
|
|
<progress x-ref="progress" x-show="isDownloading"></progress>
|
2024-07-30 17:23:48 +00:00
|
|
|
</div>
|
2022-08-09 16:11:20 +00:00
|
|
|
{% endif %}
|
2024-08-09 15:33:07 +00:00
|
|
|
|
2024-08-16 20:52:20 +00:00
|
|
|
<template x-for="[album, pictures] in Object.entries(albums)" x-cloak>
|
|
|
|
<section>
|
|
|
|
<br />
|
|
|
|
<h4 x-text="album"></h4>
|
|
|
|
<div class="photos">
|
|
|
|
<template x-for="picture in pictures">
|
2024-09-30 12:42:29 +00:00
|
|
|
<a :href="`/sas/picture/${picture.id}`">
|
2024-08-16 20:52:20 +00:00
|
|
|
<div
|
|
|
|
class="photo"
|
|
|
|
:class="{not_moderated: !picture.is_moderated}"
|
|
|
|
:style="`background-image: url(${picture.thumb_url})`"
|
|
|
|
>
|
|
|
|
<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 13:16:37 +00:00
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
<div class="photos" :aria-busy="loading"></div>
|
2024-07-30 17:23:48 +00:00
|
|
|
</main>
|
2024-07-30 17:57:56 +00:00
|
|
|
{% endblock content %}
|
|
|
|
|
2024-07-30 17:23:48 +00:00
|
|
|
{% block script %}
|
2024-07-30 09:11:31 +00:00
|
|
|
|
2024-07-30 17:23:48 +00:00
|
|
|
{{ super() }}
|
2024-08-09 15:33:07 +00:00
|
|
|
<script>
|
2024-10-08 22:19:14 +00:00
|
|
|
window.addEventListener("DOMContentLoaded", () => {
|
2024-10-09 18:59:12 +00:00
|
|
|
loadPicturePage({ userId: {{ object.id }} });
|
2024-10-08 22:19:14 +00:00
|
|
|
})
|
2024-08-09 15:33:07 +00:00
|
|
|
</script>
|
2024-07-30 17:57:56 +00:00
|
|
|
{% endblock script %}
|