
<a href="#" class="close_playlists_prompt">
  <img src="{{ asset('/img/icon_close.png') }}" alt="close" />
</a>

<div class="create_playlist">
  <h2 class="nomargintop">{{ 'playlist.create_and_add'|trans({}, 'elements') }}</h2>
  <form action="{{ path('playlist_add_element_and_create', { 'element_id' : element.id }) }}" method="post">
    {% include 'MuzichPlaylistBundle:Show:form.html.twig' with {
      'display_public_widget' : true
    } %}
  </form>
</div>

<div>
  {% if playlists|length %}
    <h2>{{ 'playlist.add_to'|trans({}, 'elements') }}</h2>
    <ul class="playlists_for_element">
      {% for playlist in playlists %}
        <li
          class="playlist{% if playlist.haveElementId(element.id) %} in{% endif %}{% if playlist.haveOneOfTags(element.tags) %} remarquable{% endif %}"
          title="{% if playlist.haveElementId(element.id) %}{{ 'playlist.contained'|trans({}, 'elements') }}{% else %}{{ 'playlist.not_contained'|trans({}, 'elements') }}{% endif %}"
        >
          <a class="add_element_to_playlist"
            {% if playlist.owned(app.user) %}
              href="{{ path_token('playlists_add_element', {
                'playlist_id' : playlist.id,
                'element_id'  : element.id
              }) }}"
            {% else %}
              href="{{ path_token('playlists_add_element_and_copy', {
                'playlist_id' : playlist.id,
                'element_id'  : element.id
              }) }}"
            {% endif %}
          >
            {{ playlist.name }}
          </a>
          {% if playlist.public %}
            {{ 'playlist.public_word'|trans({}, 'elements') }}
          {% endif %}
        </li>
      {% endfor %}
    </ul>
  {% else %}
    
  {% endif %}
</div>