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

54 lines
1.6 KiB
HTML

{% extends 'base.html' %}
{% block header %}
<h1>{% block title %}{{ album.name }}{% endblock %}</h1>
{% endblock %}
{% block header_actions %}
<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 }}
</div>
{% endfor %}
</div>
{% if user.access_level == 1 %}
<a class="button-href" href="/albums/{{ album.uuid }}/delete">
<button id="delete-album">Supprimer</button>
</a>
{% endif %}
{% if not_participant %}
<a class="button-href" href="/albums/{{ album.uuid }}/join">
<button id="join-album">Rejoindre</button>
</a>
{% else %}
<a class="button-href" href="/albums/{{ album.uuid }}/quit">
<button id="quit-album">Quitter</button>
</a>
{% endif %}
{% if g.user %}
<a class="button-href" href="/albums/{{ album.uuid }}/add-partition">
<button id="add-partition">Ajouter une partition</button>
</a>
{% endif %}
{% endblock %}
{% block content %}
{% if partitions|length != 0 %}
<div id="partitions-grid">
{% for partition in partitions | reverse %}
<a href="{{ 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>
{% endfor %}
</div>
{% else %}
<div>Aucune partition disponible</div>
{% endif %}
{% endblock %}