<?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;
/* movie/movies.html.twig */
class __TwigTemplate_f14cc17bc09ef471d01fdc179e9ae660 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "layouts/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "movie/movies.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "movie/movies.html.twig"));
$this->parent = $this->loadTemplate("layouts/layout.html.twig", "movie/movies.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 3
echo "
<div id=\"main-content\" class=\"main-content\">
";
// line 6
if (twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 6, $this->source); })()), "getTitle", [], "method", false, false, false, 6))) {
// line 7
echo " ";
$this->env->getFunction('pimcore_head_title')->getCallable()(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "headline"), "getData", [], "method", false, false, false, 7), "PREPEND");
// line 8
echo " ";
}
// line 9
echo "
<div class=\"page-header\">
<h1>";
// line 11
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "headline", ["placeholder" => "Headline"]);
echo "</h1>
</div>
";
// line 14
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "areablock", "content", ["allowed" => [0 => "headlines", 1 => "hero-teaser", 2 => "horizontal-line", 3 => "wysiwyg"]]);
// line 23
echo "
";
// line 25
if (twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["document"]) || array_key_exists("document", $context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.', 25, $this->source); })()), "getTitle", [], "method", false, false, false, 25))) {
// line 26
echo " ";
$this->env->getFunction('pimcore_head_title')->getCallable()(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "headline"), "getData", [], "method", false, false, false, 26), "PREPEND");
// line 27
echo " ";
}
// line 28
echo "
";
// line 29
if ((twig_length_filter($this->env, (isset($context["movies"]) || array_key_exists("movies", $context) ? $context["movies"] : (function () { throw new RuntimeError('Variable "movies" does not exist.', 29, $this->source); })())) > 0)) {
echo "
<div>
";
// line 31
if ((isset($context["searchTerm"]) || array_key_exists("searchTerm", $context) ? $context["searchTerm"] : (function () { throw new RuntimeError('Variable "searchTerm" does not exist.', 31, $this->source); })())) {
// line 32
echo " <h1 class=\"d-flex justify-content-center\">Suchergebnisse für \"";
echo twig_escape_filter($this->env, (isset($context["searchTerm"]) || array_key_exists("searchTerm", $context) ? $context["searchTerm"] : (function () { throw new RuntimeError('Variable "searchTerm" does not exist.', 32, $this->source); })()), "html", null, true);
echo "\" </h1>
";
} else {
// line 34
echo " <h1 class=\"d-flex justify-content-center\">All Movies </h1>
";
}
// line 36
echo " </div>
<div class=\"row\">
<div class=\"d-flex flex-wrap\">
";
// line 39
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["movies"]) || array_key_exists("movies", $context) ? $context["movies"] : (function () { throw new RuntimeError('Variable "movies" does not exist.', 39, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["movie"]) {
echo "
<a href=\"/movie-detail/";
// line 40
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["movie"], "id", [], "any", false, false, false, 40), "html", null, true);
echo "\">
";
// line 41
if (twig_in_filter("Not Owned", twig_join_filter(twig_get_attribute($this->env, $this->source, $context["movie"], "status", [], "any", false, false, false, 41), ", "))) {
// line 42
echo " <div class=\"badge\">";
echo twig_escape_filter($this->env, twig_join_filter(twig_get_attribute($this->env, $this->source, $context["movie"], "status", [], "any", false, false, false, 42), ", "), "html", null, true);
echo "</div>
";
} elseif (twig_in_filter("Ordered", twig_join_filter(twig_get_attribute($this->env, $this->source, // line 43
$context["movie"], "status", [], "any", false, false, false, 43), ", "))) {
// line 44
echo " <div class=\"badge\">";
echo twig_escape_filter($this->env, twig_join_filter(twig_get_attribute($this->env, $this->source, $context["movie"], "status", [], "any", false, false, false, 44), ", "), "html", null, true);
echo "</div>
";
} elseif (twig_test_empty(twig_get_attribute($this->env, $this->source, // line 45
$context["movie"], "status", [], "any", false, false, false, 45))) {
// line 46
echo " <div class=\"badge\">Not owned</div>
";
} else {
// line 48
echo "
";
}
// line 50
echo " <div data-content=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["movie"], "title", [0 => "de"], "method", false, false, false, 50), "html", null, true);
echo "\" class=\"image\">
";
// line 52
echo " ";
if ($context["movie"]) {
// line 53
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["movie"], "getImageURL", [], "method", false, false, false, 53), "getUrl", [], "method", false, false, false, 53) != "")) {
// line 54
echo " ";
// line 55
echo " <img class\"img-fluid\" src=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["movie"], "getImageURL", [], "method", false, false, false, 55), "getUrl", [], "method", false, false, false, 55), "html", null, true);
echo "\"/>
";
} else {
// line 57
echo " <img class\"img-fluid\" style=\"margin-right: 25px; margin-bottom: 15px;\" src=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["fallbackImage"]) || array_key_exists("fallbackImage", $context) ? $context["fallbackImage"] : (function () { throw new RuntimeError('Variable "fallbackImage" does not exist.', 57, $this->source); })()), "getThumbnail", [0 => "MovieGrid"], "method", false, false, false, 57), "html", null, true);
echo "\" />
";
}
// line 59
echo " ";
}
// line 60
echo "
</div>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['movie'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 65
echo "
</div>
</div>
<div class=\"pt-5\">
";
// line 72
$this->loadTemplate("includes/pagination.html.twig", "movie/movies.html.twig", 72)->display($context);
// line 73
echo "
</div>
";
} else {
// line 77
echo " <h1 class=\"d-flex justify-content-center\">Keine Suchergebnisse für \"";
echo twig_escape_filter($this->env, (isset($context["searchTerm"]) || array_key_exists("searchTerm", $context) ? $context["searchTerm"] : (function () { throw new RuntimeError('Variable "searchTerm" does not exist.', 77, $this->source); })()), "html", null, true);
echo "\" </h1>
";
}
// line 80
echo "
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "movie/movies.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 226 => 80, 219 => 77, 213 => 73, 211 => 72, 202 => 65, 192 => 60, 189 => 59, 183 => 57, 177 => 55, 175 => 54, 172 => 53, 169 => 52, 164 => 50, 160 => 48, 156 => 46, 154 => 45, 149 => 44, 147 => 43, 142 => 42, 140 => 41, 136 => 40, 130 => 39, 125 => 36, 121 => 34, 115 => 32, 113 => 31, 108 => 29, 105 => 28, 102 => 27, 99 => 26, 97 => 25, 93 => 23, 91 => 14, 85 => 11, 81 => 9, 78 => 8, 75 => 7, 73 => 6, 68 => 3, 58 => 2, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'layouts/layout.html.twig' %}
{% block content %}
<div id=\"main-content\" class=\"main-content\">
{% if document.getTitle() is empty %}
{% do pimcore_head_title(pimcore_input('headline').getData(), 'PREPEND') %}
{% endif %}
<div class=\"page-header\">
<h1>{{ pimcore_input('headline', {'placeholder':'Headline'}) }}</h1>
</div>
{{
pimcore_areablock('content', {
'allowed': [
'headlines',
'hero-teaser',
'horizontal-line',
'wysiwyg'
]
})
}}
{% if document.getTitle() is empty %}
{% do pimcore_head_title(pimcore_input('headline').getData(), 'PREPEND') %}
{% endif %}
{% if movies|length > 0 %}
<div>
{% if searchTerm %}
<h1 class=\"d-flex justify-content-center\">Suchergebnisse für \"{{searchTerm}}\" </h1>
{% else %}
<h1 class=\"d-flex justify-content-center\">All Movies </h1>
{% endif %}
</div>
<div class=\"row\">
<div class=\"d-flex flex-wrap\">
{% for movie in movies %}
<a href=\"/movie-detail/{{movie.id}}\">
{% if \"Not Owned\" in movie.status|join(', ') %}
<div class=\"badge\">{{movie.status|join(', ')}}</div>
{% elseif \"Ordered\" in movie.status|join(', ') %}
<div class=\"badge\">{{movie.status|join(', ')}}</div>
{% elseif movie.status is empty %}
<div class=\"badge\">Not owned</div>
{% else %}
{% endif %}
<div data-content=\"{{ movie.title(\"de\")}}\" class=\"image\">
{# @var movies \\Pimcore\\Model\\DataObject\\Movies #}
{% if movie %}
{% if movie.getImageURL().getUrl() != \"\" %}
{# TODO get Image Thumbnail #}
<img class\"img-fluid\" src=\"{{ movie.getImageURL().getUrl() }}\"/>
{% else %}
<img class\"img-fluid\" style=\"margin-right: 25px; margin-bottom: 15px;\" src=\"{{fallbackImage.getThumbnail(\"MovieGrid\") }}\" />
{% endif %}
{% endif %}
</div>
</a>
{% endfor %}
</div>
</div>
<div class=\"pt-5\">
{% include 'includes/pagination.html.twig' %}
</div>
{% else %}
<h1 class=\"d-flex justify-content-center\">Keine Suchergebnisse für \"{{searchTerm}}\" </h1>
{% endif %}
</div>
{% endblock %}
", "movie/movies.html.twig", "/var/www/pimcore/MovieCollection/templates/movie/movies.html.twig");
}
}