show.html.twig 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {% extends "MuzichFavoriteBundle::layout.html.twig" %}
  2. {% block title %}{% endblock %}
  3. {% block mainbox_classes %}{% endblock %}
  4. {% block content %}
  5. <div class="top_tools">
  6. <a class="autoplay_playlist" href="{{ path('playlist_datas_for_autoplay', { 'playlist_id' : playlist.id }) }}" >
  7. Lire
  8. </a>
  9. {% if app.user %}
  10. {% if not playlist.owned(app.user) and viewed_user.id != app.user.id %}
  11. {% if not app.user.havePlaylistPicked(playlist) %}
  12. <a class="playlist_pick" href="{{ path('playlist_pick', { 'playlist_id' : playlist.id }) }}" >
  13. P
  14. </a>
  15. {% else %}
  16. <a class="playlist_unpick" href="{{ path('playlist_unpick', { 'playlist_id' : playlist.id }) }}" >
  17. uP
  18. </a>
  19. {% endif %}
  20. {% endif %}
  21. {% endif %}
  22. <h2>{{ playlist.name }}</h2>
  23. {% include "MuzichCoreBundle:Tag:tag_cloud.html.twig" with {
  24. 'tags' : playlist.tags
  25. } %}
  26. {% if playlist.elements|length %}
  27. <form action="{{ path('playlist_update_order', { 'playlist_id' : playlist.id }) }}" method="post">
  28. <ul class="playlist_elements">
  29. {% for element in playlist.elements %}
  30. <li class="playlist_element">
  31. <input type="hidden" name="elements[]" value="{{ element.id }}" />
  32. <a class="autoplay_playlist" href="{{ path('playlist_datas_for_autoplay', { 'playlist_id' : playlist.id, 'offset' : loop.index0 }) }}">
  33. play
  34. </a>
  35. <a class="open_element" href="{{ path('element_get_one', { 'element_id' : element.id }) }}" data-id="{{ element.id }}">
  36. {{ element.name }}
  37. </a>
  38. <a class="remove_element" href="{{ path('playlist_remove_element', { 'playlist_id' : playlist.id, 'element_id' : element.id }) }}">
  39. X
  40. </a>
  41. </li>
  42. {% endfor %}
  43. </ul>
  44. </form>
  45. {% endif %}
  46. </div>
  47. {% endblock %}