<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* front/agents/index.html.twig */
class __TwigTemplate_c4bd730f6a4b20c58157de7ca6ba39d3efebf7ca9ffae4058a7bf21a4decf7d9 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'meta_description' => [$this, 'block_meta_description'],
'content' => [$this, 'block_content'],
'footer' => [$this, 'block_footer'],
'stylesheets' => [$this, 'block_stylesheets'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/agents/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/agents/index.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "front/agents/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_title($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo " - Des conseillers de proximité";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 4
public function block_meta_description($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "meta_description"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "meta_description"));
echo "Les conseillers sont des experts du marché local. Ils vous apporteront une estimation précise et les outils de mise en valeur indispensable telle la visite virtuelle";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 5
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 6
echo "<section id=\"agents\" class=\"container-fluid\">
<div class=\"row\">
<div class=\"order-1 order-md-2 col-md-6 col-xl-7 col-xxl-8 p-0\">
<div class=\"map_full bg-light col p-0\">
<form id=\"search_agent\" class=\"filter\" style=\"background-color: #f3f3f3;\">
<div class=\"row m-0 pt-3\">
<div class=\"col-xl-6 px-3 px-xl-2 pb-3 pl-xl-3\">
<div class=\"auto-search\">
<input
type=\"text\"
autocomplete=\"off\"
id=\"geosearch\"
class=\"full-width form-control\"
placeholder=\"Recherche par Ville\"
/>
</div>
</div>
<div class=\"col-xl-6 px-3 px-xl-2 pr-xl-3\">
<div id=\"search_agent_name\" class=\"form-group position-relative\">
<label class=\"sr-only required\" for=\"contact_form_nom\">Nom</label>
<input id=\"autoComplete_name\" class=\"form-control\" type=\"text\">
<button class=\"auto-clear hidden\" type=\"button\" aria-label=\"clear text from input\"></button>
</div>
</div>
</div>
</form>
<div id=\"agents_map\" class=\"map_container\"></div>
</div>
</div>
<div class=\"order-2 order-md-1 col-md-6 col-xl-5 col-xxl-4 px-3 px-md-4 px-lg-5 mt-3 mt-md-5\">
<h2 class=\"section_title\" style=\"font-size:20px\">Trouvez le conseiller proche de chez vous !</h2>
";
// line 40
echo "
";
// line 46
echo " <div class=\"owl-carousel my-3\" id=\"list_agents\">
";
// line 47
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["agents"]) || array_key_exists("agents", $context) ? $context["agents"] : (function () { throw new RuntimeError('Variable "agents" does not exist.', 47, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["agent"]) {
// line 48
echo " ";
if ((1 === twig_compare(twig_get_attribute($this->env, $this->source, $context["agent"], "rating", [], "any", false, false, false, 48), 4.5))) {
// line 49
echo " ";
// line 50
echo " <div class=\"px-1\">
<div class=\"card border-0 bg-dark\" data-id=\"";
// line 51
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["agent"], "id", [], "any", false, false, false, 51), "html", null, true);
echo "\">
<a href=\"";
// line 52
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("show_agent", ["slug" => twig_get_attribute($this->env, $this->source, $context["agent"], "slug", [], "any", false, false, false, 52)]), "html", null, true);
echo "\">
<img class=\"card-img-top\" src=\"";
// line 53
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Vich\UploaderBundle\Twig\Extension\UploaderExtension']->asset($context["agent"], "imageFile"), "agent_thumb"), "html", null, true);
echo "\">
</a>
<div class=\"card-body p-3 row text-white\">
<div class=\"col-sm-7 col-md-12 col-lg-7 mb-3 mb-sm-0 mb-md-3 mb-lg-0 mb-lg-0 pr-0\">
<h5 class=\"card-title font-weight-bold\"><a class=\"text-white\" href=\"";
// line 58
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("show_agent", ["slug" => twig_get_attribute($this->env, $this->source, $context["agent"], "slug", [], "any", false, false, false, 58)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, $context["agent"], "html", null, true);
echo "</a></h5>
<h6 class=\"card-subtitle text-white d-flex\">
<i class=\"icon-location\"></i><span>";
// line 60
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["agent"], "secteur", [], "any", false, false, false, 60), "html", null, true);
echo "</span>
</h6>
</div>
<div class=\"col-sm-5 col-md-12 col-lg-5 pl-0\">
<div class=\"text-white text-sm-right text-md-left text-lg-right pl-3 pl-sm-0 pl-md-3 pl-lg-0\">
<span class=\"d-inline\"><img class=\"\" src=\"";
// line 65
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/img/OS_isotype.svg"), "html", null, true);
echo "\" width=\"20\" /></span>
<span class=\"d-inline\">";
// line 66
echo $this->extensions['App\Twig\AppExtension']->stars(twig_get_attribute($this->env, $this->source, $context["agent"], "rating", [], "any", false, false, false, 66), "", twig_get_attribute($this->env, $this->source, $context["agent"], "countReviews", [], "any", false, false, false, 66));
echo "</span>
</div>
</div>
</div>
</div>
</div>
";
}
// line 75
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['agent'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
echo "
</div>
<div class=\"px-0 px-md-4\">
";
// line 79
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Front\\HomeController::osKpis"));
echo "
</div>
<div class=\"text-center mb-5\">
<img class=\"img-fluid\" src=\"";
// line 82
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/media/agents/logo_opinion_system.png"), "runtime", ["thumbnail" => ["size" => [0 => 250], "mode" => "outbound"]]), "html", null, true);
echo "\" />
</div>
</div>
</div>
</section>
";
// line 89
echo twig_source($this->env, "front/agents/agent-infobox-template.html");
echo "
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 92
public function block_footer($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "footer"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 95
public function block_stylesheets($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 96
echo " ";
$this->displayParentBlock("stylesheets", $context, $blocks);
echo "
<link rel=\"stylesheet\" href=\"";
// line 97
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/vendor/OwlCarousel2-2.3.4/dist/assets/owl.carousel.min.css"), "html", null, true);
echo "\"/>
<link rel=\"stylesheet\" href=\"";
// line 98
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/vendor/OwlCarousel2-2.3.4/dist/assets/owl.theme.default.min.css"), "html", null, true);
echo "\"/>
";
// line 100
echo " <link rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.7.1/dist/leaflet.css\" />
<link rel=\"stylesheet\" href=\"";
// line 101
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/vendor/leaflet-control-geocoder/Control.Geocoder.css"), "html", null, true);
echo "\"/>
<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/tomik23/autocomplete@1.6.8/dist/css/autocomplete.min.css\"/>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 105
public function block_javascripts($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 106
echo " ";
$this->displayParentBlock("javascripts", $context, $blocks);
echo "
<script src=\"";
// line 107
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/fosjsrouting/js/router.min.js"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 108
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("fos_js_routing_js", ["callback" => "fos.Router.setData"]);
echo "\"></script>
<script src=\"";
// line 109
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/vendor/OwlCarousel2-2.3.4/dist/owl.carousel.min.js"), "html", null, true);
echo "\"></script>
<script src=\"https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@8.3.0/dist/js/autoComplete.min.js\"></script>
<script src=\"";
// line 111
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/vendor/swag.min.js"), "html", null, true);
echo "\"></script>
<script src=\"https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.js\"></script>
<script src=\"https://unpkg.com/leaflet@1.7.1/dist/leaflet.js\"></script>
<script src=\"https://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js\"></script>
<script src=\"";
// line 115
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/vendor/Leaflet.SmoothMarkerBouncing.js"), "html", null, true);
echo "\"></script>
";
// line 117
echo " <script src=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/autocomplete.js"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 119
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/base_map.js?v1.0"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 120
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/rrose.js"), "html", null, true);
echo "\"></script>
<script src=\"";
// line 121
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/js/auto_complete_geosearch.js"), "html", null, true);
echo "\"></script>
<script>
var datas = ";
// line 124
echo json_encode((isset($context["datas"]) || array_key_exists("datas", $context) ? $context["datas"] : (function () { throw new RuntimeError('Variable "datas" does not exist.', 124, $this->source); })()));
echo ";
var source_infobox;
var template_infobox;
jQuery(document).ready(function(){
initHandlebars();
source_infobox = \$(\"#infobox-template\").html();
template_infobox = Handlebars.compile(source_infobox);
\$('#search_agent').trigger(\"reset\");
// \$('#search_agent select').select2({
// allowClear: true
// });
clusterMarkers.options.disableClusteringAtZoom = 8;
setMap('agents_map', 8, 8, 16 );
geoSearch('geosearch', map);
// map.touchZoom.disable();
// map.doubleClickZoom.disable();
// map.boxZoom.disable();
// map.keyboard.disable();
map.scrollWheelZoom.disable();
// map.zoomControl.remove();
// map.dragging.disable();
addMarkers(datas, true, false);
var first_agent_id = \$('#list_agents .card').first().data('id');
bounceMarker(first_agent_id);
var owl = \$(\"#list_agents\").owlCarousel({
loop:true,
autoplay:true,
autoplayTimeout: owl_speed / 2,
autoplayHoverPause:true,
smartSpeed: 1000,
margin:30,
nav:false,
dots:false,
items:1
});
owl.on('translated.owl.carousel', function(event) {
if(\$('#geosearch').val() == '' && \$('#autoComplete_name').val() == '' ){
var current_agent_id = \$('#list_agents').find('.active .card').data('id');
bounceMarker(current_agent_id);
}
});
\$('#search_agent_name').find('.auto-clear').click(function(){
if( \$('#search_agent_name').find('ul').length > 0){
\$('#search_agent_name').find('ul').remove();
}
\$('#autoComplete_name').val('').trigger('change');
\$('#search_agent_name').find('.auto-clear').addClass('hidden');
});
\$('#autoComplete_name').change(function(){
if(\$(this).val() == ''){
map.closePopup();
map.fitBounds(clusterMarkers.getBounds());
}
else{
\$('#search_agent_name').find('.auto-clear').removeClass('hidden');
}
});
});
function centerMe(e) {
// retusrn;
if(\$('body').width() < 768 ){
var pixelPosition = map.latLngToLayerPoint(e.target.getLatLng());
var new_y = \$('#agents_map').height() /2;
pixelPosition.y = pixelPosition.y - new_y + 50 ;
var new_latlng = map.layerPointToLatLng(pixelPosition);
map.setView(new_latlng);
}
else{
map.setView(e.target.getLatLng());
}
}
function geoSearchOnSearch(map) {
L.Marker.stopAllBouncingMarkers();L.Marker.stopAllBouncingMarkers();
map.closePopup();
// \$('#autoComplete_name').val('').trigger('change');
\$(\"#search_agent_name .auto-clear\").trigger('click');
}
function geoSearchOnSubmit(map, object ) {
map.closePopup();
}
function geoSearchOnReset(map, element) {
map.fitBounds(clusterMarkers.getBounds());
}
const autoCompleteJS = new autoComplete({
data: { // Data src [Array, Function, Async] | (REQUIRED)
src: datas,
key: [\"name\"],
cache: false
},
sort: (a, b) => { // Sort rendered results ascendingly | (Optional)
if (a.match < b.match) return -1;
if (a.match > b.match) return 1;
return 0;
},
trigger: {event: [\"input\", \"focus\"]},
placeHolder: \"Recherche par nom ou prénom du conseiller\", // Place Holder text | (Optional)
selector: \"#autoComplete_name\", // Input field selector | (Optional)
observer: true, // Input field observer | (Optional)
threshold: 2, // Min. Chars length to start Engine | (Optional)
debounce: 300, // Post duration for engine to start | (Optional)
searchEngine: \"strict\", // Search Engine type/mode | (Optional)
diacritics: true,
resultsList: { // Rendered results list object | (Optional)
container: element => {
element.setAttribute(\"id\", \"autoComplete_list\");
element.setAttribute(\"class\", \"list-unstyled autoComplete_list\");
},
destination: \"#autoComplete_name\",
position: \"afterend\",
element: \"ul\"
},
maxResults: 5, // Max. number of rendered results | (Optional)
highlight: false, // Highlight matching results | (Optional)
resultItem: { // Rendered result item | (Optional)
content: (data, element) => {
item = data.value;
element.innerHTML = data.match +' ('+item.secteur+')';
},
element: \"li\"
},
noResults: (dataFeedback, generateList) => {
// Generate autoComplete List
generateList(autoCompleteJS, dataFeedback, dataFeedback.results);
// No Results List Item
const result = document.createElement(\"li\");
result.setAttribute(\"class\", \"no_result\");
result.setAttribute(\"tabindex\", \"1\");
result.innerHTML = `Pas de résultat pour \"\${dataFeedback.query}\"`;
document.querySelector(`#\${autoCompleteJS.resultsList.idName}`).appendChild(result);
},
onSelection: feedback => { // Action script onSelection event | (Optional)
\$(\".auto-search .auto-clear\").trigger('click');
// \$('#geosearch').val('').trigger('change');
\$('#geosearch').blur();
document.querySelector(\"#autoComplete_name\").blur();
// Prepare User's Selected Value
const selection = feedback.selection.value[feedback.selection.key];
// Replace Input value with the selected value
document.querySelector(\"#autoComplete_name\").value = selection;
// Console log autoComplete data feedback
// console.log(feedback.selection.value);
flyAndOpenPopupMarker(feedback.selection.value.id);
}
});
</script>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "front/agents/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 366 => 124, 360 => 121, 356 => 120, 352 => 119, 346 => 117, 342 => 115, 335 => 111, 330 => 109, 326 => 108, 322 => 107, 317 => 106, 307 => 105, 294 => 101, 291 => 100, 287 => 98, 283 => 97, 278 => 96, 268 => 95, 250 => 92, 238 => 89, 228 => 82, 222 => 79, 211 => 75, 199 => 66, 195 => 65, 187 => 60, 180 => 58, 172 => 53, 168 => 52, 164 => 51, 161 => 50, 159 => 49, 156 => 48, 152 => 47, 149 => 46, 146 => 40, 111 => 6, 101 => 5, 82 => 4, 63 => 3, 40 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %} - Des conseillers de proximité{% endblock %}
{% block meta_description %}Les conseillers sont des experts du marché local. Ils vous apporteront une estimation précise et les outils de mise en valeur indispensable telle la visite virtuelle{% endblock %}
{% block content %}
<section id=\"agents\" class=\"container-fluid\">
<div class=\"row\">
<div class=\"order-1 order-md-2 col-md-6 col-xl-7 col-xxl-8 p-0\">
<div class=\"map_full bg-light col p-0\">
<form id=\"search_agent\" class=\"filter\" style=\"background-color: #f3f3f3;\">
<div class=\"row m-0 pt-3\">
<div class=\"col-xl-6 px-3 px-xl-2 pb-3 pl-xl-3\">
<div class=\"auto-search\">
<input
type=\"text\"
autocomplete=\"off\"
id=\"geosearch\"
class=\"full-width form-control\"
placeholder=\"Recherche par Ville\"
/>
</div>
</div>
<div class=\"col-xl-6 px-3 px-xl-2 pr-xl-3\">
<div id=\"search_agent_name\" class=\"form-group position-relative\">
<label class=\"sr-only required\" for=\"contact_form_nom\">Nom</label>
<input id=\"autoComplete_name\" class=\"form-control\" type=\"text\">
<button class=\"auto-clear hidden\" type=\"button\" aria-label=\"clear text from input\"></button>
</div>
</div>
</div>
</form>
<div id=\"agents_map\" class=\"map_container\"></div>
</div>
</div>
<div class=\"order-2 order-md-1 col-md-6 col-xl-5 col-xxl-4 px-3 px-md-4 px-lg-5 mt-3 mt-md-5\">
<h2 class=\"section_title\" style=\"font-size:20px\">Trouvez le conseiller proche de chez vous !</h2>
{# <hr class=\"separateur-rouge\" /> #}
{#
<img class=\"img-fluid d-block mb-3 shadow\" src=\"{{ asset('assets/media/agents/G.-Terrin-1024x683.jpg') }}\" >
<p class=\"px-3\">Nos conseillers sont sélectionnés et formés pour vous apporter un maximum de services et de conseils. Un maillage local leur permet d'être encore plus performants. Des outils , des savoirs et une motivation à toutes épreuves composent notre ADN.<br>Contacter votre conseiller local sans aucune hésitation !</p>
<p class=\"px-3\"><b>Gregory TERRIN, Manager Départemental</b></p>
#}
<div class=\"owl-carousel my-3\" id=\"list_agents\">
{% for agent in agents %}
{%if agent.rating > 4.5 %}
{# {%if agent.id == 12 %} #}
<div class=\"px-1\">
<div class=\"card border-0 bg-dark\" data-id=\"{{ agent.id }}\">
<a href=\"{{ path( 'show_agent' , {slug:agent.slug}) }}\">
<img class=\"card-img-top\" src=\"{{ vich_uploader_asset(agent, 'imageFile')|imagine_filter('agent_thumb') }}\">
</a>
<div class=\"card-body p-3 row text-white\">
<div class=\"col-sm-7 col-md-12 col-lg-7 mb-3 mb-sm-0 mb-md-3 mb-lg-0 mb-lg-0 pr-0\">
<h5 class=\"card-title font-weight-bold\"><a class=\"text-white\" href=\"{{ path( 'show_agent' , {slug:agent.slug}) }}\">{{ agent }}</a></h5>
<h6 class=\"card-subtitle text-white d-flex\">
<i class=\"icon-location\"></i><span>{{ agent.secteur }}</span>
</h6>
</div>
<div class=\"col-sm-5 col-md-12 col-lg-5 pl-0\">
<div class=\"text-white text-sm-right text-md-left text-lg-right pl-3 pl-sm-0 pl-md-3 pl-lg-0\">
<span class=\"d-inline\"><img class=\"\" src=\"{{ asset('assets/img/OS_isotype.svg') }}\" width=\"20\" /></span>
<span class=\"d-inline\">{{ agent.rating|stars('', agent.countReviews) }}</span>
</div>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}
</div>
<div class=\"px-0 px-md-4\">
{{ render(controller('App\\\\Controller\\\\Front\\\\HomeController::osKpis')) }}
</div>
<div class=\"text-center mb-5\">
<img class=\"img-fluid\" src=\"{{ asset('assets/media/agents/logo_opinion_system.png' ) | imagine_filter('runtime', {\"thumbnail\": {\"size\": [250], 'mode': 'outbound' }}) }}\" />
</div>
</div>
</div>
</section>
{{ source('front/agents/agent-infobox-template.html') }}
{% endblock %}
{% block footer %}
{% endblock %}
{% block stylesheets %}
{{ parent() }}
<link rel=\"stylesheet\" href=\"{{ asset('assets/vendor/OwlCarousel2-2.3.4/dist/assets/owl.carousel.min.css') }}\"/>
<link rel=\"stylesheet\" href=\"{{ asset('assets/vendor/OwlCarousel2-2.3.4/dist/assets/owl.theme.default.min.css') }}\"/>
{#<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css\" />#}
<link rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.7.1/dist/leaflet.css\" />
<link rel=\"stylesheet\" href=\"{{ asset('assets/vendor/leaflet-control-geocoder/Control.Geocoder.css') }}\"/>
<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/gh/tomik23/autocomplete@1.6.8/dist/css/autocomplete.min.css\"/>
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script src=\"{{ asset('bundles/fosjsrouting/js/router.min.js') }}\"></script>
<script src=\"{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}\"></script>
<script src=\"{{ asset('assets/vendor/OwlCarousel2-2.3.4/dist/owl.carousel.min.js') }}\"></script>
<script src=\"https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@8.3.0/dist/js/autoComplete.min.js\"></script>
<script src=\"{{ asset('assets/vendor/swag.min.js') }}\"></script>
<script src=\"https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.js\"></script>
<script src=\"https://unpkg.com/leaflet@1.7.1/dist/leaflet.js\"></script>
<script src=\"https://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js\"></script>
<script src=\"{{ asset('assets/vendor/Leaflet.SmoothMarkerBouncing.js') }}\"></script>
{# <script src=\"{{ asset('assets/js/Control.Geocoder.js') }}\"></script> #}
<script src=\"{{ asset('assets/js/autocomplete.js') }}\"></script>
<script src=\"{{ asset('assets/js/base_map.js?v1.0') }}\"></script>
<script src=\"{{ asset('assets/js/rrose.js') }}\"></script>
<script src=\"{{ asset('assets/js/auto_complete_geosearch.js') }}\"></script>
<script>
var datas = {{ datas|json_encode()|raw }};
var source_infobox;
var template_infobox;
jQuery(document).ready(function(){
initHandlebars();
source_infobox = \$(\"#infobox-template\").html();
template_infobox = Handlebars.compile(source_infobox);
\$('#search_agent').trigger(\"reset\");
// \$('#search_agent select').select2({
// allowClear: true
// });
clusterMarkers.options.disableClusteringAtZoom = 8;
setMap('agents_map', 8, 8, 16 );
geoSearch('geosearch', map);
// map.touchZoom.disable();
// map.doubleClickZoom.disable();
// map.boxZoom.disable();
// map.keyboard.disable();
map.scrollWheelZoom.disable();
// map.zoomControl.remove();
// map.dragging.disable();
addMarkers(datas, true, false);
var first_agent_id = \$('#list_agents .card').first().data('id');
bounceMarker(first_agent_id);
var owl = \$(\"#list_agents\").owlCarousel({
loop:true,
autoplay:true,
autoplayTimeout: owl_speed / 2,
autoplayHoverPause:true,
smartSpeed: 1000,
margin:30,
nav:false,
dots:false,
items:1
});
owl.on('translated.owl.carousel', function(event) {
if(\$('#geosearch').val() == '' && \$('#autoComplete_name').val() == '' ){
var current_agent_id = \$('#list_agents').find('.active .card').data('id');
bounceMarker(current_agent_id);
}
});
\$('#search_agent_name').find('.auto-clear').click(function(){
if( \$('#search_agent_name').find('ul').length > 0){
\$('#search_agent_name').find('ul').remove();
}
\$('#autoComplete_name').val('').trigger('change');
\$('#search_agent_name').find('.auto-clear').addClass('hidden');
});
\$('#autoComplete_name').change(function(){
if(\$(this).val() == ''){
map.closePopup();
map.fitBounds(clusterMarkers.getBounds());
}
else{
\$('#search_agent_name').find('.auto-clear').removeClass('hidden');
}
});
});
function centerMe(e) {
// retusrn;
if(\$('body').width() < 768 ){
var pixelPosition = map.latLngToLayerPoint(e.target.getLatLng());
var new_y = \$('#agents_map').height() /2;
pixelPosition.y = pixelPosition.y - new_y + 50 ;
var new_latlng = map.layerPointToLatLng(pixelPosition);
map.setView(new_latlng);
}
else{
map.setView(e.target.getLatLng());
}
}
function geoSearchOnSearch(map) {
L.Marker.stopAllBouncingMarkers();L.Marker.stopAllBouncingMarkers();
map.closePopup();
// \$('#autoComplete_name').val('').trigger('change');
\$(\"#search_agent_name .auto-clear\").trigger('click');
}
function geoSearchOnSubmit(map, object ) {
map.closePopup();
}
function geoSearchOnReset(map, element) {
map.fitBounds(clusterMarkers.getBounds());
}
const autoCompleteJS = new autoComplete({
data: { // Data src [Array, Function, Async] | (REQUIRED)
src: datas,
key: [\"name\"],
cache: false
},
sort: (a, b) => { // Sort rendered results ascendingly | (Optional)
if (a.match < b.match) return -1;
if (a.match > b.match) return 1;
return 0;
},
trigger: {event: [\"input\", \"focus\"]},
placeHolder: \"Recherche par nom ou prénom du conseiller\", // Place Holder text | (Optional)
selector: \"#autoComplete_name\", // Input field selector | (Optional)
observer: true, // Input field observer | (Optional)
threshold: 2, // Min. Chars length to start Engine | (Optional)
debounce: 300, // Post duration for engine to start | (Optional)
searchEngine: \"strict\", // Search Engine type/mode | (Optional)
diacritics: true,
resultsList: { // Rendered results list object | (Optional)
container: element => {
element.setAttribute(\"id\", \"autoComplete_list\");
element.setAttribute(\"class\", \"list-unstyled autoComplete_list\");
},
destination: \"#autoComplete_name\",
position: \"afterend\",
element: \"ul\"
},
maxResults: 5, // Max. number of rendered results | (Optional)
highlight: false, // Highlight matching results | (Optional)
resultItem: { // Rendered result item | (Optional)
content: (data, element) => {
item = data.value;
element.innerHTML = data.match +' ('+item.secteur+')';
},
element: \"li\"
},
noResults: (dataFeedback, generateList) => {
// Generate autoComplete List
generateList(autoCompleteJS, dataFeedback, dataFeedback.results);
// No Results List Item
const result = document.createElement(\"li\");
result.setAttribute(\"class\", \"no_result\");
result.setAttribute(\"tabindex\", \"1\");
result.innerHTML = `Pas de résultat pour \"\${dataFeedback.query}\"`;
document.querySelector(`#\${autoCompleteJS.resultsList.idName}`).appendChild(result);
},
onSelection: feedback => { // Action script onSelection event | (Optional)
\$(\".auto-search .auto-clear\").trigger('click');
// \$('#geosearch').val('').trigger('change');
\$('#geosearch').blur();
document.querySelector(\"#autoComplete_name\").blur();
// Prepare User's Selected Value
const selection = feedback.selection.value[feedback.selection.key];
// Replace Input value with the selected value
document.querySelector(\"#autoComplete_name\").value = selection;
// Console log autoComplete data feedback
// console.log(feedback.selection.value);
flyAndOpenPopupMarker(feedback.selection.value.id);
}
});
</script>
{% endblock %}", "front/agents/index.html.twig", "/home/pofr4524/sites/dev.sublimons.com/templates/front/agents/index.html.twig");
}
}