123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- {% extends "MuzichHomeBundle::layout.html.twig" %}
-
- {% block title %}{{ 'playlist.user_title'|trans({'%user_username%' : viewed_user.username }, 'elements') }}{% endblock %}
- {% block mainbox_classes %}{% endblock %}
-
- {% block content %}
-
- <div class="top_tools">
-
- <div class="show_options">
-
- <a class="button darkbutton" href="{{ path('show_user', {'slug' : viewed_user.slug}) }}" >
- {{ 'user.view_profile'|trans({}, 'users') }}
- </a>
-
- </div>
-
- <h1>{{ 'playlist.user_title'|trans({'%user_username%' : viewed_user.username }, 'elements') }}</h1>
-
- {% if app.user %}
- {% if viewed_user.id == app.user.id %}
- <p>{{ 'playlist.how_add_element'|trans({}, 'elements') }}</p>
- {% endif %}
- {% endif %}
-
- {% if playlists|length %}
- <ul class="playlists">
- {% for playlist in playlists %}
- <li class="playlist">
-
- <div class="actions">
-
- <a
- class="autoplay_playlist"
- href="{{ path('playlist_datas_for_autoplay', { 'playlist_id' : playlist.id }) }}"
- title="{{ 'playlist.play'|trans({}, 'elements') }}"
- >
- <img src="{{ asset('/img/1361037350_control_play.png') }}" alt="playlist" />
- </a>
-
- {% if app.user %}
- {% if not playlist.owned(app.user) and viewed_user.id != app.user.id %}
- {% if not app.user.havePlaylistPicked(playlist) %}
- <a
- class="playlist_pick_noajax"
- href="{{ path_token('playlist_pick', {
- 'playlist_id' : playlist.id,
- 'redirect_owner' : true
- }) }}"
- title="{{ 'playlist.pick'|trans({}, 'elements') }}"
- >
- <img src="{{ asset('/img/tick_untick.png') }}" alt="playlist" />
- </a>
- {% else %}
- <a
- class="playlist_unpick_noajax"
- href="{{ path_token('playlist_unpick', {
- 'playlist_id' : playlist.id,
- 'redirect_owner' : true
- }) }}"
- title="{{ 'playlist.unpick'|trans({}, 'elements') }}"
- >
- <img src="{{ asset('/img/tick_ticked.png') }}" alt="playlist" />
- </a>
- {% endif %}
- {% endif %}
- {% endif %}
-
- {% if app.user %}
- {% if viewed_user.id == app.user.id %}
- {% if playlist.owned(app.user) %}
- <a
- class="playlist_delete"
- href="{{ path_token('playlist_delete', { 'playlist_id' : playlist.id }) }}"
- title="{{ 'playlist.delete'|trans({}, 'elements') }}"
- >
- <img src="{{ asset('/img/icon_close_2.png') }}" alt="delete" />
- </a>
- {% else %}
- <a
- class="playlist_unpick"
- href="{{ path_token('playlist_unpick', { 'playlist_id' : playlist.id }) }}"
- title="{{ 'playlist.unpick'|trans({}, 'elements') }}"
- >
- <img src="{{ asset('/img/icon_close_2.png') }}" alt="delete" />
- </a>
- {% endif %}
- {% endif %}
- {% endif %}
-
- </div>
-
- <div class="title">
- <a
- class="title"
- href="{{ path('playlist', { 'user_slug' : playlist.owner.slug, 'playlist_id' : playlist.id }) }}"
- title="{{ 'playlist.openplaylist'|trans({}, 'elements') }}"
- >
- {{ playlist.name }}
- </a>
- {% if app.user|userId == playlist.owner.id %}
- {{ 'playlist.public_word'|trans({}, 'elements') }}
- {% endif %}
- </div>
-
-
- {% include "MuzichCoreBundle:Tag:tag_cloud.html.twig" with {
- 'tags' : playlist.tags
- } %}
-
- </li>
- {% endfor %}
- </ul>
- {% endif %}
-
- </div>
-
- {% endblock %}
|