<?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;
/* @AqarmapMainBundle/Default/locationsSubLinks.html.twig */
class __TwigTemplate_129971f0a422a7f5be07c7b828a1718d3cf1d57245317a20448d73abf93576ee 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", "@AqarmapMainBundle/Default/locationsSubLinks.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@AqarmapMainBundle/Default/locationsSubLinks.html.twig"));
// line 1
echo "<div class=\"clearfix\">
<div class=\"page-header\">
<h3>
";
// line 4
if ((array_key_exists("location", $context) && (isset($context["location"]) || array_key_exists("location", $context) ? $context["location"] : (function () { throw new RuntimeError('Variable "location" does not exist.', 4, $this->source); })()))) {
// line 5
echo " ";
if (( !array_key_exists("section", $context) || !array_key_exists("propertyType", $context))) {
// line 6
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("listing.subs_location_links", ["%location%" => twig_get_attribute($this->env, $this->source, (isset($context["location"]) || array_key_exists("location", $context) ? $context["location"] : (function () { throw new RuntimeError('Variable "location" does not exist.', 6, $this->source); })()), "title", [], "any", false, false, false, 6)]), "html", null, true);
echo "
";
} else {
// line 8
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("listing.subs_locations_links", ["%location%" => twig_get_attribute($this->env, $this->source, (isset($context["location"]) || array_key_exists("location", $context) ? $context["location"] : (function () { throw new RuntimeError('Variable "location" does not exist.', 8, $this->source); })()), "title", [], "any", false, false, false, 8), "%property_type%" => (((isset($context["propertyType"]) || array_key_exists("propertyType", $context) ? $context["propertyType"] : (function () { throw new RuntimeError('Variable "propertyType" does not exist.', 8, $this->source); })())) ? (twig_get_attribute($this->env, $this->source, (isset($context["propertyType"]) || array_key_exists("propertyType", $context) ? $context["propertyType"] : (function () { throw new RuntimeError('Variable "propertyType" does not exist.', 8, $this->source); })()), "title", [], "any", false, false, false, 8)) : (null)), "%section%" => (((isset($context["section"]) || array_key_exists("section", $context) ? $context["section"] : (function () { throw new RuntimeError('Variable "section" does not exist.', 8, $this->source); })())) ? (twig_get_attribute($this->env, $this->source, (isset($context["section"]) || array_key_exists("section", $context) ? $context["section"] : (function () { throw new RuntimeError('Variable "section" does not exist.', 8, $this->source); })()), "title", [], "any", false, false, false, 8)) : (""))]), "html", null, true);
echo "
";
}
// line 10
echo " ";
} else {
// line 11
echo " ";
if (($this->extensions['Aqarmap\Bundle\MainBundle\Twig\SettingExtension']->getSetting("general", "country") == "EG")) {
// line 12
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("listing.search_inside_cities_eg"), "html", null, true);
echo "
";
} elseif (($this->extensions['Aqarmap\Bundle\MainBundle\Twig\SettingExtension']->getSetting("general", "country") == "SA")) {
// line 14
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("listing.search_inside_cities_sa"), "html", null, true);
echo "
";
}
// line 16
echo " ";
}
// line 17
echo " </h3>
</div>
";
// line 19
if (array_key_exists("subLinksSections", $context)) {
// line 20
echo " <ul class=\"nav nav-pills\">
";
// line 21
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["subLinksSections"]) || array_key_exists("subLinksSections", $context) ? $context["subLinksSections"] : (function () { throw new RuntimeError('Variable "subLinksSections" does not exist.', 21, $this->source); })()));
$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["section"]) {
// line 22
echo " <li>
<a data-toggle=\"pill\" href=\"#sectionLinks";
// line 23
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 23), "html", null, true);
echo "\" ";
echo (((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 23) == true)) ? (" class=\"active\"") : (""));
echo ">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["section"], "title", [], "any", false, false, false, 23), "html", null, true);
echo "</a>
</li>
";
++$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['section'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo " </ul>
";
}
// line 28
echo "
<div class=\"tab-content\">
";
// line 30
if (((array_key_exists("location", $context) && (isset($context["location"]) || array_key_exists("location", $context) ? $context["location"] : (function () { throw new RuntimeError('Variable "location" does not exist.', 30, $this->source); })())) && twig_in_filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 30, $this->source); })()), "request", [], "any", false, false, false, 30), "attributes", [], "any", false, false, false, 30), "get", [0 => "_route"], "method", false, false, false, 30), [0 => "compound_search", 1 => "neighborhood_discussion_list", 2 => "neighborhood_all_locations", 3 => "neighborhood_main_page", 4 => "compound_search_with_location"]))) {
// line 31
echo " ";
$this->loadTemplate("@AqarmapMainBundle/Default/locationSectionIndexedSubLinks.html.twig", "@AqarmapMainBundle/Default/locationsSubLinks.html.twig", 31)->display($context);
// line 32
echo " ";
} else {
// line 33
echo " ";
if (array_key_exists("subLinksSections", $context)) {
// line 34
echo " ";
$this->loadTemplate("@AqarmapMainBundle/Default/locationSectionIndexedSubLinks.html.twig", "@AqarmapMainBundle/Default/locationsSubLinks.html.twig", 34)->display($context);
// line 35
echo " ";
} elseif (array_key_exists("section", $context)) {
// line 36
echo " <div id='sectionLinks' class=\"tab-pane active\">
<div id=\"moreLocationsContainer\" class=\"subsLinks sectionLoadMore\">
";
// line 38
$context["sub_locations_links"] = $this->extensions['Knp\Menu\Twig\MenuExtension']->get("aqarmap.subLocations_search.menus", [], ["attributes" => ["id" => "sud-locations-links", "section" => (isset($context["section"]) || array_key_exists("section", $context) ? $context["section"] : (function () { throw new RuntimeError('Variable "section" does not exist.', 38, $this->source); })())]]);
// line 39
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["sub_locations_links"]) || array_key_exists("sub_locations_links", $context) ? $context["sub_locations_links"] : (function () { throw new RuntimeError('Variable "sub_locations_links" does not exist.', 39, $this->source); })()), "children", [], "any", false, false, false, 39)) {
// line 40
echo " <div class=\"clearfix\">
";
// line 41
echo $this->extensions['Knp\Menu\Twig\MenuExtension']->render((isset($context["sub_locations_links"]) || array_key_exists("sub_locations_links", $context) ? $context["sub_locations_links"] : (function () { throw new RuntimeError('Variable "sub_locations_links" does not exist.', 41, $this->source); })()), ["template" => "@AqarmapListingBundle/ListingSearch/subLinksTemplate.html.twig"]);
echo "
</div>
";
}
// line 44
echo " </div>
</div>
";
}
// line 47
echo " ";
}
// line 48
echo "
</div>
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "@AqarmapMainBundle/Default/locationsSubLinks.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 187 => 48, 184 => 47, 179 => 44, 173 => 41, 170 => 40, 167 => 39, 165 => 38, 161 => 36, 158 => 35, 155 => 34, 152 => 33, 149 => 32, 146 => 31, 144 => 30, 140 => 28, 136 => 26, 115 => 23, 112 => 22, 95 => 21, 92 => 20, 90 => 19, 86 => 17, 83 => 16, 77 => 14, 71 => 12, 68 => 11, 65 => 10, 59 => 8, 53 => 6, 50 => 5, 48 => 4, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"clearfix\">
<div class=\"page-header\">
<h3>
{% if location is defined and location %}
{% if section is not defined or propertyType is not defined %}
{{ 'listing.subs_location_links'|trans({'%location%': location.title}) }}
{% else %}
{{ 'listing.subs_locations_links'|trans({'%location%': location.title, '%property_type%': propertyType ? propertyType.title: null, '%section%': section ? section.title: ''}) }}
{% endif %}
{% else %}
{% if get_setting('general', 'country') == 'EG' %}
{{ 'listing.search_inside_cities_eg'|trans }}
{% elseif get_setting('general', 'country') == 'SA' %}
{{ 'listing.search_inside_cities_sa'|trans }}
{% endif %}
{% endif %}
</h3>
</div>
{% if subLinksSections is defined %}
<ul class=\"nav nav-pills\">
{% for section in subLinksSections %}
<li>
<a data-toggle=\"pill\" href=\"#sectionLinks{{ loop.index }}\" {{ loop.first == true ? ' class=\"active\"' : '' }}>{{ section.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
<div class=\"tab-content\">
{% if location is defined and location and app.request.attributes.get('_route') in [\"compound_search\", \"neighborhood_discussion_list\", \"neighborhood_all_locations\", \"neighborhood_main_page\", \"compound_search_with_location\"] %}
{% include \"@AqarmapMainBundle/Default/locationSectionIndexedSubLinks.html.twig\" %}
{% else %}
{% if subLinksSections is defined %}
{% include \"@AqarmapMainBundle/Default/locationSectionIndexedSubLinks.html.twig\" %}
{% elseif section is defined %}
<div id='sectionLinks' class=\"tab-pane active\">
<div id=\"moreLocationsContainer\" class=\"subsLinks sectionLoadMore\">
{% set sub_locations_links = knp_menu_get( 'aqarmap.subLocations_search.menus' ,[], {'attributes': {'id': 'sud-locations-links', 'section': section}}) %}
{% if sub_locations_links.children %}
<div class=\"clearfix\">
{{ knp_menu_render(sub_locations_links, {'template': '@AqarmapListingBundle/ListingSearch/subLinksTemplate.html.twig'}) }}
</div>
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>
", "@AqarmapMainBundle/Default/locationsSubLinks.html.twig", "/srv/moonshot/src/Aqarmap/Bundle/MainBundle/Resources/views/Default/locationsSubLinks.html.twig");
}
}