var/cache/dev/twig/ba/bacf4ad3848999292868448e8de14c6d.php line 53

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @NotarisFrontend/addressbook/search.html.twig */
  14. class __TwigTemplate_df1ddb5b6f2c9294dfd530440117b69e extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source = $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this, 'block_title'],
  24.             'extralinks' => [$this, 'block_extralinks'],
  25.             'extrameta' => [$this, 'block_extrameta'],
  26.             'body' => [$this, 'block_body'],
  27.             'extrajs' => [$this, 'block_extrajs'],
  28.             'extracss' => [$this, 'block_extracss'],
  29.         ];
  30.     }
  31.     protected function doGetParent(array $context)
  32.     {
  33.         // line 1
  34.         return "@NotarisFrontend/layout2017.html.twig";
  35.     }
  36.     protected function doDisplay(array $context, array $blocks = [])
  37.     {
  38.         $macros = $this->macros;
  39.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@NotarisFrontend/addressbook/search.html.twig"));
  41.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@NotarisFrontend/addressbook/search.html.twig"));
  43.         $this->parent = $this->loadTemplate("@NotarisFrontend/layout2017.html.twig", "@NotarisFrontend/addressbook/search.html.twig", 1);
  44.         $this->parent->display($context, array_merge($this->blocks, $blocks));
  45.         
  46.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  47.         
  48.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49.     }
  50.     // line 3
  51.     public function block_title($context, array $blocks = [])
  52.     {
  53.         $macros = $this->macros;
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  58.         // line 4
  59.         echo "    <title>";
  60.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_notary_search_title"), "html", null, true);
  61.         echo "</title>
  62. ";
  63.         
  64.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  65.         
  66.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  67.     }
  68.     // line 7
  69.     public function block_extralinks($context, array $blocks = [])
  70.     {
  71.         $macros = $this->macros;
  72.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  73.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extralinks"));
  74.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  75.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extralinks"));
  76.         // line 8
  77.         echo "    ";
  78.         $context["hreflang_start_nl"] = (((isset($context["url_scheme"]) || array_key_exists("url_scheme", $context) ? $context["url_scheme"] : (function () { throw new RuntimeError('Variable "url_scheme" does not exist.', 8, $this->source); })()) . "://www.") . (isset($context["url_nl"]) || array_key_exists("url_nl", $context) ? $context["url_nl"] : (function () { throw new RuntimeError('Variable "url_nl" does not exist.', 8, $this->source); })()));
  79.         // line 9
  80.         echo "    ";
  81.         $context["hreflang_start_fr"] = (((isset($context["url_scheme"]) || array_key_exists("url_scheme", $context) ? $context["url_scheme"] : (function () { throw new RuntimeError('Variable "url_scheme" does not exist.', 9, $this->source); })()) . "://www.") . (isset($context["url_fr"]) || array_key_exists("url_fr", $context) ? $context["url_fr"] : (function () { throw new RuntimeError('Variable "url_fr" does not exist.', 9, $this->source); })()));
  82.         // line 10
  83.         echo "    ";
  84.         $context["hreflang_nl"] = ((isset($context["hreflang_start_nl"]) || array_key_exists("hreflang_start_nl", $context) ? $context["hreflang_start_nl"] : (function () { throw new RuntimeError('Variable "hreflang_start_nl" does not exist.', 10, $this->source); })()) . $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook"));
  85.         // line 11
  86.         echo "    ";
  87.         $context["hreflang_fr"] = ((isset($context["hreflang_start_fr"]) || array_key_exists("hreflang_start_fr", $context) ? $context["hreflang_start_fr"] : (function () { throw new RuntimeError('Variable "hreflang_start_fr" does not exist.', 11, $this->source); })()) . $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook"));
  88.         // line 12
  89.         echo "
  90.     <link rel=\"alternate\" hreflang=\"nl-be\"
  91.           href=\"";
  92.         // line 14
  93.         echo twig_escape_filter($this->env, (isset($context["hreflang_nl"]) || array_key_exists("hreflang_nl", $context) ? $context["hreflang_nl"] : (function () { throw new RuntimeError('Variable "hreflang_nl" does not exist.', 14, $this->source); })()), "html", null, true);
  94.         echo "\"/>
  95.     <link rel=\"alternate\" hreflang=\"fr-be\"
  96.           href=\"";
  97.         // line 16
  98.         echo twig_escape_filter($this->env, (isset($context["hreflang_fr"]) || array_key_exists("hreflang_fr", $context) ? $context["hreflang_fr"] : (function () { throw new RuntimeError('Variable "hreflang_fr" does not exist.', 16, $this->source); })()), "html", null, true);
  99.         echo "\"/>
  100.     <link rel=\"alternate\" hreflang=\"x-default\"
  101.           href=\"";
  102.         // line 18
  103.         echo twig_escape_filter($this->env, (isset($context["hreflang_nl"]) || array_key_exists("hreflang_nl", $context) ? $context["hreflang_nl"] : (function () { throw new RuntimeError('Variable "hreflang_nl" does not exist.', 18, $this->source); })()), "html", null, true);
  104.         echo "\"/>
  105. ";
  106.         
  107.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  108.         
  109.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  110.     }
  111.     // line 21
  112.     public function block_extrameta($context, array $blocks = [])
  113.     {
  114.         $macros = $this->macros;
  115.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  116.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extrameta"));
  117.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  118.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extrameta"));
  119.         // line 22
  120.         echo "    ";
  121.         $this->displayParentBlock("extrameta", $context, $blocks);
  122.         echo "
  123.     <meta name=\"keywords\" content=\"";
  124.         // line 23
  125.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_notary_search_keywords"), "html", null, true);
  126.         echo "\"/>
  127.     <meta name=\"description\" lang=\"";
  128.         // line 24
  129.         echo twig_escape_filter($this->env, (isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 24, $this->source); })()), "html", null, true);
  130.         echo "\" content=\"";
  131.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_notary_search_description"), "html", null, true);
  132.         echo "\"/>
  133.     ";
  134.         // line 25
  135.         if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["subsite"]) || array_key_exists("subsite", $context) ? $context["subsite"] : (function () { throw new RuntimeError('Variable "subsite" does not exist.', 25, $this->source); })()), "meta", [], "any", false, false, false, 25), "ogTitle", [], "any", false, false, false, 25) != "")) {
  136.             // line 26
  137.             echo "        <meta property=\"og:title\" content=\"";
  138.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_notary_search_title"), "html", null, true);
  139.             echo "\"/>
  140.         <meta property=\"og:type\" content=\"article\"/>
  141.         <meta property=\"og:url\" content=\" ";
  142.             // line 28
  143.             echo twig_escape_filter($this->env, 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.', 28, $this->source); })()), "request", [], "any", false, false, false, 28), "uri", [], "any", false, false, false, 28), "html", null, true);
  144.             echo "\"/>
  145.     ";
  146.         }
  147.         // line 30
  148.         echo "    ";
  149.         if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["subsite"]) || array_key_exists("subsite", $context) ? $context["subsite"] : (function () { throw new RuntimeError('Variable "subsite" does not exist.', 30, $this->source); })()), "meta", [], "any", false, false, false, 30), "ogDescription", [], "any", false, false, false, 30) != "")) {
  150.             // line 31
  151.             echo "        <meta property=\"og:description\" content=\"";
  152.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["subsite"]) || array_key_exists("subsite", $context) ? $context["subsite"] : (function () { throw new RuntimeError('Variable "subsite" does not exist.', 31, $this->source); })()), "meta", [], "any", false, false, false, 31), "ogDescription", [], "any", false, false, false, 31), "html", null, true);
  153.             echo "\"/>
  154.     ";
  155.         }
  156.         
  157.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  158.         
  159.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  160.     }
  161.     // line 35
  162.     public function block_body($context, array $blocks = [])
  163.     {
  164.         $macros = $this->macros;
  165.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  166.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  167.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  168.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  169.         // line 36
  170.         echo "    <section class=\"content u-padding-top-large\">
  171.         <aside id=\"content-left\" class=\"content-left-small hidesmartphone\">
  172.             <nav class=\"standard-nav\">
  173.                 <ul class=\"u-margin-left-none u-padding-left-none\">
  174.                     <li class=\"active\">
  175.                         <div class=\"activestate\">&nbsp;</div>
  176.                         <a href=\"#\" title=\"";
  177.         // line 42
  178.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search");
  179.         echo "\" class=\"hi\">";
  180.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search");
  181.         echo "</a>
  182.                     </li>
  183.                 </ul>
  184.             </nav>
  185.         </aside>
  186.         <div id=\"content-center\" class=\"content-center-large ";
  187.         // line 48
  188.         echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["subsite"]) || array_key_exists("subsite", $context) ? $context["subsite"] : (function () { throw new RuntimeError('Variable "subsite" does not exist.', 48, $this->source); })()), "stylesheet", [], "any", false, false, false, 48), "html", null, true);
  189.         echo "\">
  190.             <section id=\"info\" class=\"no-margin\">
  191.                 <div class=\"tab-by-name active\">";
  192.         // line 50
  193.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_by_name");
  194.         echo "</div><div class=\"tab-by-location inactive\">";
  195.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_by_location");
  196.         echo "</div>
  197.                 <form action=\"";
  198.         // line 51
  199.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook");
  200.         echo "\" method=\"get\" class=\"u-padding-top-large u-padding-small form-by-name o-layout__item--relative\">
  201.                     <span class=\"addressbook-results-empty u-margin-bottom-small u-display--block\" ";
  202.         // line 52
  203.         if (((null === 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.', 52, $this->source); })()), "request", [], "any", false, false, false, 52), "query", [], "any", false, false, false, 52), "get", [0 => "query"], "method", false, false, false, 52)) ||  !twig_test_empty((isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 52, $this->source); })())))) {
  204.             echo "style=\"display: none\"";
  205.         }
  206.         echo ">";
  207.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_no_results", ["%link%" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook_deed")]);
  208.         echo "<br></span>
  209.                     <span class=\"addressbook-input-empty\" style=\"display: none;\">";
  210.         // line 53
  211.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_no_input");
  212.         echo "<br></span>
  213.                     <input type=\"text\" placeholder=\"";
  214.         // line 54
  215.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_placeholder_name"), "html", null, true);
  216.         echo "\" name=\"query\" id=\"addressbookSearch\" ";
  217.         if ( !(null === 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.', 54, $this->source); })()), "request", [], "any", false, false, false, 54), "query", [], "any", false, false, false, 54), "get", [0 => "query"], "method", false, false, false, 54))) {
  218.             echo "value=\"";
  219.             echo twig_escape_filter($this->env, 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.', 54, $this->source); })()), "request", [], "any", false, false, false, 54), "query", [], "any", false, false, false, 54), "get", [0 => "query"], "method", false, false, false, 54), "html", null, true);
  220.             echo "\"";
  221.         }
  222.         echo "/>
  223.                     <div id=\"addressbook-menu-container\"></div>
  224.                     <button type=\"submit\" class=\"c-btn--primary u-color-white addressbook-search-button\" style=\"vertical-align: top\">
  225.                         ";
  226.         // line 57
  227.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_button"), "html", null, true);
  228.         echo "
  229.                     </button>
  230.                     <div class=\"u-margin-top-small\">";
  231.         // line 59
  232.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_notary_footer");
  233.         echo "</div>
  234.                 </form>
  235.                 <form action=\"";
  236.         // line 61
  237.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook");
  238.         echo "\" method=\"get\" class=\"u-padding-top-large u-padding-small form-by-location\" style=\"display: none\">
  239.                     <span class=\"addressbook-location-results-empty u-margin-bottom-small u-display--block\" ";
  240.         // line 62
  241.         if (((null === 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.', 62, $this->source); })()), "request", [], "any", false, false, false, 62), "query", [], "any", false, false, false, 62), "get", [0 => "query"], "method", false, false, false, 62)) ||  !twig_test_empty((isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 62, $this->source); })())))) {
  242.             echo "style=\"display: none\"";
  243.         }
  244.         echo ">";
  245.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_location_no_results");
  246.         echo "</span>
  247.                     <span class=\"addressbook-location-results-empty2 u-margin-bottom-small u-display--block\" ";
  248.         // line 63
  249.         if (((null === 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.', 63, $this->source); })()), "request", [], "any", false, false, false, 63), "query", [], "any", false, false, false, 63), "all", [0 => "queryLocation"], "method", false, false, false, 63)) ||  !twig_test_empty((isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 63, $this->source); })())))) {
  250.             echo "style=\"display: none\"";
  251.         }
  252.         echo ">";
  253.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_location_no_results2");
  254.         echo "</span>
  255.                     <span class=\"addressbook-location-selected-too-many u-margin-bottom-small u-display--block\" style=\"display: none\">";
  256.         // line 64
  257.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_location_selected_too_many");
  258.         echo "</span>
  259.                     <div class=\"form-by-location-container\">
  260.                         <input type=\"text\" placeholder=\"";
  261.         // line 66
  262.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_location_placeholder_name"), "html", null, true);
  263.         echo "\" name=\"query-location\" id=\"addressbookLocationSearch\" style=\"height: 46px;min-height: 46px;padding-right: 5px;\" ";
  264.         if ( !(null === 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.', 66, $this->source); })()), "request", [], "any", false, false, false, 66), "query", [], "any", false, false, false, 66), "get", [0 => "query-location"], "method", false, false, false, 66))) {
  265.             echo "value=\"";
  266.             echo twig_escape_filter($this->env, 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.', 66, $this->source); })()), "request", [], "any", false, false, false, 66), "query", [], "any", false, false, false, 66), "get", [0 => "query-location"], "method", false, false, false, 66), "html", null, true);
  267.             echo "\"";
  268.         }
  269.         echo "/>
  270.                         <div class=\"municipalities\"></div>
  271.                         <div id=\"addressbook-location-menu-container\" style=\"position: absolute\"></div>
  272.                         <div class=\"u-margin-top-tiny\">
  273.                             <input type=\"checkbox\" name=\"mediators\" id=\"mediators\" style=\"width: auto;\" ";
  274.         // line 70
  275.         if ( !(null === 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.', 70, $this->source); })()), "request", [], "any", false, false, false, 70), "query", [], "any", false, false, false, 70), "get", [0 => "mediators"], "method", false, false, false, 70))) {
  276.             echo "checked";
  277.         }
  278.         echo "/>
  279.                             <label for=\"mediators\" class=\"u-margin-left-tiny\">";
  280.         // line 71
  281.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("md_bemiddelaar");
  282.         echo "</label>
  283.                         </div>
  284.                         <div class=\"u-margin-top-tiny\">
  285.                             <input type=\"checkbox\" name=\"show_on_map\" id=\"show_on_map\" style=\"width: auto;\" ";
  286.         // line 74
  287.         if ( !(null === 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.', 74, $this->source); })()), "request", [], "any", false, false, false, 74), "query", [], "any", false, false, false, 74), "get", [0 => "show_on_map"], "method", false, false, false, 74))) {
  288.             echo "checked";
  289.         }
  290.         echo "/>
  291.                             <label for=\"show_on_map\" class=\"u-margin-left-tiny\">";
  292.         // line 75
  293.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("md_kaart"), "html", null, true);
  294.         echo "</label>
  295.                         </div>
  296.                         <select name=\"language\" class=\"u-margin-top-tiny location-select\">
  297.                             <option value=\"\">";
  298.         // line 78
  299.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("md_kennis"), "html", null, true);
  300.         echo "</option>
  301.                             ";
  302.         // line 79
  303.         $context["languages"] = $this->extensions['Notaris\FrontendBundle\Twig\NotarySearchLanguageExtension']->getNotarySearchLanguage();
  304.         // line 80
  305.         echo "                            ";
  306.         $context['_parent'] = $context;
  307.         $context['_seq'] = twig_ensure_traversable((isset($context["languages"]) || array_key_exists("languages", $context) ? $context["languages"] : (function () { throw new RuntimeError('Variable "languages" does not exist.', 80, $this->source); })()));
  308.         foreach ($context['_seq'] as $context["_key"] => $context["language"]) {
  309.             // line 81
  310.             echo "                                <option value=\"";
  311.             echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["language"], "languageShort", [], "any", false, false, false, 81), "html", null, true);
  312.             echo "\" ";
  313.             if ((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.', 81, $this->source); })()), "request", [], "any", false, false, false, 81), "query", [], "any", false, false, false, 81), "get", [0 => "language"], "method", false, false, false, 81) == twig_get_attribute($this->env, $this->source, $context["language"], "languageShort", [], "any", false, false, false, 81))) {
  314.                 echo "selected";
  315.             }
  316.             echo ">";
  317.             echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["language"], "language", [], "any", false, false, false, 81)), "html", null, true);
  318.             echo "</option>;
  319.                             ";
  320.         }
  321.         $_parent = $context['_parent'];
  322.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['language'], $context['_parent'], $context['loop']);
  323.         $context = array_intersect_key($context, $_parent) + $_parent;
  324.         // line 83
  325.         echo "                        </select>
  326.                         <button type=\"submit\" class=\"c-btn--primary u-color-white u-margin-top-tiny addressbook-search-location-button\">
  327.                             ";
  328.         // line 85
  329.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_button"), "html", null, true);
  330.         echo "
  331.                         </button>
  332.                         <div class=\"u-margin-top-small\">";
  333.         // line 87
  334.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_notary_footer");
  335.         echo "</div>
  336.                     </div>
  337.                 </form>
  338.                 ";
  339.         // line 91
  340.         if ( !twig_test_empty((isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 91, $this->source); })()))) {
  341.             // line 92
  342.             echo "                    <div class=\"results-header u-margin-top-large u-padding-tiny u-padding-bottom-small u-padding-top-small\">
  343.                         ";
  344.             // line 93
  345.             if ((twig_length_filter($this->env, (isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 93, $this->source); })())) == 1)) {
  346.                 // line 94
  347.                 echo "                            ";
  348.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_top_one_result");
  349.                 echo "
  350.                         ";
  351.             } elseif ((twig_length_filter($this->env,             // line 95
  352. (isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 95, $this->source); })())) > 1)) {
  353.                 // line 96
  354.                 echo "                            ";
  355.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_top_multiple_results", ["%results%" => twig_length_filter($this->env, (isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 96, $this->source); })()))]);
  356.                 echo "
  357.                         ";
  358.             }
  359.             // line 98
  360.             echo "                    </div>
  361.                     <div class=\"article-content results-filters u-padding-tiny u-padding-bottom-small u-padding-top-small\">
  362.                         <p class=\"ordering\">";
  363.             // line 100
  364.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_not_order");
  365.             echo "
  366.                             <a href=\"#\" id=\"order-name\" data-order=\"name\" data-orderpos=\"za\">";
  367.             // line 101
  368.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_not_ordernaam");
  369.             echo "</a> /
  370.                             <a href=\"#\" id=\"order-postal\" data-order=\"postal\" data-orderpos=\"za\">";
  371.             // line 102
  372.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_not_orderpostcode");
  373.             echo "</a> /
  374.                             <a href=\"#\" id=\"order-city\" data-order=\"city\" data-orderpos=\"za\">";
  375.             // line 103
  376.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_not_ordergemeente");
  377.             echo "</a>
  378.                         </p>
  379.                     </div>
  380.                     <div id=\"info-content\" class=\"niveau1 info-news-content\">
  381.                         ";
  382.             // line 107
  383.             $context['_parent'] = $context;
  384.             $context['_seq'] = twig_ensure_traversable((isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 107, $this->source); })()));
  385.             foreach ($context['_seq'] as $context["key"] => $context["result"]) {
  386.                 // line 108
  387.                 echo "                            <a class=\"info-content-blocklink tooltip office-active u-padding-top-small u-padding-bottom-small\" href=\"";
  388.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_search_notary_detail", ["slug" => ((twig_get_attribute($this->env, $this->source, $context["result"], "slug", [], "any", true, true, false, 108)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, $context["result"], "slug", [], "any", false, false, false, 108), "slug")) : ("slug"))]), "html", null, true);
  389.                 echo "\" title=\"";
  390.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_kantoor"), "html", null, true);
  391.                 echo "\"
  392.                                data-name=\"";
  393.                 // line 109
  394.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["result"], "kantoor", [], "any", false, false, false, 109), "html", null, true);
  395.                 echo "\" data-postal=\"";
  396.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["result"], "addresses", [], "any", false, false, false, 109), 0, [], "array", false, false, false, 109), "html", null, true);
  397.                 echo "\" data-city=\"";
  398.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["result"], "municipality", [], "any", false, false, false, 109), "html", null, true);
  399.                 echo "\">
  400.                                 <div class=\"icon\"><img src=\"/images/icons/office.png\"></div>
  401.                                 <div class=\"text\"><h3>";
  402.                 // line 111
  403.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_not_kantoor");
  404.                 echo " ";
  405.                 echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["result"], "kantoor", [], "any", false, false, false, 111), "html", null, true);
  406.                 echo "</h3>
  407.                                     <p class=\"u-margin-none\">
  408.                                         ";
  409.                 // line 113
  410.                 $context['_parent'] = $context;
  411.                 $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["result"], "addresses", [], "any", false, false, false, 113));
  412.                 $context['loop'] = [
  413.                   'parent' => $context['_parent'],
  414.                   'index0' => 0,
  415.                   'index'  => 1,
  416.                   'first'  => true,
  417.                 ];
  418.                 if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  419.                     $length = count($context['_seq']);
  420.                     $context['loop']['revindex0'] = $length - 1;
  421.                     $context['loop']['revindex'] = $length;
  422.                     $context['loop']['length'] = $length;
  423.                     $context['loop']['last'] = 1 === $length;
  424.                 }
  425.                 foreach ($context['_seq'] as $context["_key"] => $context["address"]) {
  426.                     // line 114
  427.                     echo "                                            ";
  428.                     if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 114)) {
  429.                         echo " - ";
  430.                     }
  431.                     echo twig_escape_filter($this->env, $context["address"], "html", null, true);
  432.                     echo "
  433.                                         ";
  434.                     ++$context['loop']['index0'];
  435.                     ++$context['loop']['index'];
  436.                     $context['loop']['first'] = false;
  437.                     if (isset($context['loop']['length'])) {
  438.                         --$context['loop']['revindex0'];
  439.                         --$context['loop']['revindex'];
  440.                         $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  441.                     }
  442.                 }
  443.                 $_parent = $context['_parent'];
  444.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['address'], $context['_parent'], $context['loop']);
  445.                 $context = array_intersect_key($context, $_parent) + $_parent;
  446.                 // line 116
  447.                 echo "                                        ";
  448.                 if (twig_get_attribute($this->env, $this->source, $context["result"], "hasCalendar", [], "any", false, false, false, 116)) {
  449.                     // line 117
  450.                     echo "                                            &nbsp; <span class=\"c-link-lookalike\">";
  451.                     echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_has_calendar"), "html", null, true);
  452.                     echo "</span>
  453.                                         ";
  454.                 }
  455.                 // line 119
  456.                 echo "                                    </p>
  457.                                 </div>
  458.                                 <div class=\"cleaner\">&nbsp;</div>
  459.                             </a>
  460.                         ";
  461.             }
  462.             $_parent = $context['_parent'];
  463.             unset($context['_seq'], $context['_iterated'], $context['key'], $context['result'], $context['_parent'], $context['loop']);
  464.             $context = array_intersect_key($context, $_parent) + $_parent;
  465.             // line 124
  466.             echo "                    </div>
  467.                     <div class=\"results-footer\">
  468.                         <div class=\"prevnext-pages\"></div>
  469.                         <div class=\"results-footer-text\">
  470.                             ";
  471.             // line 128
  472.             if ((twig_length_filter($this->env, (isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 128, $this->source); })())) == 1)) {
  473.                 // line 129
  474.                 echo "                                ";
  475.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_one_result", ["%link%" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook")]);
  476.                 echo "
  477.                             ";
  478.             } elseif ((twig_length_filter($this->env,             // line 130
  479. (isset($context["results"]) || array_key_exists("results", $context) ? $context["results"] : (function () { throw new RuntimeError('Variable "results" does not exist.', 130, $this->source); })())) > 1)) {
  480.                 // line 131
  481.                 echo "                                ";
  482.                 echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_multiple_results", ["%link%" => $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook")]);
  483.                 echo "
  484.                             ";
  485.             }
  486.             // line 133
  487.             echo "                        </div>
  488.                     </div>
  489.                 ";
  490.         } else {
  491.             // line 136
  492.             echo "                    <span class=\"u-margin-bottom-small u-margin-top-large u-m u-display--block\" ";
  493.             if (((null === 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.', 136, $this->source); })()), "request", [], "any", false, false, false, 136), "query", [], "any", false, false, false, 136), "get", [0 => "query"], "method", false, false, false, 136)) && (null === 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.', 136, $this->source); })()), "request", [], "any", false, false, false, 136), "query", [], "any", false, false, false, 136), "all", [0 => "queryLocation"], "method", false, false, false, 136)))) {
  494.                 echo "style=\"display: none\"";
  495.             }
  496.             echo ">";
  497.             echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_no_results_bottom");
  498.             echo "</span>
  499.                 ";
  500.         }
  501.         // line 138
  502.         echo "            </section>
  503.         </div>
  504.     </section>
  505. ";
  506.         
  507.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  508.         
  509.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  510.     }
  511.     // line 143
  512.     public function block_extrajs($context, array $blocks = [])
  513.     {
  514.         $macros = $this->macros;
  515.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  516.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extrajs"));
  517.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  518.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extrajs"));
  519.         // line 144
  520.         echo "    <script src=\"/adminassets/libs/jqueryui/jquery-ui-1.10.4.custom.min.js\"></script>
  521.     <script>
  522.         var addressbookLocationSearchGroup = [];
  523.         var currentpage = 0;
  524.         initFormTabs();
  525.         initAddressbookSearchAutocomplete();
  526.         initAddressbookLocationSearchAutocomplete();
  527.         initPaging(currentpage);
  528.         initOrdering();
  529.         setLocationQuery();
  530.         function initAddressbookSearchAutocomplete() {
  531.             \$('#addressbookSearch').autocomplete({
  532.                 minLength: 2,
  533.                 delay: 500,
  534.                 source: '";
  535.         // line 160
  536.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook_autocomplete");
  537.         echo "',
  538.                 appendTo: '#addressbook-menu-container',
  539.                 response: function (event, ui) {
  540.                     if (ui.content.length === 0) {
  541.                         \$('.addressbook-results-empty').show();
  542.                         return;
  543.                     }
  544.                     \$('.addressbook-results-empty').hide();
  545.                 },
  546.             }).bind('focus', function () {
  547.                 if (\$('.ui-autocomplete').children().length > 0) {
  548.                     \$('.ui-autocomplete').show();
  549.                 }
  550.             }).data('uiAutocomplete')._renderItem = function (ul, item) {
  551.                 var regexpString = \$('#addressbookSearch').val();
  552.                 regexpString = regexpString.replaceAll('a', '[aàâ]');
  553.                 regexpString = regexpString.replaceAll('e', '[eéèêë]');
  554.                 regexpString = regexpString.replaceAll('i', '[iìîï]');
  555.                 regexpString = regexpString.replaceAll('o', '[oòô]');
  556.                 regexpString = regexpString.replaceAll('u', '[uùûü]');
  557.                 regexpString = regexpString.replaceAll('c', '[cç]');
  558.                 var regexp = new RegExp('(' + regexpString + ')', 'gi');
  559.                 var autocompleteOption = '<div><div class=\"addressbook-result-title\">' + '";
  560.         // line 183
  561.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_not_kantoor");
  562.         echo "' + ' ';
  563.                 autocompleteOption += item.kantoor.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  564.                 item.addresses.forEach((address, index) => {
  565.                     autocompleteOption += ' - ';
  566.                     autocompleteOption += address.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  567.                 });
  568.                 if (item.hasCalendar) {
  569.                     autocompleteOption += ' - <span class=\"c-link-lookalike\">";
  570.         // line 190
  571.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_has_calendar"), "html", null, true);
  572.         echo "</span>';
  573.                 }
  574.                 autocompleteOption += '</div><div>(';
  575.                 item.notaris.forEach((notaris, index) => {
  576.                     if (index > 0) {
  577.                         autocompleteOption += ' - ';
  578.                     }
  579.                     autocompleteOption += '";
  580.         // line 197
  581.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("zk_not_notaris_verwant");
  582.         echo "' + ' ' + notaris.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  583.                 });
  584.                 autocompleteOption += ')</div></div>';
  585.                 var listItem = \$('<li>').append(autocompleteOption);
  586.                 listItem.on('click', () => {
  587.                     var slug = '";
  588.         // line 203
  589.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_search_notary_detail", ["slug" => "slug"]);
  590.         echo "';
  591.                     slug = slug.replace('slug', item.slug);
  592.                     window.location.href = slug;
  593.                 });
  594.                 return listItem.appendTo(ul);
  595.             };
  596.             \$('.addressbook-search-button').on('click', event => {
  597.                 if (\$('#addressbookSearch').val().length === 0) {
  598.                     \$('.addressbook-input-empty').show();
  599.                     event.preventDefault();
  600.                 }
  601.             });
  602.         }
  603.         function initPaging(page) {
  604.             currentpage = page;
  605.             var perpage = 25;
  606.             \$('a.not-active').hide();
  607.             \$('a.office-active').hide();
  608.             var query = 'a.office-active';
  609.             \$.each(\$(query), function (index, value) {
  610.                 if (index >= page * perpage && index < page * perpage + perpage) {
  611.                     \$(value).show();
  612.                 }
  613.             });
  614.             var activecount = \$(query).length;
  615.             var pages = Math.ceil(activecount / perpage);
  616.             \$('form#choosetype strong').text(activecount);
  617.             \$('.prevnext-pages').html('');
  618.             if (pages == 1) {
  619.                 return;
  620.             }
  621.             //show first pages
  622.             var html = '';
  623.             var vispages = 4;
  624.             var startpage = page - vispages / 2;
  625.             if (startpage < 0) {
  626.                 startpage = 0;
  627.             } else {
  628.                 vispages++;
  629.             }
  630.             var count = 0;
  631.             var index = 0;
  632.             if (page != 0) {
  633.                 html += '<a href=\"\" data-page=' + (page - 1) + '>";
  634.         // line 259
  635.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("vorige");
  636.         echo "</a>';
  637.             }
  638.             if (startpage != 0) {
  639.                 html += '<span>...</span>';
  640.             }
  641.             for (var i = startpage; i < pages; i++) {
  642.                 count++;
  643.                 if (count <= vispages) {
  644.                     index = i;
  645.                     if (i == page) {
  646.                         html += '<span class=\"current\">' + (i + 1) + '</span>';
  647.                     } else {
  648.                         html += '<a href=\"\" data-page=' + i + '>' + (i + 1) + '</a>';
  649.                     }
  650.                 }
  651.             }
  652.             if (index < pages - 1) {
  653.                 html += '<span>...</span>';
  654.             }
  655.             if (page < pages - 1) {
  656.                 html += '<a href=\"\" data-page=' + (page + 1) + '>";
  657.         // line 283
  658.         echo $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("volgende");
  659.         echo "</a>';
  660.             }
  661.             \$('.prevnext-pages').html(html);
  662.             \$('.prevnext-pages a').click(function (e) {
  663.                 initPaging(parseInt(\$(this).attr('data-page')));
  664.                 e.preventDefault();
  665.             });
  666.         }
  667.         function initOrdering() {
  668.             \$('.ordering a').click(function (e) {
  669.                 \$('.ordering a').removeClass('active');
  670.                 \$(this).addClass('active');
  671.                 currentpage = 0;
  672.                 var elements = \$('a.not-active, a.office-active');
  673.                 var elementsHtml = [];
  674.                 \$('a.not-active, a.office-active').each(function () {
  675.                     var obj = {object: \$(this), html: \$(this)[0].outerHTML};
  676.                     elementsHtml.push(obj);
  677.                 })
  678.                 \$('#info-content').html('');
  679.                 if (\$(this).attr('data-order') == 'name') {
  680.                     var orderNameDirection;
  681.                     if (\$(this).data('orderpos') == 'za') {
  682.                         orderNameDirection = 'az';
  683.                     } else {
  684.                         orderNameDirection = 'za';
  685.                     }
  686.                     \$('#order-postal').data('orderpos', 'za');
  687.                     \$('#order-city').data('orderpos', 'za');
  688.                     \$(this).data('orderpos', orderNameDirection);
  689.                     elementsHtml.sort(function (a, b) {
  690.                         //sort on name
  691.                         var x = \$(a.object).attr('data-name').toLowerCase();
  692.                         var y = \$(b.object).attr('data-name').toLowerCase();
  693.                         if (orderNameDirection == 'az') {
  694.                             return x < y ? -1 : x > y ? 1 : 0;
  695.                         } else {
  696.                             return x > y ? -1 : x < y ? 1 : 0;
  697.                         }
  698.                     });
  699.                 }
  700.                 if (\$(this).attr('data-order') == 'postal') {
  701.                     var orderZipDirection;
  702.                     if (\$(this).data('orderpos') == 'za') {
  703.                         orderZipDirection = 'az';
  704.                     } else {
  705.                         orderZipDirection = 'za';
  706.                     }
  707.                     \$('#order-name').data('orderpos', 'za');
  708.                     \$('#order-city').data('orderpos', 'za');
  709.                     \$(this).data('orderpos', orderZipDirection);
  710.                     elementsHtml.sort(function (a, b) {
  711.                         //sort on zip
  712.                         var zipA = parseInt(\$(a.object).attr('data-postal'));
  713.                         var zipB = parseInt(\$(b.object).attr('data-postal'));
  714.                         if (zipA === zipB) {
  715.                             //when zip is the same, sort on name
  716.                             var x = \$(a.object).attr('data-name').toLowerCase();
  717.                             var y = \$(b.object).attr('data-name').toLowerCase();
  718.                             //return sort on name
  719.                             if (orderZipDirection == 'az') {
  720.                                 return x < y ? -1 : x > y ? 1 : 0;
  721.                             } else {
  722.                                 return x > y ? -1 : x < y ? 1 : 0;
  723.                             }
  724.                         }
  725.                         //return sort on zip
  726.                         if (orderZipDirection == 'az') {
  727.                             return zipA - zipB;
  728.                         } else {
  729.                             return zipB - zipA;
  730.                         }
  731.                     });
  732.                 }
  733.                 if (\$(this).attr('data-order') == 'city') {
  734.                     var orderCityDirection;
  735.                     if (\$(this).data('orderpos') == 'za') {
  736.                         orderCityDirection = 'az';
  737.                     } else {
  738.                         orderCityDirection = 'za';
  739.                     }
  740.                     \$('#order-name').data('orderpos', 'za');
  741.                     \$('#order-postal').data('orderpos', 'za');
  742.                     \$(this).data('orderpos', orderCityDirection);
  743.                     elementsHtml.sort(function (a, b) {
  744.                         //sort on city
  745.                         var x = \$(a.object).attr('data-city').toLowerCase();
  746.                         var y = \$(b.object).attr('data-city').toLowerCase();
  747.                         if (x === y) {
  748.                             //when city is the same, sort on zip
  749.                             var zipA = parseInt(\$(a.object).attr('data-postal'));
  750.                             var zipB = parseInt(\$(b.object).attr('data-postal'));
  751.                             if (zipA === zipB) {
  752.                                 //when zip is the same, sort on name
  753.                                 var nameA = \$(a.object).attr('data-name').toLowerCase();
  754.                                 var nameB = \$(b.object).attr('data-name').toLowerCase();
  755.                                 //return sort on name
  756.                                 if (orderCityDirection == 'az') {
  757.                                     return nameA < nameB ? -1 : nameA > nameB ? 1 : 0;
  758.                                 } else {
  759.                                     return nameA > nameB ? -1 : nameA < nameB ? 1 : 0;
  760.                                 }
  761.                             }
  762.                             //return sort on zip
  763.                             if (orderCityDirection == 'az') {
  764.                                 return zipA < zipB ? -1 : zipA > zipB ? 1 : 0;
  765.                             } else {
  766.                                 return zipA > zipB ? -1 : zipA < zipB ? 1 : 0;
  767.                             }
  768.                         }
  769.                         //return sort on city
  770.                         if (orderCityDirection == 'az') {
  771.                             return x < y ? -1 : x > y ? 1 : 0;
  772.                         } else {
  773.                             return x > y ? -1 : x < y ? 1 : 0;
  774.                         }
  775.                     });
  776.                 }
  777.                 for (var i = 0; i < elementsHtml.length; i++) {
  778.                     \$('#info-content').append(elementsHtml[i].html);
  779.                 }
  780.                 initPaging(currentpage);
  781.                 e.preventDefault();
  782.             });
  783.         }
  784.         function initFormTabs() {
  785.             \$('.tab-by-name').click(() => {
  786.                 \$('.tab-by-name').addClass('active');
  787.                 \$('.tab-by-name').removeClass('inactive');
  788.                 \$('.tab-by-location').addClass('inactive');
  789.                 \$('.tab-by-location').removeClass('active');
  790.                 \$('.form-by-name').show();
  791.                 \$('.form-by-location').hide();
  792.             });
  793.             \$('.tab-by-location').click(() => {
  794.                 \$('.tab-by-name').addClass('inactive');
  795.                 \$('.tab-by-name').removeClass('active');
  796.                 \$('.tab-by-location').addClass('active');
  797.                 \$('.tab-by-location').removeClass('inactive');
  798.                 \$('.form-by-name').hide();
  799.                 \$('.form-by-location').show();
  800.             });
  801.         }
  802.         function initAddressbookLocationSearchAutocomplete() {
  803.             \$('#addressbookLocationSearch').autocomplete({
  804.                 minLength: 1,
  805.                 delay: 500,
  806.                 source: '";
  807.         // line 464
  808.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("notaris_frontend_addressbook_autocomplete_location");
  809.         echo "',
  810.                 appendTo: '#addressbook-location-menu-container',
  811.                 response: function(event, ui) {
  812.                     if (ui.content.length === 0) {
  813.                         \$('.addressbook-location-results-empty2').show();
  814.                         \$('.addressbook-location-selected-too-many').hide();
  815.                         return;
  816.                     }
  817.                     \$('.addressbook-location-results-empty').hide();
  818.                     \$('.addressbook-location-results-empty2').hide();
  819.                 },
  820.             }).bind('focus', function () {
  821.                 if (\$('.ui-autocomplete').children().length > 0) {
  822.                     \$('.ui-autocomplete').show();
  823.                 }
  824.             }).data('uiAutocomplete')._renderItem = function (ul, item) {
  825.                 var regexpString = \$('#addressbookLocationSearch').val();
  826.                 regexpString = regexpString.replaceAll('a', '[aàâ]');
  827.                 regexpString = regexpString.replaceAll('e', '[eéèêë]');
  828.                 regexpString = regexpString.replaceAll('i', '[iìîï]');
  829.                 regexpString = regexpString.replaceAll('o', '[oòô]');
  830.                 regexpString = regexpString.replaceAll('u', '[uùûü]');
  831.                 regexpString = regexpString.replaceAll('c', '[cç]');
  832.                 var regexp = new RegExp('(' + regexpString + ')', 'gi');
  833.                 var autocompleteOption = '<div><div class=\"addressbook-result-title\">' + item.municipality.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  834.                 autocompleteOption += '</div><div>';
  835.                 if (item.localities.length > 0) {
  836.                     autocompleteOption += '(';
  837.                 }
  838.                 item.localities.forEach((locality, index) => {
  839.                     if (index > 0) {
  840.                         autocompleteOption += ', ';
  841.                     }
  842.                     autocompleteOption += locality.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  843.                 });
  844.                 if (item.localities.length > 0) {
  845.                     autocompleteOption += ')';
  846.                 }
  847.                 autocompleteOption += '</div></div>';
  848.                 var listItem = \$('<li>').append(autocompleteOption);
  849.                 listItem.on('click', () => {
  850.                     if (addressbookLocationSearchGroup.length > 3) {
  851.                         \$('.addressbook-location-results-empty').show();
  852.                         return;
  853.                     }
  854.                     \$('.addressbook-location-results-empty').hide();
  855.                     \$('.addressbook-location-results-empty2').hide();
  856.                     \$('.addressbook-location-selected-too-many').hide();
  857.                     addressbookLocationSearchGroup.push(item.municipality);
  858.                     updateMunicipalitySelector();
  859.                     \$('#addressbookLocationSearch').val('');
  860.                     \$('#addressbookLocationSearch').attr('placeholder', '');
  861.                 });
  862.                 return listItem.appendTo(ul);
  863.             };
  864.             \$('.municipalities').click(() => {
  865.                 \$('#addressbookLocationSearch').focus();
  866.             });
  867.             \$('.addressbook-search-location-button').on('click', event => {
  868.                 if (addressbookLocationSearchGroup.length === 0) {
  869.                     \$('.addressbook-location-results-empty2').show();
  870.                     event.preventDefault();
  871.                 }
  872.             });
  873.         }
  874.         function updateMunicipalitySelector() {
  875.             addressbookLocationSearchGroup = addressbookLocationSearchGroup.filter((v, i, a) => a.indexOf(v) === i);
  876.             \$('.addressbookLocationSearchGroup').remove();
  877.             \$('.municipalities').empty();
  878.             addressbookLocationSearchGroup.forEach((municipality, index) => {
  879.                 \$('.form-by-location').append('<input type=\"hidden\" name=\"queryLocation[]\" class=\"addressbookLocationSearchGroup\" value=\"' + municipality + '\">');
  880.                 \$('.municipalities').append('<span class=\"tag\">' + municipality + '<span class=\"tag-delete\" data-index=\"' + index + '\">×</span></span>');
  881.             });
  882.             \$('.tag-delete').off('click');
  883.             \$('.tag-delete').on('click', event => {
  884.                 var index = \$(event.target).data('index');
  885.                 addressbookLocationSearchGroup.splice(index, 1);
  886.                 updateMunicipalitySelector();
  887.                 if (addressbookLocationSearchGroup.length === 0) {
  888.                     \$('#addressbookLocationSearch').attr('placeholder', '";
  889.         // line 554
  890.         echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("ab_search_location_placeholder_name"), "html", null, true);
  891.         echo "');
  892.                 }
  893.             });
  894.             if (\$('.municipalities').height() < 45) {
  895.                 \$('#addressbookLocationSearch').css('padding-top', 9);
  896.                 \$('#addressbookLocationSearch').css('padding-left', \$('.municipalities').width() + 5);
  897.                 \$('#addressbookLocationSearch').css('height', \$('.municipalities').height() + 8);
  898.             }
  899.             if (\$('.municipalities').height() >= 45 || \$('.municipalities').width() + 10 > \$('#addressbookLocationSearch').width()) {
  900.                 \$('#addressbookLocationSearch').css('padding-left', 9);
  901.                 \$('#addressbookLocationSearch').css('padding-top', \$('.municipalities').height() + 8);
  902.                 \$('#addressbookLocationSearch').css('height', \$('.municipalities').height() + 48);
  903.             }
  904.             /*if (addressbookLocationSearchGroup.length > 0) {
  905.                 \$('.addressbook-search-location-button').prop('disabled', false);
  906.             } else {
  907.                 \$('.addressbook-search-location-button').prop('disabled', true);
  908.             }*/
  909.         }
  910.         function setLocationQuery() {
  911.             var urlParams = new URLSearchParams(window.location.search);
  912.             var queryLocation = urlParams.getAll('queryLocation[]');
  913.             var queryLocation2 = urlParams.get('query-location');
  914.             if (queryLocation.length > 0 || queryLocation2 !== null) {
  915.                 \$('.tab-by-location').click();
  916.                 queryLocation.forEach(location => {
  917.                     addressbookLocationSearchGroup.push(location);
  918.                 });
  919.                 updateMunicipalitySelector();
  920.             }
  921.         }
  922.     </script>
  923. ";
  924.         
  925.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  926.         
  927.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  928.     }
  929.     // line 591
  930.     public function block_extracss($context, array $blocks = [])
  931.     {
  932.         $macros = $this->macros;
  933.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  934.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extracss"));
  935.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  936.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "extracss"));
  937.         // line 592
  938.         echo "    <style>
  939.         .addressbook-search-button, .addressbook-search-location-button {
  940.             width: 100%;
  941.             padding-top: 3px;
  942.             font-size: 13px;
  943.             border: 1px solid #8d8d8d;
  944.             cursor: pointer;
  945.             height: 40px;
  946.         }
  947.         ul.ui-autocomplete {
  948.             list-style: none;
  949.             background: white;
  950.             border: 1px solid #8d8d8d;
  951.             max-height: 386px;
  952.             overflow-y: auto;
  953.             width: 100% !important;
  954.         }
  955.         ul.ui-autocomplete li {
  956.             padding: 5px 10px;
  957.             border-bottom: 1px solid #8d8d8d;
  958.             cursor: pointer;
  959.         }
  960.         .addressbook-result-title {
  961.             font-weight: bold;
  962.         }
  963.         .addressbook-result-keyword {
  964.             color: #1db3c3;
  965.         }
  966.         .ui-helper-hidden-accessible {
  967.             display: none;
  968.         }
  969.         #addressbookSearch.ui-autocomplete-loading, #addressbookLocationSearch.ui-autocomplete-loading {
  970.             background: url(\"/images/lightbox/loading.gif\") no-repeat 99%;
  971.             background-size: 25px;
  972.         }
  973.         .tab-by-name, .tab-by-location {
  974.             display: inline-block;
  975.             width: 50%;
  976.             text-align: center;
  977.             padding: 10px 0;
  978.             font-weight: bold;
  979.             cursor: pointer;
  980.             background-color: #E9EDED;
  981.             font-size: 15px;
  982.         }
  983.         .tab-by-name.inactive, .tab-by-location.inactive {
  984.             background-color: #FFFFFF;
  985.         }
  986.         .municipalities {
  987.             display: inline-block;
  988.             position: absolute;
  989.             top: 7px;
  990.             left: 8px;
  991.         }
  992.         .municipalities .tag {
  993.             background-color: #6bcad4;
  994.             color: white;
  995.             padding: 4px 5px;
  996.             border-radius: 4px;
  997.             margin-right: 8px;
  998.             margin-bottom: 5px;
  999.             display: inline-block;
  1000.         }
  1001.         .municipalities .tag-delete {
  1002.             margin-left: 10px;
  1003.             font-size: 18px;
  1004.             cursor: pointer;
  1005.         }
  1006.         .form-by-location-container {
  1007.             position: relative;
  1008.         }
  1009.         .c-nav--subnav .c-nav__parent-item:hover .c-nav--subsubnav {
  1010.             visibility: hidden !important;
  1011.         }
  1012.         .location-select {
  1013.             width: 200px;
  1014.             height: auto;
  1015.         }
  1016.         .form-by-name, .form-by-location {
  1017.             background-color: #E9EDED;
  1018.         }
  1019.         #addressbook-menu-container {
  1020.             position: absolute;
  1021.             width: calc(100% - 40px);
  1022.         }
  1023.         #addressbook-location-menu-container {
  1024.             position: absolute;
  1025.             width: 100%;
  1026.         }
  1027.         .addressbook-search-location-button {
  1028.             display: block;
  1029.             margin-left: auto;
  1030.         }
  1031.         .results-filters {
  1032.             background-color: #E9EDED;
  1033.         }
  1034.         .results-filters .active {
  1035.             background-color: #FFFFFF;
  1036.         }
  1037.         .ordering a {
  1038.             padding: 3px 6px;
  1039.         }
  1040.         .info-news-content .icon {
  1041.             vertical-align: middle;
  1042.             float: none !important;
  1043.             display: inline-block !important;
  1044.             height: auto !important;
  1045.         }
  1046.         .info-news-content .text {
  1047.             float: none !important;
  1048.             display: inline-block !important;
  1049.             vertical-align: middle;
  1050.             margin-left: 0 !important;
  1051.         }
  1052.         .results-footer {
  1053.             background-color: #E9EDED;
  1054.         }
  1055.         .results-footer .current {
  1056.             background-color: #FFFFFF;
  1057.         }
  1058.         .results-footer-text {
  1059.             display: inline-block;
  1060.             /*width: 76%;*/
  1061.             padding: 0 20px 20px 20px;
  1062.         }
  1063.         .prevnext-pages {
  1064.             display: inline-block;
  1065.             /*width: 23% !important;*/
  1066.             vertical-align: top;
  1067.             padding-top: 20px !important;
  1068.         }
  1069.         .prevnext-pages span, .prevnext-pages a {
  1070.             margin-right: 10px;
  1071.         }
  1072.         .results-header {
  1073.             background-color: #00b3c4;
  1074.             color: white;
  1075.         }
  1076.         @media screen and (min-width: 768px){
  1077.             #addressbookSearch, #addressbookLocationSearch {
  1078.                 width: 79%;
  1079.             }
  1080.             .municipalities {
  1081.                 max-width: 79%;
  1082.             }
  1083.             #addressbook-menu-container {
  1084.                 width: calc(79% - 31px);
  1085.             }
  1086.             #addressbook-location-menu-container {
  1087.                 width: 79%;
  1088.             }
  1089.             .addressbook-search-button, .addressbook-search-location-button {
  1090.                 width: 20%;
  1091.             }
  1092.         }
  1093.     </style>
  1094. ";
  1095.         
  1096.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1097.         
  1098.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1099.     }
  1100.     public function getTemplateName()
  1101.     {
  1102.         return "@NotarisFrontend/addressbook/search.html.twig";
  1103.     }
  1104.     public function isTraitable()
  1105.     {
  1106.         return false;
  1107.     }
  1108.     public function getDebugInfo()
  1109.     {
  1110.         return array (  1048 => 592,  1038 => 591,  992 => 554,  899 => 464,  715 => 283,  688 => 259,  629 => 203,  620 => 197,  610 => 190,  600 => 183,  574 => 160,  556 => 144,  546 => 143,  533 => 138,  523 => 136,  518 => 133,  512 => 131,  510 => 130,  505 => 129,  503 => 128,  497 => 124,  487 => 119,  481 => 117,  478 => 116,  458 => 114,  441 => 113,  434 => 111,  425 => 109,  418 => 108,  414 => 107,  407 => 103,  403 => 102,  399 => 101,  395 => 100,  391 => 98,  385 => 96,  383 => 95,  378 => 94,  376 => 93,  373 => 92,  371 => 91,  364 => 87,  359 => 85,  355 => 83,  340 => 81,  335 => 80,  333 => 79,  329 => 78,  323 => 75,  317 => 74,  311 => 71,  305 => 70,  292 => 66,  287 => 64,  279 => 63,  271 => 62,  267 => 61,  262 => 59,  257 => 57,  245 => 54,  241 => 53,  233 => 52,  229 => 51,  223 => 50,  218 => 48,  207 => 42,  199 => 36,  189 => 35,  175 => 31,  172 => 30,  167 => 28,  161 => 26,  159 => 25,  153 => 24,  149 => 23,  144 => 22,  134 => 21,  122 => 18,  117 => 16,  112 => 14,  108 => 12,  105 => 11,  102 => 10,  99 => 9,  96 => 8,  86 => 7,  73 => 4,  63 => 3,  40 => 1,);
  1111.     }
  1112.     public function getSourceContext()
  1113.     {
  1114.         return new Source("{% extends '@NotarisFrontend/layout2017.html.twig' %}
  1115. {% block title %}
  1116.     <title>{{ 'ab_search_notary_search_title' | trans }}</title>
  1117. {% endblock %}
  1118. {% block extralinks %}
  1119.     {% set hreflang_start_nl = url_scheme ~ '://www.' ~ url_nl %}
  1120.     {% set hreflang_start_fr = url_scheme ~ '://www.' ~ url_fr %}
  1121.     {% set hreflang_nl = hreflang_start_nl ~ path('notaris_frontend_addressbook') %}
  1122.     {% set hreflang_fr = hreflang_start_fr ~ path('notaris_frontend_addressbook') %}
  1123.     <link rel=\"alternate\" hreflang=\"nl-be\"
  1124.           href=\"{{ hreflang_nl }}\"/>
  1125.     <link rel=\"alternate\" hreflang=\"fr-be\"
  1126.           href=\"{{ hreflang_fr }}\"/>
  1127.     <link rel=\"alternate\" hreflang=\"x-default\"
  1128.           href=\"{{ hreflang_nl }}\"/>
  1129. {% endblock %}
  1130. {% block extrameta %}
  1131.     {{ parent() }}
  1132.     <meta name=\"keywords\" content=\"{{ 'ab_search_notary_search_keywords' | trans }}\"/>
  1133.     <meta name=\"description\" lang=\"{{ locale }}\" content=\"{{ 'ab_search_notary_search_description' | trans }}\"/>
  1134.     {% if subsite.meta.ogTitle != '' %}
  1135.         <meta property=\"og:title\" content=\"{{ 'ab_search_notary_search_title' | trans }}\"/>
  1136.         <meta property=\"og:type\" content=\"article\"/>
  1137.         <meta property=\"og:url\" content=\" {{ app.request.uri }}\"/>
  1138.     {% endif %}
  1139.     {% if subsite.meta.ogDescription != '' %}
  1140.         <meta property=\"og:description\" content=\"{{ subsite.meta.ogDescription }}\"/>
  1141.     {% endif %}
  1142. {% endblock %}
  1143. {% block body %}
  1144.     <section class=\"content u-padding-top-large\">
  1145.         <aside id=\"content-left\" class=\"content-left-small hidesmartphone\">
  1146.             <nav class=\"standard-nav\">
  1147.                 <ul class=\"u-margin-left-none u-padding-left-none\">
  1148.                     <li class=\"active\">
  1149.                         <div class=\"activestate\">&nbsp;</div>
  1150.                         <a href=\"#\" title=\"{{ 'ab_search' | trans | raw }}\" class=\"hi\">{{ 'ab_search' | trans | raw }}</a>
  1151.                     </li>
  1152.                 </ul>
  1153.             </nav>
  1154.         </aside>
  1155.         <div id=\"content-center\" class=\"content-center-large {{ subsite.stylesheet }}\">
  1156.             <section id=\"info\" class=\"no-margin\">
  1157.                 <div class=\"tab-by-name active\">{{ 'ab_by_name' | trans | raw }}</div><div class=\"tab-by-location inactive\">{{ 'ab_by_location' | trans | raw }}</div>
  1158.                 <form action=\"{{ path('notaris_frontend_addressbook') }}\" method=\"get\" class=\"u-padding-top-large u-padding-small form-by-name o-layout__item--relative\">
  1159.                     <span class=\"addressbook-results-empty u-margin-bottom-small u-display--block\" {% if app.request.query.get('query') is null or results is not empty %}style=\"display: none\"{% endif %}>{{ 'ab_search_no_results' | trans({'%link%': path('notaris_frontend_addressbook_deed')}) | raw }}<br></span>
  1160.                     <span class=\"addressbook-input-empty\" style=\"display: none;\">{{ 'ab_search_no_input' | trans | raw }}<br></span>
  1161.                     <input type=\"text\" placeholder=\"{{ 'ab_search_placeholder_name' | trans }}\" name=\"query\" id=\"addressbookSearch\" {% if app.request.query.get('query') is not null %}value=\"{{ app.request.query.get('query') }}\"{% endif %}/>
  1162.                     <div id=\"addressbook-menu-container\"></div>
  1163.                     <button type=\"submit\" class=\"c-btn--primary u-color-white addressbook-search-button\" style=\"vertical-align: top\">
  1164.                         {{ 'ab_search_button' | trans }}
  1165.                     </button>
  1166.                     <div class=\"u-margin-top-small\">{{ 'ab_search_notary_footer' | trans | raw }}</div>
  1167.                 </form>
  1168.                 <form action=\"{{ path('notaris_frontend_addressbook') }}\" method=\"get\" class=\"u-padding-top-large u-padding-small form-by-location\" style=\"display: none\">
  1169.                     <span class=\"addressbook-location-results-empty u-margin-bottom-small u-display--block\" {% if app.request.query.get('query') is null or results is not empty %}style=\"display: none\"{% endif %}>{{ 'ab_search_location_no_results' | trans | raw }}</span>
  1170.                     <span class=\"addressbook-location-results-empty2 u-margin-bottom-small u-display--block\" {% if app.request.query.all('queryLocation') is null or results is not empty %}style=\"display: none\"{% endif %}>{{ 'ab_search_location_no_results2' | trans | raw }}</span>
  1171.                     <span class=\"addressbook-location-selected-too-many u-margin-bottom-small u-display--block\" style=\"display: none\">{{ 'ab_search_location_selected_too_many' | trans | raw }}</span>
  1172.                     <div class=\"form-by-location-container\">
  1173.                         <input type=\"text\" placeholder=\"{{ 'ab_search_location_placeholder_name' | trans }}\" name=\"query-location\" id=\"addressbookLocationSearch\" style=\"height: 46px;min-height: 46px;padding-right: 5px;\" {% if app.request.query.get('query-location') is not null %}value=\"{{ app.request.query.get('query-location') }}\"{% endif %}/>
  1174.                         <div class=\"municipalities\"></div>
  1175.                         <div id=\"addressbook-location-menu-container\" style=\"position: absolute\"></div>
  1176.                         <div class=\"u-margin-top-tiny\">
  1177.                             <input type=\"checkbox\" name=\"mediators\" id=\"mediators\" style=\"width: auto;\" {% if app.request.query.get('mediators') is not null %}checked{% endif %}/>
  1178.                             <label for=\"mediators\" class=\"u-margin-left-tiny\">{{ 'md_bemiddelaar' | trans | raw }}</label>
  1179.                         </div>
  1180.                         <div class=\"u-margin-top-tiny\">
  1181.                             <input type=\"checkbox\" name=\"show_on_map\" id=\"show_on_map\" style=\"width: auto;\" {% if app.request.query.get('show_on_map') is not null %}checked{% endif %}/>
  1182.                             <label for=\"show_on_map\" class=\"u-margin-left-tiny\">{{ 'md_kaart' | trans }}</label>
  1183.                         </div>
  1184.                         <select name=\"language\" class=\"u-margin-top-tiny location-select\">
  1185.                             <option value=\"\">{{ 'md_kennis' | trans }}</option>
  1186.                             {% set languages = getNotarySearchLanguage() %}
  1187.                             {% for language in languages %}
  1188.                                 <option value=\"{{ language.languageShort }}\" {% if app.request.query.get('language') == language.languageShort %}selected{% endif %}>{{ language.language | trans }}</option>;
  1189.                             {% endfor %}
  1190.                         </select>
  1191.                         <button type=\"submit\" class=\"c-btn--primary u-color-white u-margin-top-tiny addressbook-search-location-button\">
  1192.                             {{ 'ab_search_button' | trans }}
  1193.                         </button>
  1194.                         <div class=\"u-margin-top-small\">{{ 'ab_search_notary_footer' | trans | raw }}</div>
  1195.                     </div>
  1196.                 </form>
  1197.                 {% if results is not empty %}
  1198.                     <div class=\"results-header u-margin-top-large u-padding-tiny u-padding-bottom-small u-padding-top-small\">
  1199.                         {% if results|length == 1 %}
  1200.                             {{ 'ab_search_top_one_result' | trans | raw }}
  1201.                         {% elseif results|length > 1 %}
  1202.                             {{ 'ab_search_top_multiple_results' | trans({'%results%': results|length}) | raw }}
  1203.                         {% endif  %}
  1204.                     </div>
  1205.                     <div class=\"article-content results-filters u-padding-tiny u-padding-bottom-small u-padding-top-small\">
  1206.                         <p class=\"ordering\">{{ 'zk_not_order' | trans | raw }}
  1207.                             <a href=\"#\" id=\"order-name\" data-order=\"name\" data-orderpos=\"za\">{{ 'zk_not_ordernaam' | trans | raw }}</a> /
  1208.                             <a href=\"#\" id=\"order-postal\" data-order=\"postal\" data-orderpos=\"za\">{{ 'zk_not_orderpostcode' | trans | raw }}</a> /
  1209.                             <a href=\"#\" id=\"order-city\" data-order=\"city\" data-orderpos=\"za\">{{ 'zk_not_ordergemeente' | trans | raw }}</a>
  1210.                         </p>
  1211.                     </div>
  1212.                     <div id=\"info-content\" class=\"niveau1 info-news-content\">
  1213.                         {% for key, result in results %}
  1214.                             <a class=\"info-content-blocklink tooltip office-active u-padding-top-small u-padding-bottom-small\" href=\"{{ path('notaris_frontend_search_notary_detail', {'slug': result.slug|default('slug')}) }}\" title=\"{{ 'ab_search_kantoor' | trans }}\"
  1215.                                data-name=\"{{ result.kantoor }}\" data-postal=\"{{ result.addresses[0] }}\" data-city=\"{{ result.municipality }}\">
  1216.                                 <div class=\"icon\"><img src=\"/images/icons/office.png\"></div>
  1217.                                 <div class=\"text\"><h3>{{ 'zk_not_kantoor' | trans | raw }} {{ result.kantoor }}</h3>
  1218.                                     <p class=\"u-margin-none\">
  1219.                                         {% for address in result.addresses %}
  1220.                                             {% if not loop.first %} - {% endif %}{{ address }}
  1221.                                         {% endfor %}
  1222.                                         {% if result.hasCalendar %}
  1223.                                             &nbsp; <span class=\"c-link-lookalike\">{{ 'zk_has_calendar' | trans }}</span>
  1224.                                         {% endif %}
  1225.                                     </p>
  1226.                                 </div>
  1227.                                 <div class=\"cleaner\">&nbsp;</div>
  1228.                             </a>
  1229.                         {% endfor %}
  1230.                     </div>
  1231.                     <div class=\"results-footer\">
  1232.                         <div class=\"prevnext-pages\"></div>
  1233.                         <div class=\"results-footer-text\">
  1234.                             {% if results|length == 1 %}
  1235.                                 {{ 'ab_search_one_result' | trans({'%link%': path('notaris_frontend_addressbook')}) | raw }}
  1236.                             {% elseif results|length > 1 %}
  1237.                                 {{ 'ab_search_multiple_results' | trans({'%link%': path('notaris_frontend_addressbook')}) | raw }}
  1238.                             {% endif  %}
  1239.                         </div>
  1240.                     </div>
  1241.                 {% else %}
  1242.                     <span class=\"u-margin-bottom-small u-margin-top-large u-m u-display--block\" {% if app.request.query.get('query') is null and app.request.query.all('queryLocation') is null %}style=\"display: none\"{% endif %}>{{ 'ab_search_no_results_bottom' | trans | raw }}</span>
  1243.                 {% endif %}
  1244.             </section>
  1245.         </div>
  1246.     </section>
  1247. {% endblock %}
  1248. {% block extrajs %}
  1249.     <script src=\"/adminassets/libs/jqueryui/jquery-ui-1.10.4.custom.min.js\"></script>
  1250.     <script>
  1251.         var addressbookLocationSearchGroup = [];
  1252.         var currentpage = 0;
  1253.         initFormTabs();
  1254.         initAddressbookSearchAutocomplete();
  1255.         initAddressbookLocationSearchAutocomplete();
  1256.         initPaging(currentpage);
  1257.         initOrdering();
  1258.         setLocationQuery();
  1259.         function initAddressbookSearchAutocomplete() {
  1260.             \$('#addressbookSearch').autocomplete({
  1261.                 minLength: 2,
  1262.                 delay: 500,
  1263.                 source: '{{ path('notaris_frontend_addressbook_autocomplete') }}',
  1264.                 appendTo: '#addressbook-menu-container',
  1265.                 response: function (event, ui) {
  1266.                     if (ui.content.length === 0) {
  1267.                         \$('.addressbook-results-empty').show();
  1268.                         return;
  1269.                     }
  1270.                     \$('.addressbook-results-empty').hide();
  1271.                 },
  1272.             }).bind('focus', function () {
  1273.                 if (\$('.ui-autocomplete').children().length > 0) {
  1274.                     \$('.ui-autocomplete').show();
  1275.                 }
  1276.             }).data('uiAutocomplete')._renderItem = function (ul, item) {
  1277.                 var regexpString = \$('#addressbookSearch').val();
  1278.                 regexpString = regexpString.replaceAll('a', '[aàâ]');
  1279.                 regexpString = regexpString.replaceAll('e', '[eéèêë]');
  1280.                 regexpString = regexpString.replaceAll('i', '[iìîï]');
  1281.                 regexpString = regexpString.replaceAll('o', '[oòô]');
  1282.                 regexpString = regexpString.replaceAll('u', '[uùûü]');
  1283.                 regexpString = regexpString.replaceAll('c', '[cç]');
  1284.                 var regexp = new RegExp('(' + regexpString + ')', 'gi');
  1285.                 var autocompleteOption = '<div><div class=\"addressbook-result-title\">' + '{{ 'zk_not_kantoor' | trans | raw }}' + ' ';
  1286.                 autocompleteOption += item.kantoor.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  1287.                 item.addresses.forEach((address, index) => {
  1288.                     autocompleteOption += ' - ';
  1289.                     autocompleteOption += address.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  1290.                 });
  1291.                 if (item.hasCalendar) {
  1292.                     autocompleteOption += ' - <span class=\"c-link-lookalike\">{{ 'zk_has_calendar' | trans }}</span>';
  1293.                 }
  1294.                 autocompleteOption += '</div><div>(';
  1295.                 item.notaris.forEach((notaris, index) => {
  1296.                     if (index > 0) {
  1297.                         autocompleteOption += ' - ';
  1298.                     }
  1299.                     autocompleteOption += '{{ 'zk_not_notaris_verwant' | trans | raw }}' + ' ' + notaris.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  1300.                 });
  1301.                 autocompleteOption += ')</div></div>';
  1302.                 var listItem = \$('<li>').append(autocompleteOption);
  1303.                 listItem.on('click', () => {
  1304.                     var slug = '{{ path('notaris_frontend_search_notary_detail', {'slug': 'slug'}) }}';
  1305.                     slug = slug.replace('slug', item.slug);
  1306.                     window.location.href = slug;
  1307.                 });
  1308.                 return listItem.appendTo(ul);
  1309.             };
  1310.             \$('.addressbook-search-button').on('click', event => {
  1311.                 if (\$('#addressbookSearch').val().length === 0) {
  1312.                     \$('.addressbook-input-empty').show();
  1313.                     event.preventDefault();
  1314.                 }
  1315.             });
  1316.         }
  1317.         function initPaging(page) {
  1318.             currentpage = page;
  1319.             var perpage = 25;
  1320.             \$('a.not-active').hide();
  1321.             \$('a.office-active').hide();
  1322.             var query = 'a.office-active';
  1323.             \$.each(\$(query), function (index, value) {
  1324.                 if (index >= page * perpage && index < page * perpage + perpage) {
  1325.                     \$(value).show();
  1326.                 }
  1327.             });
  1328.             var activecount = \$(query).length;
  1329.             var pages = Math.ceil(activecount / perpage);
  1330.             \$('form#choosetype strong').text(activecount);
  1331.             \$('.prevnext-pages').html('');
  1332.             if (pages == 1) {
  1333.                 return;
  1334.             }
  1335.             //show first pages
  1336.             var html = '';
  1337.             var vispages = 4;
  1338.             var startpage = page - vispages / 2;
  1339.             if (startpage < 0) {
  1340.                 startpage = 0;
  1341.             } else {
  1342.                 vispages++;
  1343.             }
  1344.             var count = 0;
  1345.             var index = 0;
  1346.             if (page != 0) {
  1347.                 html += '<a href=\"\" data-page=' + (page - 1) + '>{{ \"vorige\" | trans | raw }}</a>';
  1348.             }
  1349.             if (startpage != 0) {
  1350.                 html += '<span>...</span>';
  1351.             }
  1352.             for (var i = startpage; i < pages; i++) {
  1353.                 count++;
  1354.                 if (count <= vispages) {
  1355.                     index = i;
  1356.                     if (i == page) {
  1357.                         html += '<span class=\"current\">' + (i + 1) + '</span>';
  1358.                     } else {
  1359.                         html += '<a href=\"\" data-page=' + i + '>' + (i + 1) + '</a>';
  1360.                     }
  1361.                 }
  1362.             }
  1363.             if (index < pages - 1) {
  1364.                 html += '<span>...</span>';
  1365.             }
  1366.             if (page < pages - 1) {
  1367.                 html += '<a href=\"\" data-page=' + (page + 1) + '>{{ \"volgende\" | trans | raw }}</a>';
  1368.             }
  1369.             \$('.prevnext-pages').html(html);
  1370.             \$('.prevnext-pages a').click(function (e) {
  1371.                 initPaging(parseInt(\$(this).attr('data-page')));
  1372.                 e.preventDefault();
  1373.             });
  1374.         }
  1375.         function initOrdering() {
  1376.             \$('.ordering a').click(function (e) {
  1377.                 \$('.ordering a').removeClass('active');
  1378.                 \$(this).addClass('active');
  1379.                 currentpage = 0;
  1380.                 var elements = \$('a.not-active, a.office-active');
  1381.                 var elementsHtml = [];
  1382.                 \$('a.not-active, a.office-active').each(function () {
  1383.                     var obj = {object: \$(this), html: \$(this)[0].outerHTML};
  1384.                     elementsHtml.push(obj);
  1385.                 })
  1386.                 \$('#info-content').html('');
  1387.                 if (\$(this).attr('data-order') == 'name') {
  1388.                     var orderNameDirection;
  1389.                     if (\$(this).data('orderpos') == 'za') {
  1390.                         orderNameDirection = 'az';
  1391.                     } else {
  1392.                         orderNameDirection = 'za';
  1393.                     }
  1394.                     \$('#order-postal').data('orderpos', 'za');
  1395.                     \$('#order-city').data('orderpos', 'za');
  1396.                     \$(this).data('orderpos', orderNameDirection);
  1397.                     elementsHtml.sort(function (a, b) {
  1398.                         //sort on name
  1399.                         var x = \$(a.object).attr('data-name').toLowerCase();
  1400.                         var y = \$(b.object).attr('data-name').toLowerCase();
  1401.                         if (orderNameDirection == 'az') {
  1402.                             return x < y ? -1 : x > y ? 1 : 0;
  1403.                         } else {
  1404.                             return x > y ? -1 : x < y ? 1 : 0;
  1405.                         }
  1406.                     });
  1407.                 }
  1408.                 if (\$(this).attr('data-order') == 'postal') {
  1409.                     var orderZipDirection;
  1410.                     if (\$(this).data('orderpos') == 'za') {
  1411.                         orderZipDirection = 'az';
  1412.                     } else {
  1413.                         orderZipDirection = 'za';
  1414.                     }
  1415.                     \$('#order-name').data('orderpos', 'za');
  1416.                     \$('#order-city').data('orderpos', 'za');
  1417.                     \$(this).data('orderpos', orderZipDirection);
  1418.                     elementsHtml.sort(function (a, b) {
  1419.                         //sort on zip
  1420.                         var zipA = parseInt(\$(a.object).attr('data-postal'));
  1421.                         var zipB = parseInt(\$(b.object).attr('data-postal'));
  1422.                         if (zipA === zipB) {
  1423.                             //when zip is the same, sort on name
  1424.                             var x = \$(a.object).attr('data-name').toLowerCase();
  1425.                             var y = \$(b.object).attr('data-name').toLowerCase();
  1426.                             //return sort on name
  1427.                             if (orderZipDirection == 'az') {
  1428.                                 return x < y ? -1 : x > y ? 1 : 0;
  1429.                             } else {
  1430.                                 return x > y ? -1 : x < y ? 1 : 0;
  1431.                             }
  1432.                         }
  1433.                         //return sort on zip
  1434.                         if (orderZipDirection == 'az') {
  1435.                             return zipA - zipB;
  1436.                         } else {
  1437.                             return zipB - zipA;
  1438.                         }
  1439.                     });
  1440.                 }
  1441.                 if (\$(this).attr('data-order') == 'city') {
  1442.                     var orderCityDirection;
  1443.                     if (\$(this).data('orderpos') == 'za') {
  1444.                         orderCityDirection = 'az';
  1445.                     } else {
  1446.                         orderCityDirection = 'za';
  1447.                     }
  1448.                     \$('#order-name').data('orderpos', 'za');
  1449.                     \$('#order-postal').data('orderpos', 'za');
  1450.                     \$(this).data('orderpos', orderCityDirection);
  1451.                     elementsHtml.sort(function (a, b) {
  1452.                         //sort on city
  1453.                         var x = \$(a.object).attr('data-city').toLowerCase();
  1454.                         var y = \$(b.object).attr('data-city').toLowerCase();
  1455.                         if (x === y) {
  1456.                             //when city is the same, sort on zip
  1457.                             var zipA = parseInt(\$(a.object).attr('data-postal'));
  1458.                             var zipB = parseInt(\$(b.object).attr('data-postal'));
  1459.                             if (zipA === zipB) {
  1460.                                 //when zip is the same, sort on name
  1461.                                 var nameA = \$(a.object).attr('data-name').toLowerCase();
  1462.                                 var nameB = \$(b.object).attr('data-name').toLowerCase();
  1463.                                 //return sort on name
  1464.                                 if (orderCityDirection == 'az') {
  1465.                                     return nameA < nameB ? -1 : nameA > nameB ? 1 : 0;
  1466.                                 } else {
  1467.                                     return nameA > nameB ? -1 : nameA < nameB ? 1 : 0;
  1468.                                 }
  1469.                             }
  1470.                             //return sort on zip
  1471.                             if (orderCityDirection == 'az') {
  1472.                                 return zipA < zipB ? -1 : zipA > zipB ? 1 : 0;
  1473.                             } else {
  1474.                                 return zipA > zipB ? -1 : zipA < zipB ? 1 : 0;
  1475.                             }
  1476.                         }
  1477.                         //return sort on city
  1478.                         if (orderCityDirection == 'az') {
  1479.                             return x < y ? -1 : x > y ? 1 : 0;
  1480.                         } else {
  1481.                             return x > y ? -1 : x < y ? 1 : 0;
  1482.                         }
  1483.                     });
  1484.                 }
  1485.                 for (var i = 0; i < elementsHtml.length; i++) {
  1486.                     \$('#info-content').append(elementsHtml[i].html);
  1487.                 }
  1488.                 initPaging(currentpage);
  1489.                 e.preventDefault();
  1490.             });
  1491.         }
  1492.         function initFormTabs() {
  1493.             \$('.tab-by-name').click(() => {
  1494.                 \$('.tab-by-name').addClass('active');
  1495.                 \$('.tab-by-name').removeClass('inactive');
  1496.                 \$('.tab-by-location').addClass('inactive');
  1497.                 \$('.tab-by-location').removeClass('active');
  1498.                 \$('.form-by-name').show();
  1499.                 \$('.form-by-location').hide();
  1500.             });
  1501.             \$('.tab-by-location').click(() => {
  1502.                 \$('.tab-by-name').addClass('inactive');
  1503.                 \$('.tab-by-name').removeClass('active');
  1504.                 \$('.tab-by-location').addClass('active');
  1505.                 \$('.tab-by-location').removeClass('inactive');
  1506.                 \$('.form-by-name').hide();
  1507.                 \$('.form-by-location').show();
  1508.             });
  1509.         }
  1510.         function initAddressbookLocationSearchAutocomplete() {
  1511.             \$('#addressbookLocationSearch').autocomplete({
  1512.                 minLength: 1,
  1513.                 delay: 500,
  1514.                 source: '{{ path('notaris_frontend_addressbook_autocomplete_location') }}',
  1515.                 appendTo: '#addressbook-location-menu-container',
  1516.                 response: function(event, ui) {
  1517.                     if (ui.content.length === 0) {
  1518.                         \$('.addressbook-location-results-empty2').show();
  1519.                         \$('.addressbook-location-selected-too-many').hide();
  1520.                         return;
  1521.                     }
  1522.                     \$('.addressbook-location-results-empty').hide();
  1523.                     \$('.addressbook-location-results-empty2').hide();
  1524.                 },
  1525.             }).bind('focus', function () {
  1526.                 if (\$('.ui-autocomplete').children().length > 0) {
  1527.                     \$('.ui-autocomplete').show();
  1528.                 }
  1529.             }).data('uiAutocomplete')._renderItem = function (ul, item) {
  1530.                 var regexpString = \$('#addressbookLocationSearch').val();
  1531.                 regexpString = regexpString.replaceAll('a', '[aàâ]');
  1532.                 regexpString = regexpString.replaceAll('e', '[eéèêë]');
  1533.                 regexpString = regexpString.replaceAll('i', '[iìîï]');
  1534.                 regexpString = regexpString.replaceAll('o', '[oòô]');
  1535.                 regexpString = regexpString.replaceAll('u', '[uùûü]');
  1536.                 regexpString = regexpString.replaceAll('c', '[cç]');
  1537.                 var regexp = new RegExp('(' + regexpString + ')', 'gi');
  1538.                 var autocompleteOption = '<div><div class=\"addressbook-result-title\">' + item.municipality.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  1539.                 autocompleteOption += '</div><div>';
  1540.                 if (item.localities.length > 0) {
  1541.                     autocompleteOption += '(';
  1542.                 }
  1543.                 item.localities.forEach((locality, index) => {
  1544.                     if (index > 0) {
  1545.                         autocompleteOption += ', ';
  1546.                     }
  1547.                     autocompleteOption += locality.replace(regexp, '<span class=\"addressbook-result-keyword\">\$1</span>');
  1548.                 });
  1549.                 if (item.localities.length > 0) {
  1550.                     autocompleteOption += ')';
  1551.                 }
  1552.                 autocompleteOption += '</div></div>';
  1553.                 var listItem = \$('<li>').append(autocompleteOption);
  1554.                 listItem.on('click', () => {
  1555.                     if (addressbookLocationSearchGroup.length > 3) {
  1556.                         \$('.addressbook-location-results-empty').show();
  1557.                         return;
  1558.                     }
  1559.                     \$('.addressbook-location-results-empty').hide();
  1560.                     \$('.addressbook-location-results-empty2').hide();
  1561.                     \$('.addressbook-location-selected-too-many').hide();
  1562.                     addressbookLocationSearchGroup.push(item.municipality);
  1563.                     updateMunicipalitySelector();
  1564.                     \$('#addressbookLocationSearch').val('');
  1565.                     \$('#addressbookLocationSearch').attr('placeholder', '');
  1566.                 });
  1567.                 return listItem.appendTo(ul);
  1568.             };
  1569.             \$('.municipalities').click(() => {
  1570.                 \$('#addressbookLocationSearch').focus();
  1571.             });
  1572.             \$('.addressbook-search-location-button').on('click', event => {
  1573.                 if (addressbookLocationSearchGroup.length === 0) {
  1574.                     \$('.addressbook-location-results-empty2').show();
  1575.                     event.preventDefault();
  1576.                 }
  1577.             });
  1578.         }
  1579.         function updateMunicipalitySelector() {
  1580.             addressbookLocationSearchGroup = addressbookLocationSearchGroup.filter((v, i, a) => a.indexOf(v) === i);
  1581.             \$('.addressbookLocationSearchGroup').remove();
  1582.             \$('.municipalities').empty();
  1583.             addressbookLocationSearchGroup.forEach((municipality, index) => {
  1584.                 \$('.form-by-location').append('<input type=\"hidden\" name=\"queryLocation[]\" class=\"addressbookLocationSearchGroup\" value=\"' + municipality + '\">');
  1585.                 \$('.municipalities').append('<span class=\"tag\">' + municipality + '<span class=\"tag-delete\" data-index=\"' + index + '\">×</span></span>');
  1586.             });
  1587.             \$('.tag-delete').off('click');
  1588.             \$('.tag-delete').on('click', event => {
  1589.                 var index = \$(event.target).data('index');
  1590.                 addressbookLocationSearchGroup.splice(index, 1);
  1591.                 updateMunicipalitySelector();
  1592.                 if (addressbookLocationSearchGroup.length === 0) {
  1593.                     \$('#addressbookLocationSearch').attr('placeholder', '{{ 'ab_search_location_placeholder_name' | trans }}');
  1594.                 }
  1595.             });
  1596.             if (\$('.municipalities').height() < 45) {
  1597.                 \$('#addressbookLocationSearch').css('padding-top', 9);
  1598.                 \$('#addressbookLocationSearch').css('padding-left', \$('.municipalities').width() + 5);
  1599.                 \$('#addressbookLocationSearch').css('height', \$('.municipalities').height() + 8);
  1600.             }
  1601.             if (\$('.municipalities').height() >= 45 || \$('.municipalities').width() + 10 > \$('#addressbookLocationSearch').width()) {
  1602.                 \$('#addressbookLocationSearch').css('padding-left', 9);
  1603.                 \$('#addressbookLocationSearch').css('padding-top', \$('.municipalities').height() + 8);
  1604.                 \$('#addressbookLocationSearch').css('height', \$('.municipalities').height() + 48);
  1605.             }
  1606.             /*if (addressbookLocationSearchGroup.length > 0) {
  1607.                 \$('.addressbook-search-location-button').prop('disabled', false);
  1608.             } else {
  1609.                 \$('.addressbook-search-location-button').prop('disabled', true);
  1610.             }*/
  1611.         }
  1612.         function setLocationQuery() {
  1613.             var urlParams = new URLSearchParams(window.location.search);
  1614.             var queryLocation = urlParams.getAll('queryLocation[]');
  1615.             var queryLocation2 = urlParams.get('query-location');
  1616.             if (queryLocation.length > 0 || queryLocation2 !== null) {
  1617.                 \$('.tab-by-location').click();
  1618.                 queryLocation.forEach(location => {
  1619.                     addressbookLocationSearchGroup.push(location);
  1620.                 });
  1621.                 updateMunicipalitySelector();
  1622.             }
  1623.         }
  1624.     </script>
  1625. {% endblock %}
  1626. {% block extracss %}
  1627.     <style>
  1628.         .addressbook-search-button, .addressbook-search-location-button {
  1629.             width: 100%;
  1630.             padding-top: 3px;
  1631.             font-size: 13px;
  1632.             border: 1px solid #8d8d8d;
  1633.             cursor: pointer;
  1634.             height: 40px;
  1635.         }
  1636.         ul.ui-autocomplete {
  1637.             list-style: none;
  1638.             background: white;
  1639.             border: 1px solid #8d8d8d;
  1640.             max-height: 386px;
  1641.             overflow-y: auto;
  1642.             width: 100% !important;
  1643.         }
  1644.         ul.ui-autocomplete li {
  1645.             padding: 5px 10px;
  1646.             border-bottom: 1px solid #8d8d8d;
  1647.             cursor: pointer;
  1648.         }
  1649.         .addressbook-result-title {
  1650.             font-weight: bold;
  1651.         }
  1652.         .addressbook-result-keyword {
  1653.             color: #1db3c3;
  1654.         }
  1655.         .ui-helper-hidden-accessible {
  1656.             display: none;
  1657.         }
  1658.         #addressbookSearch.ui-autocomplete-loading, #addressbookLocationSearch.ui-autocomplete-loading {
  1659.             background: url(\"/images/lightbox/loading.gif\") no-repeat 99%;
  1660.             background-size: 25px;
  1661.         }
  1662.         .tab-by-name, .tab-by-location {
  1663.             display: inline-block;
  1664.             width: 50%;
  1665.             text-align: center;
  1666.             padding: 10px 0;
  1667.             font-weight: bold;
  1668.             cursor: pointer;
  1669.             background-color: #E9EDED;
  1670.             font-size: 15px;
  1671.         }
  1672.         .tab-by-name.inactive, .tab-by-location.inactive {
  1673.             background-color: #FFFFFF;
  1674.         }
  1675.         .municipalities {
  1676.             display: inline-block;
  1677.             position: absolute;
  1678.             top: 7px;
  1679.             left: 8px;
  1680.         }
  1681.         .municipalities .tag {
  1682.             background-color: #6bcad4;
  1683.             color: white;
  1684.             padding: 4px 5px;
  1685.             border-radius: 4px;
  1686.             margin-right: 8px;
  1687.             margin-bottom: 5px;
  1688.             display: inline-block;
  1689.         }
  1690.         .municipalities .tag-delete {
  1691.             margin-left: 10px;
  1692.             font-size: 18px;
  1693.             cursor: pointer;
  1694.         }
  1695.         .form-by-location-container {
  1696.             position: relative;
  1697.         }
  1698.         .c-nav--subnav .c-nav__parent-item:hover .c-nav--subsubnav {
  1699.             visibility: hidden !important;
  1700.         }
  1701.         .location-select {
  1702.             width: 200px;
  1703.             height: auto;
  1704.         }
  1705.         .form-by-name, .form-by-location {
  1706.             background-color: #E9EDED;
  1707.         }
  1708.         #addressbook-menu-container {
  1709.             position: absolute;
  1710.             width: calc(100% - 40px);
  1711.         }
  1712.         #addressbook-location-menu-container {
  1713.             position: absolute;
  1714.             width: 100%;
  1715.         }
  1716.         .addressbook-search-location-button {
  1717.             display: block;
  1718.             margin-left: auto;
  1719.         }
  1720.         .results-filters {
  1721.             background-color: #E9EDED;
  1722.         }
  1723.         .results-filters .active {
  1724.             background-color: #FFFFFF;
  1725.         }
  1726.         .ordering a {
  1727.             padding: 3px 6px;
  1728.         }
  1729.         .info-news-content .icon {
  1730.             vertical-align: middle;
  1731.             float: none !important;
  1732.             display: inline-block !important;
  1733.             height: auto !important;
  1734.         }
  1735.         .info-news-content .text {
  1736.             float: none !important;
  1737.             display: inline-block !important;
  1738.             vertical-align: middle;
  1739.             margin-left: 0 !important;
  1740.         }
  1741.         .results-footer {
  1742.             background-color: #E9EDED;
  1743.         }
  1744.         .results-footer .current {
  1745.             background-color: #FFFFFF;
  1746.         }
  1747.         .results-footer-text {
  1748.             display: inline-block;
  1749.             /*width: 76%;*/
  1750.             padding: 0 20px 20px 20px;
  1751.         }
  1752.         .prevnext-pages {
  1753.             display: inline-block;
  1754.             /*width: 23% !important;*/
  1755.             vertical-align: top;
  1756.             padding-top: 20px !important;
  1757.         }
  1758.         .prevnext-pages span, .prevnext-pages a {
  1759.             margin-right: 10px;
  1760.         }
  1761.         .results-header {
  1762.             background-color: #00b3c4;
  1763.             color: white;
  1764.         }
  1765.         @media screen and (min-width: 768px){
  1766.             #addressbookSearch, #addressbookLocationSearch {
  1767.                 width: 79%;
  1768.             }
  1769.             .municipalities {
  1770.                 max-width: 79%;
  1771.             }
  1772.             #addressbook-menu-container {
  1773.                 width: calc(79% - 31px);
  1774.             }
  1775.             #addressbook-location-menu-container {
  1776.                 width: 79%;
  1777.             }
  1778.             .addressbook-search-button, .addressbook-search-location-button {
  1779.                 width: 20%;
  1780.             }
  1781.         }
  1782.     </style>
  1783. {% endblock %}
  1784. ", "@NotarisFrontend/addressbook/search.html.twig", "/data/sites/web/notarisdc-projectsbe/subsites/apps/default/releases/7/src/Notaris/FrontendBundle/Resources/views/addressbook/search.html.twig");
  1785.     }
  1786. }