|
|
@ -1,88 +0,0 @@ |
|
|
{% extends 'base.html' %} |
|
|
|
|
|
|
|
|
|
|
|
{% block content %} |
|
|
|
|
|
<div class="tabs is-toggle is-fullwidth" id="tabs"> |
|
|
|
|
|
<!-- |
|
|
|
|
|
<button class="tablinks" onclick="openTab(event, 'Songs')">Songs</button> |
|
|
|
|
|
<button class="tablinks" onclick="openTab(event, 'Albums')">Albums</button> |
|
|
|
|
|
--> |
|
|
|
|
|
<ul> |
|
|
|
|
|
<li class="is-active" id="tablinks"> |
|
|
|
|
|
<a onclick="openTab(event, 'Songs')"> |
|
|
|
|
|
<span class="icon is-small"><i class="fa fa-image"></i></span> |
|
|
|
|
|
<span>Canciones</span> |
|
|
|
|
|
</a> |
|
|
|
|
|
</li> |
|
|
|
|
|
<li id="tablinks"> |
|
|
|
|
|
<a onclick="openTab(event, 'Albums')"> |
|
|
|
|
|
<span class="icon is-small"><i class="fa fa-music"></i></span> |
|
|
|
|
|
<span>Álbumes</span> |
|
|
|
|
|
</a> |
|
|
|
|
|
</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div id="Songs" class="tabcontent is-active"> |
|
|
|
|
|
<h2>Song List</h2> |
|
|
|
|
|
{% if songs %} |
|
|
|
|
|
<table id="songTable" class="display"> |
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th>Pista</th> |
|
|
|
|
|
<th>Título</th> |
|
|
|
|
|
<th>Autor</th> |
|
|
|
|
|
<th>Álbum</th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</thead> |
|
|
|
|
|
<tbody> |
|
|
|
|
|
{% for song in songs %} |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td>{{ song.pista }}</td> |
|
|
|
|
|
<td><a href="{{ url_for('paginas.song', song_id=song.id) }}">{{ song.title }}</a></td> |
|
|
|
|
|
<td>{{ song.author }}</td> |
|
|
|
|
|
<td><a href="{{ url_for('paginas.album', album_id=song.album.id) }}">{{ song.album.name }}</a></td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
</tbody> |
|
|
|
|
|
</table> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<p>No songs found.</p> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div id="Albums" class="tabcontent"> |
|
|
|
|
|
<h2>Album List</h2> |
|
|
|
|
|
{% if albums %} |
|
|
|
|
|
<table id="albumTable" class="display"> |
|
|
|
|
|
<thead> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<th>Cover</th> |
|
|
|
|
|
<th>Nombre</th> |
|
|
|
|
|
<th>Artista</th> |
|
|
|
|
|
<th>Año</th> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</thead> |
|
|
|
|
|
<tbody> |
|
|
|
|
|
{% for album in albums %} |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td> |
|
|
|
|
|
{% if album.cover_image %} |
|
|
|
|
|
<img src="{{ url_for('paginas.uploaded_file', filename=album.cover_image) }}" alt="{{ album.name }}" style="width:50px;height:50px;"> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
Sin imágen |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
</td> |
|
|
|
|
|
<td><a href="{{ url_for('paginas.album', album_id=album.id) }}">{{ album.name }}</a></td> |
|
|
|
|
|
<td>{{ album.artist }}</td> |
|
|
|
|
|
<td>{{ album.year }}</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
{% endfor %} |
|
|
|
|
|
</tbody> |
|
|
|
|
|
</table> |
|
|
|
|
|
{% else %} |
|
|
|
|
|
<p>No albums found.</p> |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
<hr> |
|
|
|
|
|
<a href="{{ url_for('paginas.add_album') }}" class="button">Añadir nuevo álbum</a> |
|
|
|
|
|
</div> |
|
|
|
|
|
{% endblock %} |
|
|
|