{% extends 'base.html.twig' %}
{% block title %}Playlist: {% endblock %}
{% block body %}
{% block block_navstart %} {% include "_partials/_nav.html.twig" %} {% endblock %}
<!-- detail-immobilier -->
<section class="playlist-video">
<div class="container">
<div class="row">
{% for viPlayL in videoPlaylists %}
<div class="col-lg-7 col-md-12 col-sm-12" style="">
{% if viPlayL.id == idV and viPlayL.namePlaylist != null and viPlayL.playlist == 1 %}
<h6>
<img src="{{ asset('uploads/images/' ~ viPlayL.users.imageUser) }}"
alt="Photo" class="img-fluid" style="width: 20px; height: 20px; border-radius: 50%;" />
<strong>{{ viPlayL.users.firstname | slice (0, 14) }} {{ viPlayL.users.lastname | slice (0, 14) }}</strong>
</h6>
<div class="" style="margin: 0;">
<video class="" src="{{ asset('uploads/videos/' ~ viPlayL.videoFileName) }}" loop controls style="width: 100%; margin-bottom: 7px;"></video>
</div>
<p><strong>{{ viPlayL.name }}</strong><span style="color:#A9A9A9;"><strong> : {{ viPlayL.createdAt | date('d-m-Y') }}</strong></span></p>
<p>Catégorie : <strong>{{ viPlayL.categoriesvideos.name }}</strong></p>
<p>
{% if viPlayL.playlist == 1 %}
<span>Playlist: <a href="{{ path('app_videos_playlist', {playLi: viPlayL.namePlaylist, idU: viPlayL.users.id, idV: viPlayL.id}) }}" class="link link-primary btn-sm">{{ viPlayL.namePlaylist }}</a></span>
{% endif %}
{#---------#}
<a href="{{ path('app_profile_home', {id: viPlayL.users.id}) }}" class="btn btn-primary btn-sm">Profile Auteur</a>
<a href="{{ path('app_videos_similars', {catego: viPlayL.categoriesvideos.id}) }}" class="btn btn-secondary btn-sm">videos similaires</a>
{% set i = 0 %} {###}
{% for statElem in allStatistiques %}
{% if viPlayL.id == statElem.idElement and statElem.page == 'DETAIL_VIDEO' %}
{% set i = i + 1 %}
{% endif %}
{% endfor %} {###}
{% include '_partials/_compteur_vues.html.twig' %} {## COMPTEUR_VUES ##}
</p>
<p class="" style="overflow: wrap; width: 100%;">{{ viPlayL.description }}</p>
{% endif %}
</div>
{% endfor %}
{#------Liste videos playlist ------#}
<div class="col-lg-5 col-md-12 col-sm-12" style="">
<h3><strong>Serie playlist</strong></h3>
<div>
{% for viSerie in videoPlaylists %}
{% if viSerie.users.id == idU and viSerie.playlist == 1 %}
{% if viSerie.id == idV %}
{#------------#}
<div class="container bg-light d-flex" style="border: 1px solid #00F; padding: 1px; border-radius: 1%;">
<video class="" src="{{ asset('uploads/videos/' ~ viSerie.videoFileName) }}" style="width: 50%; margin-bottom: 4px; margin-right: 2px;"></video>
<div>
<h6><strong>{{ viSerie.name | slice (0, 100) }}</strong></h6>
<h6>
<div class="">
<img src="{{ asset('uploads/images/' ~ viSerie.users.imageUser) }}" alt="Photo" class="img-fluid" style="width: 20px; height: 20px; border-radius: 50%;" />
{{ viSerie.users.firstname | slice (0, 14) }} {{ viSerie.users.lastname | slice (0, 14) }}
</div>
<div class="">
{% set i = 0 %}
{% for statElem in allStatistiques %}
{% if viSerie.id == statElem.idElement and statElem.page == 'DETAIL_VIDEO' %}
{% set i = i + 1 %}
{% endif %}
{% endfor %}
{% include '_partials/_compteur_vues.html.twig' %} {## COMPTEUR_VUES ##}
{#---#}
<a href="{{ path('app_videos_playlist', {idU: viSerie.users.id, playLi: viSerie.namePlaylist, idV: viSerie.id}) }}" class="btn btn-primary btn-sm" style="width: 30px; height: 20px; padding: 0;">Lire</a>
</div>
</h6>
</div>
</div>
{#------------#}
{% else %}
<div class="container bg-light d-flex" style="padding: 1px; border-radius: 1%;">
<video class="" src="{{ asset('uploads/videos/' ~ viSerie.videoFileName) }}" style="width: 50%; margin-bottom: 4px; margin-right: 2px;"></video>
<div>
<h6><strong>{{ viSerie.name | slice (0, 100) }}</strong></h6>
<h6>
<div class="">
<img src="{{ asset('uploads/images/' ~ viSerie.users.imageUser) }}" alt="Photo" class="img-fluid" style="width: 20px; height: 20px; border-radius: 50%;" />
{{ viSerie.users.firstname | slice (0, 14) }} {{ viSerie.users.lastname | slice (0, 14) }}
</div>
<div class="">
{% set i = 0 %}
{% for statElem in allStatistiques %}
{% if viSerie.id == statElem.idElement and statElem.page == 'DETAIL_VIDEO' %}
{% set i = i + 1 %}
{% endif %}
{% endfor %}
{% include '_partials/_compteur_vues.html.twig' %} {## COMPTEUR_VUES ##}
{#---#}
<a href="{{ path('app_videos_playlist', {idU: viSerie.users.id, playLi: viSerie.namePlaylist, idV: viSerie.id}) }}" class="btn btn-primary btn-sm" style="width: 30px; height: 20px; padding: 0;">Lire</a>
</div>
</h6>
</div>
</div>
{% endif %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
</section>
{% endblock %}