<?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;
/* @AqarmapNeighborhoodBundle/card.html.twig */
class __TwigTemplate_b8b918d688e9adff29b2917070c5345e1354e2112cdea92d28fcc4c8eb2c2175 extends \Twig\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", "@AqarmapNeighborhoodBundle/card.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@AqarmapNeighborhoodBundle/card.html.twig"));
// line 1
echo "<div class=\"listing-card clearfix\">
<a href=\"";
// line 2
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("neighborhood_main_page", ["location_slug" => twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 2, $this->source); })()), "slug", [], "any", false, false, false, 2)]), "html", null, true);
echo "\" target=\"_blank\">
";
// line 3
if (twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 3, $this->source); })()), "mainPhoto", [], "any", false, false, false, 3)) {
// line 4
echo " <img class=\"lazyload\" src=\"/images/placeholder.svg\" data-src=\"";
echo twig_escape_filter($this->env, $this->extensions['Aqarmap\Bundle\MainBundle\Twig\ThumbnailExtension']->getThumbnail($this->extensions['Aqarmap\Bundle\ListingBundle\Twig\ListingShareExtension']->customVichUploaderAsset(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 4, $this->source); })()), "mainPhoto", [], "any", false, false, false, 4), "file", [], "any", false, false, false, 4), "file"), "search-thumb"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, $this->extensions['Aqarmap\Bundle\ListingBundle\Twig\ListingExtension']->excludeNumbers(twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 4, $this->source); })()), "title", [], "any", false, false, false, 4)), "html", null, true);
echo "\" width=\"368\">
";
} else {
// line 6
echo " <img src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("https://placehold.it/368x250/FCFCFC/B6B6B6&text=No+Photo"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 6, $this->source); })()), "title", [], "any", false, false, false, 6), "html", null, true);
echo "\" width=\"368\">
";
}
// line 8
echo " </a>
<p class=\"titleTag\"><a href=\"";
// line 9
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("neighborhood_main_page", ["location_slug" => twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 9, $this->source); })()), "slug", [], "any", false, false, false, 9)]), "html", null, true);
echo "\" target=\"_blank\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 9, $this->source); })()), "title", [], "any", false, false, false, 9), "html", null, true);
echo "</a></p>
";
// line 10
if ((twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 10, $this->source); })()), "compoundFilter", [], "any", false, false, false, 10) && (twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 10, $this->source); })()), "propertyTypes", [], "any", false, false, false, 10)) > 0))) {
// line 11
echo " <p>
";
// line 12
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 12, $this->source); })()), "propertyTypes", [], "any", false, false, false, 12));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["propertytype"]) {
// line 13
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["propertytype"], "title", [], "any", false, false, false, 13), "html", null, true);
echo " ";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "last", [], "any", false, false, false, 13)) {
echo " - ";
}
// line 14
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['propertytype'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 15
echo " </p>
";
}
// line 17
echo " <div class=\"clearfix priceContainer\">
<a href=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("neighborhood_main_page", ["location_slug" => twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 18, $this->source); })()), "slug", [], "any", false, false, false, 18)]), "html", null, true);
echo "\" target=\"_blank\" class=\"detailsButton\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("layout.details_button"), "html", null, true);
echo "</a>
";
// line 19
if ((twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 19, $this->source); })()), "getSingleStatistics", [], "method", false, false, false, 19) && twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 19, $this->source); })()), "getSingleStatistics", [], "method", false, false, false, 19), "avgPrice", [], "any", false, false, false, 19))) {
// line 20
echo " <ul>
<li id=\"price\"><span class=\"integer\">";
// line 21
echo twig_escape_filter($this->env, twig_number_format_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["neighborhood"]) || array_key_exists("neighborhood", $context) ? $context["neighborhood"] : (function () { throw new RuntimeError('Variable "neighborhood" does not exist.', 21, $this->source); })()), "getSingleStatistics", [], "method", false, false, false, 21), "avgPrice", [], "any", false, false, false, 21)), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans($this->extensions['Aqarmap\Bundle\MainBundle\Twig\SettingExtension']->getSetting("general", "currency")), "html", null, true);
echo "</span>
</li>
<li> ";
// line 23
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("neighborhoods.average"), "html", null, true);
echo "</li>
</ul>
";
}
// line 26
echo " </div>
</div><!-- end .neighborhood.clearfix -->
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@AqarmapNeighborhoodBundle/card.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 151 => 26, 145 => 23, 138 => 21, 135 => 20, 133 => 19, 127 => 18, 124 => 17, 120 => 15, 106 => 14, 99 => 13, 82 => 12, 79 => 11, 77 => 10, 71 => 9, 68 => 8, 60 => 6, 52 => 4, 50 => 3, 46 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"listing-card clearfix\">
<a href=\"{{ path('neighborhood_main_page', {'location_slug' : neighborhood.slug })}}\" target=\"_blank\">
{% if neighborhood.mainPhoto %}
<img class=\"lazyload\" src=\"/images/placeholder.svg\" data-src=\"{{ custom_vich_uploader_asset(neighborhood.mainPhoto.file, 'file') | thumbnail('search-thumb') }}\" alt=\"{{ neighborhood.title|excludeNumbers }}\" width=\"368\">
{% else %}
<img src=\"{{ asset('https://placehold.it/368x250/FCFCFC/B6B6B6&text=No+Photo') }}\" alt=\"{{ neighborhood.title }}\" width=\"368\">
{% endif %}
</a>
<p class=\"titleTag\"><a href=\"{{ path('neighborhood_main_page', {'location_slug' : neighborhood.slug })}}\" target=\"_blank\">{{ neighborhood.title }}</a></p>
{% if neighborhood.compoundFilter and neighborhood.propertyTypes|length > 0 %}
<p>
{% for propertytype in neighborhood.propertyTypes %}
{{ propertytype.title }} {% if not loop.last %} - {% endif %}
{% endfor %}
</p>
{% endif %}
<div class=\"clearfix priceContainer\">
<a href=\"{{ path('neighborhood_main_page', {'location_slug' : neighborhood.slug })}}\" target=\"_blank\" class=\"detailsButton\">{{ 'layout.details_button'|trans }}</a>
{% if neighborhood.getSingleStatistics() and neighborhood.getSingleStatistics().avgPrice %}
<ul>
<li id=\"price\"><span class=\"integer\">{{ neighborhood.getSingleStatistics().avgPrice|number_format }} {{ get_setting('general', 'currency')|trans }}</span>
</li>
<li> {{ \"neighborhoods.average\"|trans }}</li>
</ul>
{% endif %}
</div>
</div><!-- end .neighborhood.clearfix -->
", "@AqarmapNeighborhoodBundle/card.html.twig", "/srv/moonshot/src/Aqarmap/Bundle/NeighborhoodBundle/Resources/views/card.html.twig");
}
}