%
// Admin: Playlists management
// Shows all playlists for current site, with new/edit/delete actions.
// The editor itself is the same modal that's used from the post-editor.
const _csrf = (typeof csrfToken !== 'undefined' && csrfToken) || '';
%>
<%# Sticky-on-mobile create button โ easier reach than a header button. %>
<% if (!playlists.length) { %>
๐
<%= t('apl.none') %>
<%= t('apl.none_sub') %>
<% } else { %>
<%
// Pre-fetch loop labels (defensive โ keep `t` calls out of the loop body).
var _aplPlaylist = t('apl.pill_playlist');
var _aplAlbum = t('apl.pill_album');
var _aplTrack = t('apl.track');
var _aplTracks = t('apl.tracks');
var _aplCopy = t('apl.copy_click');
var _aplEdit = t('apl.edit');
var _aplDelete = t('apl.delete');
%>
<%# Editor modal lives in its own partial so the post-editor can include it too %>
<%- include('../partials/playlist-editor', { csrfToken: _csrf }) %>
<%# Het script staat in assets/js/mod/admin-playlists.js; de gegevens via partials/page-data.ejs (shaer-bqr). %>
<%- include('../partials/page-data', { pageData: { csrf: _csrf, copied: t('apl.copied'), delConfirm: t('apl.delete_confirm'), delFailed: t('apl.delete_failed') } }) %>