86 lines
3.5 KiB
HTML
86 lines
3.5 KiB
HTML
<table class="{{ tclass }}-playlists">
|
|
<thead>
|
|
<tr>
|
|
<th>{{ l.playlist_panel_th_name }}</th>
|
|
{% if AUTH_ENABLED %}
|
|
<th class="tac">
|
|
<i class="fa fa-user"></i>
|
|
</th>
|
|
{% endif %}
|
|
<th class="tac"><i class="fa fa-compass"></i></th>
|
|
<th class="tac">{{ l.playlist_panel_th_enabled }}</th>
|
|
<th class="tac">{{ l.playlist_panel_th_duration }}</th>
|
|
<th class="tac">{{ l.playlist_panel_th_activity }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr class="empty-tr {% if playlists|length != 0 %}hidden{% endif %}">
|
|
<td colspan="4">
|
|
{{ l.playlist_panel_empty|replace(
|
|
'%link%',
|
|
('<a href="javascript:void(0);" class="item-add playlist-add">'~l.playlist_button_add~'</a>')|safe
|
|
) }}
|
|
</td>
|
|
</tr>
|
|
{% for playlist in playlists %}
|
|
<tr class="playlist-item" data-level="{{ playlist.id }}" data-entity="{{ playlist.to_json({"created_by": track_created(playlist).username, "updated_by": track_updated(playlist).username}) }}">
|
|
<td class="infos">
|
|
<div class="inner">
|
|
{% if playlist.id %}
|
|
<div class="badge"><i class="fa fa-key icon-left"></i> {{ playlist.id }}</div>
|
|
{% else %}
|
|
<div class="badge"><i class="fa fa-lock"></i></div>
|
|
{% endif %}
|
|
<i class="fa fa-bars-staggered icon-left"></i>
|
|
|
|
{{ playlist.name }}
|
|
</div>
|
|
</td>
|
|
{% if AUTH_ENABLED %}
|
|
<td class="tac">
|
|
{% if playlist.id %}
|
|
{% set creator = track_created(playlist) %}
|
|
{% if creator.username %}
|
|
<a href="javascript:void(0);" class="badge item-utrack playlist-utrack {% if not creator.enabled %}anonymous{% endif %}">
|
|
{{ creator.username }}
|
|
</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
{% endif %}
|
|
<td class="tac">
|
|
{% if playlist.time_sync %}
|
|
<i class="fa fa-check"></i>
|
|
{% else %}
|
|
<i class="fa fa-times"></i>
|
|
{% endif %}
|
|
</td>
|
|
<td class="tac">
|
|
{% if playlist.id %}
|
|
<label class="pure-material-switch">
|
|
<input type="checkbox" {% if playlist.enabled %}checked="checked"{% endif %}><span></span>
|
|
</label>
|
|
{% endif %}
|
|
</td>
|
|
<td class="tac">
|
|
{% set total_duration = seconds_to_hhmmss(durations[playlist.id]) %}
|
|
{% if total_duration %}
|
|
{{ total_duration }}
|
|
{% else %}
|
|
{{ l.common_empty }}
|
|
{% endif %}
|
|
</td>
|
|
<td class="actions tac">
|
|
{% if playlist.id %}
|
|
<a href="javascript:void(0);" class="item-edit playlist-edit">
|
|
<i class="fa fa-pencil"></i>
|
|
</a>
|
|
<a href="javascript:void(0);" class="item-delete playlist-delete">
|
|
<i class="fa fa-trash"></i>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table> |