partitioncloud-server/partitioncloud/templates/albums/album.html

59 lines
1.8 KiB
HTML
Raw Normal View History

2022-08-13 23:36:10 +02:00
{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}{{ album.name }}{% endblock %}</h1>
2022-08-13 23:36:10 +02:00
{% endblock %}
{% block header_actions %}
2022-08-18 14:54:55 +02:00
<div id="users-list">
{% for album_user in album.users %}
<div class="user-profile-picture" style="background-color:{{ album_user.color }};" title="{{ album_user.username }}">
{{ album_user.username[0] | upper }}
2022-08-18 14:54:55 +02:00
</div>
{% endfor %}
</div>
2022-08-30 21:39:02 +02:00
<div class="dropdown">
<button class="dropbtn"></button>
<div class="dropdown-content">
{% if g.user %}
<a href="/albums/{{ album.uuid }}/add-partition">Ajouter une partition</a>
{% endif %}
{% if not_participant %}
<a href="/albums/{{ album.uuid }}/join">Rejoindre</a>
{% else %}
<a href="/albums/{{ album.uuid }}/quit">Quitter</a>
{% endif %}
2022-08-31 13:54:13 +02:00
{% if g.user.access_level == 1 %}
2022-08-30 21:39:02 +02:00
<a id="delete-album" href="/albums/{{ album.uuid }}/delete">Supprimer</a>
{% endif %}
</div>
</div>
{% endblock %}
{% block content %}
2022-08-13 23:36:10 +02:00
{% if partitions|length != 0 %}
2022-12-19 10:04:50 +01:00
<br/><br/>
<div id="partitions-grid">
{% for partition in partitions | reverse %}
2022-12-19 10:04:50 +01:00
<div>
2022-12-19 18:11:50 +01:00
<a href="/albums/{{ album.uuid }}/{{ partition['uuid'] }}">
<div class="partition" id="partition-{{ partition['uuid'] }}">
<img class="partition-thumbnail" src="/static/thumbnails/{{ partition['uuid'] }}.jpg">
<div class="partition-description">
<div class="partition-name">{{ partition["name"] }}</div>
<div class="partition-author">{{ partition["author"] }}</div>
</div>
</div>
</a>
2022-12-19 10:04:50 +01:00
{% if partition["user_id"] == g.user.id or g.user.access_level == 1 %}
<a href="/partition/{{ partition['uuid'] }}/edit"><div class="edit-button">✏️</div></a>
{% endif %}
</div>
{% endfor %}
</div>
2022-08-13 23:36:10 +02:00
{% else %}
2022-12-19 15:19:58 +01:00
<br/>
<div id="partitions-grid" style="display: inline;">Aucune partition disponible</div>
2022-08-13 23:36:10 +02:00
{% endif %}
{% endblock %}