Commit 6df5bc51 authored by Andreas Heimann's avatar Andreas Heimann

published add to playlist

parent 42cd9717
...@@ -315,25 +315,21 @@ ...@@ -315,25 +315,21 @@
<form action="" method="POST" class="overlay-content"> <form action="" method="POST" class="overlay-content">
<div class="title">ADD TO PLAYLIST</div> <div class="title">ADD TO PLAYLIST</div>
<div class="playlist-list"> <div class="playlist-list">
{% if is_granted('ROLE_MODERATOR') %} {% for key,playlist in userPlaylists %}
{% for key,playlist in userPlaylists %} {% set isInPlaylist = false %}
{% set isInPlaylist = false %} {% for playlistSong in playlist.songs %}
{% for playlistSong in playlist.songs %} {% if playlistSong.id == song.id %}
{% if playlistSong.id == song.id %} {% set isInPlaylist = true %}
{% set isInPlaylist = true %} {% endif %}
{% endif %}
{% endfor %}
<label class="playlist-item">
<input type="checkbox" name="playlist_{{ key }}" {{ isInPlaylist ? 'checked' : '' }} />
<span>{{ playlist.title }}</span>
</label>
{% endfor %} {% endfor %}
{% if userPlaylists|length == 0 %}
<div class="playlist-empty">You don't have any playlists yet.</div> <label class="playlist-item">
{% endif %} <input type="checkbox" name="playlist_{{ key }}" {{ isInPlaylist ? 'checked' : '' }} />
{% else %} <span>{{ playlist.title }}</span>
<div class="playlist-empty">Coming Soon</div> </label>
{% endfor %}
{% if userPlaylists|length == 0 %}
<div class="playlist-empty">You don't have any playlists yet.</div>
{% endif %} {% endif %}
</div> </div>
<div class="actions"> <div class="actions">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment