<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* partial/video-une.html.twig */
class __TwigTemplate_9a93f0f8c960ec83fa615f04932b703ec7724b3fdda89873d16b048b1d6d520b extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "partial/video-une.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "partial/video-une.html.twig"));
// line 1
if ((array_key_exists("videos", $context) && (0 <= twig_compare(twig_length_filter($this->env, (isset($context["videos"]) || array_key_exists("videos", $context) ? $context["videos"] : (function () { throw new RuntimeError('Variable "videos" does not exist.', 1, $this->source); })())), 5)))) {
// line 2
echo "<div class=\"block-video-une\">
\t";
// line 3
if ((0 === twig_compare((isset($context["type"]) || array_key_exists("type", $context) ? $context["type"] : (function () { throw new RuntimeError('Variable "type" does not exist.', 3, $this->source); })()), "home"))) {
// line 4
echo "\t\t";
// line 5
echo "\t";
} else {
// line 6
echo "\t\t<h2>À la une</h2>
\t";
}
// line 8
echo "\t<div class=\"cycle-video\">
\t\t<span id=\"video-next\" class=\"next-slide\"></span>
\t\t<span id=\"video-prev\" class=\"prev-slide\"></span>
\t\t";
// line 11
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["videos"]) || array_key_exists("videos", $context) ? $context["videos"] : (function () { throw new RuntimeError('Variable "videos" does not exist.', 11, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["video"]) {
// line 12
echo "\t\t\t<div class=\"card-video home\">
\t\t\t\t<div class=\"position-relative\">
\t\t\t\t\t<a href=\"";
// line 14
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["pathBuilder"]) || array_key_exists("pathBuilder", $context) ? $context["pathBuilder"] : (function () { throw new RuntimeError('Variable "pathBuilder" does not exist.', 14, $this->source); })()), "buildFiche", [0 => twig_get_attribute($this->env, $this->source, $context["video"], "etablissement", [], "any", false, false, false, 14), 1 => ["video-id" => twig_get_attribute($this->env, $this->source, $context["video"], "id", [], "any", false, false, false, 14)]], "method", false, false, false, 14), "html", null, true);
echo "\" data-trace-etab=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["video"], "etablissement", [], "any", false, false, false, 14), "id", [], "any", false, false, false, 14), "html_attr");
echo "\" class=\"\">
\t\t\t\t\t\t<i class=\"i-video-small\"></i>
\t\t\t\t\t\t<span class=\"badge-plus\"></span>
\t\t\t\t\t\t<img src='";
// line 17
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['App\Twig\TextExtension']->getDefaultImage($this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset($context["video"], "videoFile")), "diapo_small"), "html", null, true);
echo "' class=\"\"/>
\t\t\t\t\t</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['video'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 23
echo "\t</div>
</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "partial/video-une.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 92 => 23, 80 => 17, 72 => 14, 68 => 12, 64 => 11, 59 => 8, 55 => 6, 52 => 5, 50 => 4, 48 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% if videos is defined and videos|length >= 5 %}
<div class=\"block-video-une\">
\t{% if type == 'home' %}
\t\t{#<h2>VIDÉOS</h2>#}
\t{% else %}
\t\t<h2>À la une</h2>
\t{% endif %}
\t<div class=\"cycle-video\">
\t\t<span id=\"video-next\" class=\"next-slide\"></span>
\t\t<span id=\"video-prev\" class=\"prev-slide\"></span>
\t\t{% for video in videos %}
\t\t\t<div class=\"card-video home\">
\t\t\t\t<div class=\"position-relative\">
\t\t\t\t\t<a href=\"{{ pathBuilder.buildFiche(video.etablissement,{'video-id': video.id}) }}\" data-trace-etab=\"{{ video.etablissement.id | e('html_attr') }}\" class=\"\">
\t\t\t\t\t\t<i class=\"i-video-small\"></i>
\t\t\t\t\t\t<span class=\"badge-plus\"></span>
\t\t\t\t\t\t<img src='{{ (vich_uploader_asset(video, 'videoFile') | default_image ) | imagine_filter('diapo_small')}}' class=\"\"/>
\t\t\t\t\t</a>
\t\t\t\t</div>
\t\t\t</div>
\t\t{% endfor %}
\t</div>
</div>
{% endif %}
", "partial/video-une.html.twig", "/app/templates/partial/video-une.html.twig");
}
}