1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-11-10 04:02:17 +00:00
supysonic/templates/playlists.html

53 lines
1.7 KiB
HTML

{#-
This file is part of Supysonic.
Supysonic is a Python implementation of the Subsonic server API.
Copyright (C) 2013 Alban 'spl0k' Féron
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-#}
{% extends "layout.html" %}
{% block body %}
<h2>My playlists</h2>
{% if not mine.count() %}
<p>You don't have any playlists.</p>
{% else %}
<table>
<tr><th>Playlist</th><th>Tracks</th><th>Public</th><th></th></tr>
{% for p in mine %}
<tr>
<td><a href="{{ url_for('playlist_details', uid = p.id) }}">{{ p.name }}</a></td>
<td>{{ p.tracks|length }}</td>
<td><input type="checkbox" disabled="true" {% if p.public %}checked="true"{% endif %} /></td>
<td><a href="{{ url_for('playlist_delete', uid = p.id) }}">X</a></td>
</tr>
{% endfor %}
</table>
{% endif %}
{% if others.count() %}
<h2>Others' playslits</h2>
<table>
<tr><th>Playlist</th><th>Owner</th><th>Tracks</th></tr>
{% for p in others %}
<tr>
<td><a href="{{ url_for('playlist_details', uid = p.id) }}">{{ p.name }}</a></td>
<td>{{ p.user.name }}</td>
<td>{{ p.tracks|length }}</td>
</tr>
{% endfor %}
</table>
{% endif %}
{% endblock %}