{% extends "MuzichFavoriteBundle::layout.html.twig" %}

{% block title %}{{ 'title.favoriteof'|trans({'%name%':viewed_user.name}, 'userui') }}{% endblock %}
{% block mainbox_classes %}mainbox_nopadding{% 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>{{ 'favorites.user_favorites'|trans({'%name%' : viewed_user.name}, 'network') }}</h1>
  
    {% include "MuzichCoreBundle:Tag:tagsList.favorite.html.twig" with {
      'user_id' : viewed_user.id
    } %}
    
  </div>

  {% if not viewed_user.favoritesPublics and viewed_user.id != app.user|userId %}
    
    <p class="solop favorites_no_publics">{{ 'favorites.nopublic'|trans({'%user_username%' : viewed_user.name}, 'network') }}</p>
    
  {% else %}
    
    {% include "MuzichCoreBundle:SearchElement:default.html.twig" with{
        'display_autoplay'     : true,
        'autoplay_context'     : 'favorite_user'
    } %}
    
  {% endif %}
    
  {% if elements|length %}
    {% include "MuzichCoreBundle:SearchElement:more_button.html.twig" with {
      'more_path'     : path('favorite_get', {
        'user_id': viewed_user.id,
        'tags_ids_json' : '[]'
      }),
      'more_url_path' : path('favorite_get', {
        'user_id': viewed_user.id,
        'tags_ids_json' : ''
      })
    }%}
  {% endif %}
  
{% endblock %}