Add collapsible section for music list in group detail template
This commit is contained in:
parent
e64bb8b95a
commit
f211b9af50
1 changed files with 36 additions and 31 deletions
|
@ -57,40 +57,45 @@
|
|||
<h2>
|
||||
<i class="ri-music-2-fill"></i> Mes musiques ({{ musics.count }})
|
||||
</h2>
|
||||
<table class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Musique</th>
|
||||
<th>ID</th>
|
||||
<th>
|
||||
<i class="ri-history-fill"></i>
|
||||
</th>
|
||||
<th>
|
||||
<i class="ri-delete-bin-fill"></i>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for music in musics %}
|
||||
<details>
|
||||
<summary role="button">
|
||||
<i class="ri-music-2-fill"></i> Liste des musiques
|
||||
</summary>
|
||||
<table class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ music.title }}</th>
|
||||
<td>
|
||||
<a href="https://youtu.be/{{ music.yt_id }}">{{ music.yt_id }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<input type="checkbox" disabled {% if music.blacklisted %}checked{% endif %}
|
||||
<th>Musique</th>
|
||||
<th>ID</th>
|
||||
<th>
|
||||
<i class="ri-history-fill"></i>
|
||||
</th>
|
||||
<th>
|
||||
<i class="ri-delete-bin-fill"></i>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for music in musics %}
|
||||
<tr>
|
||||
<th>{{ music.title }}</th>
|
||||
<td>
|
||||
<a href="https://youtu.be/{{ music.yt_id }}">{{ music.yt_id }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url "group_remove_music" pk=music.pk %}"><i class="ri-close-fill" alt="Supprimer"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="2">Aucune musique.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="checkbox" disabled {% if music.blacklisted %}checked{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url "group_remove_music" pk=music.pk %}"><i class="ri-close-fill" alt="Supprimer"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="2">Aucune musique.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</details>
|
||||
<form method="post" action="{% url "group_add_music" pk=group.pk %}">
|
||||
{% csrf_token %}
|
||||
<fieldset role="group">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue