2023-10-11 17:15:49 +02:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block title %}{{ groupe.name }}{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block dialogs %}
|
|
|
|
<dialog id="create-groupe-album">
|
2024-01-25 16:22:04 +01:00
|
|
|
<h2>{{ _("Ajouter un album au groupe %(name)s", name=groupe.name) }}</h2>
|
2023-10-11 17:15:49 +02:00
|
|
|
<form action="/groupe/{{ groupe.uuid }}/create-album" method="post">
|
2024-01-25 16:22:04 +01:00
|
|
|
<input type="text" name="name" id="name" placeholder="{{ _('Nom') }}" required><br/>
|
|
|
|
<input type="submit" value="{{ _('Ajouter') }}">
|
2023-10-11 17:15:49 +02:00
|
|
|
</form>
|
|
|
|
<a href="#!" class="close-dialog">Close</a>
|
|
|
|
</dialog>
|
|
|
|
<dialog id="delete">
|
2024-01-25 16:22:04 +01:00
|
|
|
<h2>{{ _("Supprimer le groupe") }}</h2>
|
|
|
|
{{ _("Êtes vous sûr de vouloir supprimer ce groupe ? Cela supprimera les albums
|
|
|
|
sous-jacents et leurs partitions si personne ne les a rejoints (indépendamment du groupe).") }}
|
2023-10-11 17:15:49 +02:00
|
|
|
<br/><br/>
|
|
|
|
<form method="post" action="/groupe/{{ groupe.uuid }}/delete">
|
2024-01-25 16:22:04 +01:00
|
|
|
<input type="submit" style="background-color: var(--color-red);" value="{{ _('Supprimer') }}">
|
2023-10-11 17:15:49 +02:00
|
|
|
</form>
|
|
|
|
<a href="#!" class="close-dialog">Close</a>
|
|
|
|
</dialog>
|
2023-11-19 18:45:25 +01:00
|
|
|
{% set current_url = "/groupe/" + groupe.uuid %}
|
|
|
|
{% with share_link=config.BASE_URL+current_url, share_qrlink=current_url + "/qr" %}
|
|
|
|
{% include 'components/share_dialog.html' %}
|
|
|
|
{% endwith %}
|
2023-10-11 17:15:49 +02:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<header id="album-header">
|
|
|
|
<h2 id="groupe-title">{{ groupe.name }}</h2>
|
|
|
|
{% if g.user %}
|
|
|
|
<div id="header-actions">
|
|
|
|
<section id="users">
|
|
|
|
{% for groupe_user in groupe.users %}
|
|
|
|
<div class="user-profile-picture" style="background-color:{{ groupe_user.color }};" title="{{ groupe_user.username }}">
|
|
|
|
{{ groupe_user.username[0] | upper }}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
<div class="dropdown dp1">
|
|
|
|
+
|
|
|
|
<div class="dropdown-content dp1">
|
|
|
|
{% if not_participant %}
|
2024-01-25 16:22:04 +01:00
|
|
|
<a href="/groupe/{{ groupe.uuid }}/join">{{ _("Rejoindre") }}</a>
|
2023-10-11 17:15:49 +02:00
|
|
|
{% elif groupe.users | length > 1 %}
|
2024-01-25 16:22:04 +01:00
|
|
|
<a href="/groupe/{{ groupe.uuid }}/quit">{{ _("Quitter") }}</a>
|
2023-10-11 17:15:49 +02:00
|
|
|
{% endif %}
|
2024-01-25 16:22:04 +01:00
|
|
|
<a href="#share">{{ _("Partager") }}</a>
|
2023-10-11 17:15:49 +02:00
|
|
|
{% if g.user.access_level == 1 or user.id in groupe.get_admins() %}
|
2024-01-25 16:22:04 +01:00
|
|
|
<a href="#create-groupe-album">{{ _("Ajouter un album") }}</a>
|
|
|
|
<a id="delete-album" href="#delete">{{ _("Supprimer") }}</a>
|
2023-10-11 17:15:49 +02:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</header>
|
|
|
|
<hr/>
|
|
|
|
{% if groupe.albums|length != 0 %}
|
|
|
|
<section id="albums-grid">
|
|
|
|
{% for album in groupe.albums | reverse %}
|
|
|
|
<a href="/groupe/{{ groupe.uuid }}/{{ album.uuid }}">
|
|
|
|
<div class="album">
|
|
|
|
{{ album.name }}
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
{% else %}
|
|
|
|
<br/>
|
2024-01-25 16:22:04 +01:00
|
|
|
{% set create %}
|
|
|
|
<a href="#create-groupe-album">{{ _("En créer un") }}</a>
|
|
|
|
{% endset %}
|
|
|
|
<div id="albums-grid" style="display: inline;">
|
|
|
|
{{ _("Aucun album disponible. %(create)s", create=create) }}
|
|
|
|
</div>
|
2023-10-11 17:15:49 +02:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|