{% extends 'base.html.twig' %}
{% block left_sidebar %}
{% if isMobileDevice() %}
{% include 'left_sidebar.html.twig' %}
{% endif %}
{% endblock %}
{% block mainColumnClass %}{{ parent() }} search-result-page{{ not isMobileDevice() ? ' one-column' }}{% endblock %}
{% block main_content %}
{{ searchResultHtml|raw }}
{% endblock%}
{% block popups %}
{{ parent() }}
{% if not currentLocationCookie %}
{% include 'Slivki/popups/user_location_popup.html.twig' %}
{% endif %}
{% endblock %}
{% block javascripts %}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.countdown/2.2.0/jquery.countdown.min.js"></script>
{% if not currentLocationCookie %}
<script src="//api-maps.yandex.ru/2.1.73/?lang=ru-RU" type="text/javascript"></script>
{% endif %}
{{ parent() }}
<script>
$(function() {
fixSearchFilterBlock();
addUtmToSearchResults();
});
</script>
{% endblock %}
{% block RTBHouse %}
{{ parent() }}
<script>
if ($('#rtbHouseSearchIDList').length) {
try{ (function() {
var prefix = "", hash = "TS5TS2S9bdSbgKBA4Q2H", rtbhTags = []; rtbhTags.push("pr_"+hash+"_listing_" + document.getElementById('rtbHouseSearchIDList').value); rtbhTags.push("pr_"+hash+"_uid_" + document.getElementById('rtbhUID').value);
var key = "__rtbhouse.lid", lid = window.localStorage.getItem(key); if (!lid) {
lid = ""; var pool = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (var i = 0; i < 20; i++) lid += pool.charAt(Math.floor(Math.random() * pool.length)); window.localStorage.setItem(key, lid);}
rtbhTags.push("pr_"+hash+"_lid_" + lid);
var ifr = document.createElement("iframe"),
sr = encodeURIComponent(document.referrer ? document.referrer : ""),
su = encodeURIComponent(document.location.href ? document.location.href : ""),
ifrSrc = "https://"+prefix+"creativecdn.com/tags?type=iframe", tmstmp = encodeURIComponent("" + Date.now()); for(var i=0; i<rtbhTags.length; i++) {ifrSrc += "&id=" + encodeURIComponent(rtbhTags[i]);}
ifrSrc += "&su=" + su + "&sr=" + sr + "&ts=" + tmstmp;
ifr.setAttribute("src", ifrSrc); ifr.setAttribute("width", "1");
ifr.setAttribute("height", "1"); ifr.setAttribute("scrolling", "no");
ifr.setAttribute("frameBorder", "0"); ifr.setAttribute("style", "display:none");
ifr.setAttribute("referrerpolicy", "no-referrer-when-downgrade"); if(document.body){document.body.appendChild(ifr);}
else{window.addEventListener('DOMContentLoaded', function(){document.body.appendChild(ifr);});}
})();} catch(e) {}
}
</script>
{% endblock %}