Add UI button

This commit is contained in:
augustin64 2024-04-10 18:45:38 +02:00
parent d1812cdde7
commit dbe77d0ece
2 changed files with 42 additions and 36 deletions

View File

@ -35,8 +35,8 @@
{% endif %}
{{ album.name }}
</h2>
{% if g.user %}
<div id="header-actions">
<div id="header-actions">
{% if g.user %}
<section id="users">
{% for album_user in album.users %}
<div class="user-profile-picture" style="background-color:{{ album_user.color }};" title="{{ album_user.username }}">
@ -44,25 +44,28 @@
</div>
{% endfor %}
</section>
<div class="dropdown dp1">
+
<div class="dropdown-content dp1">
{% if g.user %}
<a href="#add-partition">{{ _("Add a score") }}</a>
{% endif %}
{% if not_participant %}
<a href="/albums/{{ album.uuid }}/join">{{ _("Join") }}</a>
{% elif album.users | length > 1 %}
<a href="/albums/{{ album.uuid }}/quit">{{ _("Quit") }}</a>
{% endif %}
<a href="#share">{{ _("Share") }}</a>
{% if g.user.access_level == 1 or (not not_participant and album.users | length == 1) %}
<a id="delete-album" href="#delete">{{ _("Delete") }}</a>
{% endif %}
</div>
{% endif %}
<div class="dropdown dp1">
+
<div class="dropdown-content dp1">
{% if g.user %}
<a href="#add-partition">{{ _("Add a score") }}</a>
{% endif %}
{% if not_participant %}
<a href="/albums/{{ album.uuid }}/join">{{ _("Join") }}</a>
{% elif album.users | length > 1 %}
<a href="/albums/{{ album.uuid }}/quit">{{ _("Quit") }}</a>
{% endif %}
<a href="#share">{{ _("Share") }}</a>
{% if g.user or not config["ZIP_REQUIRE_LOGIN"] %}
<a href="/albums/{{ album.uuid }}/zip">{{ _("Download as zip") }}</a>
{% endif %}
{% if g.user.access_level == 1 or (g.user and not not_participant and album.users | length == 1) %}
<a id="delete-album" href="#delete">{{ _("Delete") }}</a>
{% endif %}
</div>
</div>
{% endif %}
</div>
</header>
<hr/>
{% if partitions|length != 0 %}

View File

@ -30,8 +30,8 @@
{% block content %}
<header id="album-header">
<h2 id="groupe-title">{{ groupe.name }}</h2>
{% if g.user %}
<div id="header-actions">
<div id="header-actions">
{% if g.user %}
<section id="users">
{% for groupe_user in groupe.users %}
<div class="user-profile-picture" style="background-color:{{ groupe_user.color }};" title="{{ groupe_user.username }}">
@ -39,23 +39,26 @@
</div>
{% endfor %}
</section>
<div class="dropdown dp1">
+
<div class="dropdown-content dp1">
{% if not_participant %}
<a href="/groupe/{{ groupe.uuid }}/join">{{ _("Join") }}</a>
{% elif groupe.users | length > 1 %}
<a href="/groupe/{{ groupe.uuid }}/quit">{{ _("Quit") }}</a>
{% endif %}
<a href="#share">{{ _("Share") }}</a>
{% if g.user.access_level == 1 or user.id in groupe.get_admins() %}
<a href="#create-groupe-album">{{ _("Add an album") }}</a>
<a id="delete-album" href="#delete">{{ _("Delete") }}</a>
{% endif %}
</div>
{% endif %}
<div class="dropdown dp1">
+
<div class="dropdown-content dp1">
{% if not_participant %}
<a href="/groupe/{{ groupe.uuid }}/join">{{ _("Join") }}</a>
{% elif groupe.users | length > 1 and g.user %}
<a href="/groupe/{{ groupe.uuid }}/quit">{{ _("Quit") }}</a>
{% endif %}
<a href="#share">{{ _("Share") }}</a>
{% if g.user or not config["ZIP_REQUIRE_LOGIN"] %}
<a href="/groupe/{{ groupe.uuid }}/zip">{{ _("Download as zip") }}</a>
{% endif %}
{% if g.user.access_level == 1 or (g.user and user.id in groupe.get_admins()) %}
<a href="#create-groupe-album">{{ _("Add an album") }}</a>
<a id="delete-album" href="#delete">{{ _("Delete") }}</a>
{% endif %}
</div>
</div>
{% endif %}
</div>
</header>
<hr/>
{% if groupe.albums|length != 0 %}