{% extends 'base.html.twig' %}
{% block title %} Sugsestion de logement à {{ ville }} {% endblock %}
{% block stylesheets %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
<script src="https://cpwebassets.codepen.io/assets/common/stopExecutionOnTimeout-2c7831bb44f98c1391d6a4ffda0e1fd302503391ca806e7fcc7b9b87197aec26.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<style>
/* Popup container */
.popup {
position: relative;
display: inline-block;
cursor: pointer;
}
/* The actual popup (appears on top) */
.popup .popuptext {
visibility: hidden;
width: 160px;
background-color: #fff;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 8px 0;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -80px;
}
/* Popup arrow */
.popup .popuptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #fff transparent transparent transparent;
}
/* Toggle this class when clicking on the popup container (hide and show the popup) */
.popup .show {
visibility: visible;
-webkit-animation: fadeIn 1s;
animation: fadeIn 1s
}
/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
from {opacity: 0;}
to {opacity: 1;}
}
@keyframes fadeIn {
from {opacity: 0;}
to {opacity:1 ;}
}
body {
background: #fff;
color: #fff;
font-family: sans-serif;
margin: 0;
text-align: center;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.twitter-share {
background: #fff;
color: #00acee;
cursor: pointer;
display: inline-block;
-webkit-border-radius: 6px;
border-radius: 6px;
}
.twitter-share:hover {
position: relative;
top: -1px;
}
.facebook-share {
background: #fff;
color: #3b5998;
cursor: pointer;
display: inline-block;
-webkit-border-radius: 6px;
border-radius: 6px;
}
.facebook-share:hover {
position: relative;
top: -1px;
}
.linkedin-share {
background: #fff;
color: #0e76a8;
cursor: pointer;
display: inline-block;
-webkit-border-radius: 6px;
border-radius: 6px;
}
.linkedin-share:hover {
position: relative;
top: -1px;
}
</style>
{% endblock %}
{% block nav %}
<header class="header-nav menu_style_home_one style2 navbar-scrolltofixed stricky main-menu">
{% endblock %}
{% block logo %}
{{ include('include/logopage.html.twig') }}
{% endblock %}
{% block body %}
<section class="our-listing bgc-f7 pb30-991">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="listing_sidebar dn db-991">
<div class="sidebar_content_details style3">
<!-- <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">×</a> -->
<div class="sidebar_listing_list style2 mobile_sytle_sidebar mb0">
<div class="sidebar_advanced_search_widget">
<h4 class="mb25">Advanced Search <a class="filter_closed_btn float-right" href="#"><small>Hide Filter</small> <span class="flaticon-close"></span></a></h4>
<ul class="sasw_list style2 mb0">
<li class="search_area">
<div class="form-group">
<input type="text" class="form-control" id="exampleInputName1" placeholder="keyword">
<label for="exampleInputEmail"><span class="flaticon-magnifying-glass"></span></label>
</div>
</li>
<li class="search_area">
<div class="form-group">
<input type="text" class="form-control" id="exampleInputEmail" placeholder="Location">
<label for="exampleInputEmail"><span class="flaticon-maps-and-flags"></span></label>
</div>
</li>
<li>
<div class="search_option_two">
<div class="candidate_revew_select">
<div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
<option>Status</option>
<option>Apartment</option>
<option>Bungalow</option>
<option>Condo</option>
<option>House</option>
<option>Land</option>
<option>Single Family</option>
</select><button type="button" class="btn dropdown-toggle btn-light" data-toggle="dropdown" role="button" title="Status"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner">Status</div></div> </div></button><div class="dropdown-menu " role="combobox"><div class="inner show" role="listbox" aria-expanded="false" tabindex="-1"><ul class="dropdown-menu inner show"></ul></div></div></div>
</div>
</div>
</li>
<li>
<div class="search_option_two">
<div class="candidate_revew_select">
<div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
<option>Property Type</option>
<option>Apartment</option>
<option>Bungalow</option>
<option>Condo</option>
<option>House</option>
<option>Land</option>
<option>Single Family</option>
</select><button type="button" class="btn dropdown-toggle btn-light" data-toggle="dropdown" role="button" title="Property Type"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner">Property Type</div></div> </div></button><div class="dropdown-menu " role="combobox"><div class="inner show" role="listbox" aria-expanded="false" tabindex="-1"><ul class="dropdown-menu inner show"></ul></div></div></div>
</div>
</div>
</li>
<li>
<div class="small_dropdown2">
<div id="prncgs" class="btn dd_btn">
<span>Price</span>
<label for="exampleInputEmail2"><span class="fa fa-angle-down"></span></label>
</div>
<div class="dd_content2">
<div class="pricing_acontent">
<span id="slider-range-value1">$52,000</span>
<span class="mt0" id="slider-range-value2">$98,000</span>
<div id="slider" class="noUi-target noUi-ltr noUi-horizontal noUi-background"><div class="noUi-base"><div class="noUi-origin noUi-connect" style="left: 0%;"><div class="noUi-handle noUi-handle-lower"></div></div><div class="noUi-origin noUi-background" style="left: 58.9744%;"><div class="noUi-handle noUi-handle-upper"></div></div></div></div>
<!-- <input type="text" class="amount" placeholder="$52,239">
<input type="text" class="amount2" placeholder="$985,14">
<div class="slider-range"></div> -->
</div>
</div>
</div>
</li>
<li>
<div class="search_option_two">
<div class="candidate_revew_select">
<div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
<option>Bathrooms</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select><button type="button" class="btn dropdown-toggle btn-light" data-toggle="dropdown" role="button" title="Bathrooms"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner">Bathrooms</div></div> </div></button><div class="dropdown-menu " role="combobox"><div class="inner show" role="listbox" aria-expanded="false" tabindex="-1"><ul class="dropdown-menu inner show"></ul></div></div></div>
</div>
</div>
</li>
<li>
<div class="search_option_two">
<div class="candidate_revew_select">
<div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
<option>Bedrooms</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
</select><button type="button" class="btn dropdown-toggle btn-light" data-toggle="dropdown" role="button" title="Bedrooms"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner">Bedrooms</div></div> </div></button><div class="dropdown-menu " role="combobox"><div class="inner show" role="listbox" aria-expanded="false" tabindex="-1"><ul class="dropdown-menu inner show"></ul></div></div></div>
</div>
</div>
</li>
<li>
<div class="search_option_two">
<div class="candidate_revew_select">
<div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
<option>Garages</option>
<option>Yes</option>
<option>No</option>
<option>Others</option>
</select><button type="button" class="btn dropdown-toggle btn-light" data-toggle="dropdown" role="button" title="Garages"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner">Garages</div></div> </div></button><div class="dropdown-menu " role="combobox"><div class="inner show" role="listbox" aria-expanded="false" tabindex="-1"><ul class="dropdown-menu inner show"></ul></div></div></div>
</div>
</div>
</li>
<li>
<div class="search_option_two">
<div class="candidate_revew_select">
<div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
<option>Year built</option>
<option>2013</option>
<option>2014</option>
<option>2015</option>
<option>2016</option>
<option>2017</option>
<option>2018</option>
<option>2019</option>
<option>2020</option>
</select><button type="button" class="btn dropdown-toggle btn-light" data-toggle="dropdown" role="button" title="Year built"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner">Year built</div></div> </div></button><div class="dropdown-menu " role="combobox"><div class="inner show" role="listbox" aria-expanded="false" tabindex="-1"><ul class="dropdown-menu inner show"></ul></div></div></div>
</div>
</div>
</li>
<li class="min_area style2 list-inline-item">
<div class="form-group">
<input type="text" class="form-control" id="exampleInputName2" placeholder="Min Area">
</div>
</li>
<li class="max_area list-inline-item">
<div class="form-group">
<input type="text" class="form-control" id="exampleInputName3" placeholder="Max Area">
</div>
</li>
<li>
<div id="accordion" class="panel-group">
<div class="panel">
<div class="panel-heading">
<h4 class="panel-title">
<a href="#panelBodyRating" class="accordion-toggle link" data-toggle="collapse" data-parent="#accordion"><i class="flaticon-more"></i> Advanced features</a>
</h4>
</div>
<div id="panelBodyRating" class="panel-collapse collapse">
<div class="panel-body row">
<div class="col-lg-12">
<ul class="ui_kit_checkbox selectable-list float-left fn-400">
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck1">
<label class="custom-control-label" for="customCheck1">Air Conditioning</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck4">
<label class="custom-control-label" for="customCheck4">Barbeque</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck10">
<label class="custom-control-label" for="customCheck10">Gym</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck5">
<label class="custom-control-label" for="customCheck5">Microwave</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck6">
<label class="custom-control-label" for="customCheck6">TV Cable</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck2">
<label class="custom-control-label" for="customCheck2">Lawn</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck11">
<label class="custom-control-label" for="customCheck11">Refrigerator</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck3">
<label class="custom-control-label" for="customCheck3">Swimming Pool</label>
</div>
</li>
</ul>
<ul class="ui_kit_checkbox selectable-list float-right fn-400">
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck12">
<label class="custom-control-label" for="customCheck12">WiFi</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck14">
<label class="custom-control-label" for="customCheck14">Sauna</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck7">
<label class="custom-control-label" for="customCheck7">Dryer</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck9">
<label class="custom-control-label" for="customCheck9">Washer</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck13">
<label class="custom-control-label" for="customCheck13">Laundry</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck8">
<label class="custom-control-label" for="customCheck8">Outdoor Shower</label>
</div>
</li>
<li>
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck15">
<label class="custom-control-label" for="customCheck15">Window Coverings</label>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</li>
<li>
<div class="search_option_button">
<button type="submit" class="btn btn-block btn-thm">Search</button>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<div class="breadcrumb_content style2 mb0-991">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="#">Home</a></li>
<li class="breadcrumb-item active text-thm" aria-current="page">Simple Listing – List View</li>
</ol>
<h2 class="breadcrumb_title">Simple Listing – List View</h2>
</div>
</div>
<div class="col-lg-6">
<div class="listing_list_style mb20-xsd tal-991">
<ul class="mb0">
<li class="list-inline-item"><a href="#"><span class="fa fa-th-large"></span></a></li>
<li class="list-inline-item"><a href="#"><span class="fa fa-th-list"></span></a></li>
</ul>
</div>
<div class="dn db-991 mt30 mb0">
<div id="main2">
<span id="open2" class="flaticon-filter-results-button filter_open_btn style2"> Show Filter</span>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-4 col-xl-4">
<div class="sidebar_listing_grid1 dn-991">
{{ include('recherche/form.html.twig') }}
{{ include('widget/propositionliste.html.twig') }}
<div class="terms_condition_widget">
<h4 class="title">Categories Property</h4>
<div class="widget_list">
<ul class="list_details">
<li><a href="#"><i class="fa fa-caret-right mr10"></i>Apartment <span class="float-right">6 properties</span></a></li>
<li><a href="#"><i class="fa fa-caret-right mr10"></i>Condo <span class="float-right">12 properties</span></a></li>
<li><a href="#"><i class="fa fa-caret-right mr10"></i>Family House <span class="float-right">8 properties</span></a></li>
<li><a href="#"><i class="fa fa-caret-right mr10"></i>Modern Villa <span class="float-right">26 properties</span></a></li>
<li><a href="#"><i class="fa fa-caret-right mr10"></i>Town House <span class="float-right">89 properties</span></a></li>
</ul>
</div>
</div>
<div class="sidebar_feature_listing">
<h4 class="title">Recently Viewed</h4>
<div class="media">
<img class="align-self-start mr-3" src="images/blog/fls1.jpg" alt="fls1.jpg">
<div class="media-body">
<h5 class="mt-0 post_title">Nice Room With View</h5>
<a href="#">$13,000/<small>/mo</small></a>
<ul class="mb0">
<li class="list-inline-item">Beds: 4</li>
<li class="list-inline-item">Baths: 2</li>
<li class="list-inline-item">Sq Ft: 5280</li>
</ul>
</div>
</div>
<div class="media">
<img class="align-self-start mr-3" src="images/blog/fls2.jpg" alt="fls2.jpg">
<div class="media-body">
<h5 class="mt-0 post_title">Villa called Archangel</h5>
<a href="#">$13,000<small>/mo</small></a>
<ul class="mb0">
<li class="list-inline-item">Beds: 4</li>
<li class="list-inline-item">Baths: 2</li>
<li class="list-inline-item">Sq Ft: 5280</li>
</ul>
</div>
</div>
<div class="media">
<img class="align-self-start mr-3" src="images/blog/fls3.jpg" alt="fls3.jpg">
<div class="media-body">
<h5 class="mt-0 post_title">Sunset Studio</h5>
<a href="#">$13,000<small>/mo</small></a>
<ul class="mb0">
<li class="list-inline-item">Beds: 4</li>
<li class="list-inline-item">Baths: 2</li>
<li class="list-inline-item">Sq Ft: 5280</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-12 col-lg-8">
<div class="row">
<div class="grid_list_search_result">
<div class="col-sm-12 col-md-4 col-lg-4 col-xl-5">
<div class="left_area tac-xsd">
<p> {% for message in app.flashes('success') %}
{{ message| raw }}
{% endfor %}</p>
</div>
</div>
</div>
</div>
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<!-- css file -->
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/style.css') }}">
</head>
<body>
<div id="results"></div>
<div id="loader_image"><img src="{{ asset('images/loader.gif') }}" alt="" width="24" height="24"> Loading...please wait</div>
<div class="margin10"></div>
<div id="loader_message"></div>
</div>
</div>
</div>
</section>
<!-- Wrapper End -->
<script type="text/javascript" src="{{ asset('js/jquery-3.3.1.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/bootstrap.min.js') }}"></script>
<!-- Custom script for all pages -->
<script type="text/javascript" src="{{ asset('js/script.js') }}"></script>
<!-- Wrapper End -->
<script type="text/javascript" src="{{ asset('js/progressbar.js') }}"></script>
<script>
function onClickBtnLike(event) {
event.preventDefault();
const url = this.href;
const spanCount = this.querySelector('span.js-likes');
const icone = this.querySelector('i');
axios.get(url).then(function (response) {
spanCount.textContent = response.data.likes;
if (response.status === 200){
if (icone.classList.contains('fas')) {
icone.classList.replace('fas','far');
}
else {
icone.classList.replace('far', 'fas');
}
}
}).catch(function (error) {
});
}
document.querySelectorAll('a.js-like').forEach(function (link){
link.addEventListener('click', onClickBtnLike)
})
</script>
{% if type == 1 %}
<script type="text/javascript">
var limit = 10
var offset = 0;
function displayRecords(lim, off) {
$.ajax({
type: "GET",
async: false,
url: "/getrecords/{{ ville }}",
data: "limit=" + lim + "&offset=" + off,
cache: false,
beforeSend: function() {
$("#loader_message").html("").hide();
$('#loader_image').show();
},
success: function(html) {
$('#loader_image').hide();
$("#results").append(html);
if (html == "") {
$("#loader_message").html('<button data-atr="nodata" class="btn btn-default" type="button">Fin des résultas.</button>').show()
} else {
$("#loader_message").html('<button class="btn btn-default" type="button">Charger plus de données</button>').show();
}
}
});
}
$(document).ready(function() {
// start to load the first set of data
displayRecords(limit, offset);
$('#loader_message').click(function() {
// if it has no more records no need to fire ajax request
var d = $('#loader_message').find("button").attr("data-atr");
if (d != "nodata") {
offset = limit + offset;
displayRecords(limit, offset);
}
});
});
</script>
{% else %}
<script type="text/javascript">
var busy = false;
var limit = 15
var offset = 0;
function displayRecords(lim, off) {
$.ajax({
type: "GET",
async: false,
url: "/getrecords/{{ ville }}",
data: "limit=" + lim + "&offset=" + off,
cache: false,
beforeSend: function() {
$("#loader_message").html("").hide();
$('#loader_image').show();
},
success: function(html) {
$("#results").append(html);
$('#loader_image').hide();
if (html == "") {
$("#loader_message").html('<button data-atr="nodata" class="btn btn-default" type="button">Fin des résultas.</button>').show()
} else {
$("#loader_message").html('<button class="btn btn-default" type="button">Charger plus de données</button>').show();
}
window.busy = false;
}
});
}
$(document).ready(function() {
// start to load the first set of data
if (busy == false) {
busy = true;
// start to load the first set of data
displayRecords(limit, offset);
}
$(window).scroll(function() {
// make sure u give the container id of the data to be loaded in.
if ($(window).scrollTop() + $(window).height() > $("#results").height() && !busy) {
busy = true;
offset = limit + offset;
// this is optional just to delay the loading of data
setTimeout(function() { displayRecords(limit, offset); }, 500);
// you can remove the above code and can use directly this function
// displayRecords(limit, offset);
}
});
});
</script>
{% endif %}
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script>
var chaine = '<div class="alert alert-primary alert-dismissible fade show" role="alert">Vous avez rajouter cette annonce à vos favories.<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button></div>';
function onClickBtnLike(event) {
event.preventDefault();
const url = this.href;
const spanCount = this.querySelector('span.js-likes');
const icone = this.querySelector('i');
axios.get(url).then(function (response) {
spanCount.textContent = response.data.likes;
if (response.status === 200){
if (icone.classList.contains('fas')) {
icone.classList.replace('fas','far');
}
else {
icone.classList.replace('far', 'fas');
}
}
}).catch(function (error) {
});
}
document.querySelectorAll('a.js-like').forEach(function (link){
link.addEventListener('click', onClickBtnLike)
})
</script>
<script src="{{ asset('bootstrap/js/bootstrap.min.js') }}"></script>
</body>
</html>
{% endblock %}
{% block javascripts %}
{{ include('recherche/js.html.twig') }}
{% endblock %}