templates/scroll/liste.html.twig line 1

Open in your IDE?
  1.  
  2.  
  3. {% extends 'base.html.twig' %}
  4. {% block title %} Sugsestion de logement à {{ ville }} {% endblock %}
  5.  
  6. {% block stylesheets %}
  7.  
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
  9. <script src="https://cpwebassets.codepen.io/assets/common/stopExecutionOnTimeout-2c7831bb44f98c1391d6a4ffda0e1fd302503391ca806e7fcc7b9b87197aec26.js"></script>
  10.   
  11. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  12. <style>
  13.     /* Popup container */
  14.   .popup {
  15.     position: relative;
  16.     display: inline-block;
  17.     cursor: pointer;
  18.   }
  19.   
  20.   /* The actual popup (appears on top) */
  21.   .popup .popuptext {
  22.     visibility: hidden;
  23.     width: 160px;
  24.     background-color: #fff;
  25.     color: #fff;
  26.     text-align: center;
  27.     border-radius: 6px;
  28.     padding: 8px 0;
  29.     position: absolute;
  30.     z-index: 1;
  31.     bottom: 125%;
  32.     left: 50%;
  33.     margin-left: -80px;
  34.   }
  35.   
  36.   /* Popup arrow */
  37.   .popup .popuptext::after {
  38.     content: "";
  39.     position: absolute;
  40.     top: 100%;
  41.     left: 50%;
  42.     margin-left: -5px;
  43.     border-width: 5px;
  44.     border-style: solid;
  45.     border-color: #fff transparent transparent transparent;
  46.   }
  47.   
  48.   /* Toggle this class when clicking on the popup container (hide and show the popup) */
  49.   .popup .show {
  50.     visibility: visible;
  51.     -webkit-animation: fadeIn 1s;
  52.     animation: fadeIn 1s
  53.   }
  54.   
  55.   /* Add animation (fade in the popup) */
  56.   @-webkit-keyframes fadeIn {
  57.     from {opacity: 0;}
  58.     to {opacity: 1;}
  59.   }
  60.   
  61.   @keyframes fadeIn {
  62.     from {opacity: 0;}
  63.     to {opacity:1 ;}
  64.   } 
  65.   body {
  66.           background: #fff;
  67.           color: #fff;
  68.           font-family: sans-serif;
  69.           margin: 0;
  70.           text-align: center;
  71.           -webkit-font-smoothing: antialiased;
  72.           -moz-osx-font-smoothing: grayscale;
  73.         }
  74.         
  75.         .twitter-share {
  76.           background: #fff;
  77.           color:  #00acee;
  78.           cursor: pointer;
  79.           display: inline-block;
  80.           -webkit-border-radius: 6px;
  81.           border-radius: 6px;
  82.         }
  83.         .twitter-share:hover {
  84.           position: relative;
  85.           top: -1px;
  86.         }
  87.          .facebook-share {
  88.           background: #fff;
  89.           color:  #3b5998;
  90.           cursor: pointer;
  91.           display: inline-block;
  92.           -webkit-border-radius: 6px;
  93.           border-radius: 6px;
  94.         }
  95.         .facebook-share:hover {
  96.           position: relative;
  97.           top: -1px;
  98.         }
  99.         .linkedin-share {
  100.           background: #fff;
  101.           color:  #0e76a8;
  102.           cursor: pointer;
  103.           display: inline-block;
  104.           -webkit-border-radius: 6px;
  105.           border-radius: 6px;
  106.         }
  107.         .linkedin-share:hover {
  108.           position: relative;
  109.           top: -1px;
  110.         }
  111.           </style>
  112. {% endblock %}
  113. {% block nav %}
  114.     <header class="header-nav menu_style_home_one style2 navbar-scrolltofixed stricky main-menu">
  115.  
  116. {% endblock %}
  117.   {% block logo %}
  118.          {{ include('include/logopage.html.twig') }}     
  119.             
  120. {% endblock %}
  121.  
  122. {% block body %}
  123. <section class="our-listing bgc-f7 pb30-991">
  124.         <div class="container">
  125.             <div class="row">
  126.                 <div class="col-lg-12">
  127.                     <div class="listing_sidebar dn db-991">
  128.                         <div class="sidebar_content_details style3">
  129.                             <!-- <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a> -->
  130.                             <div class="sidebar_listing_list style2 mobile_sytle_sidebar mb0">
  131.                                 <div class="sidebar_advanced_search_widget">
  132.                                     <h4 class="mb25">Advanced Search <a class="filter_closed_btn float-right" href="#"><small>Hide Filter</small> <span class="flaticon-close"></span></a></h4>
  133.                                     <ul class="sasw_list style2 mb0">
  134.                                         <li class="search_area">
  135.                                             <div class="form-group">
  136.                                                 <input type="text" class="form-control" id="exampleInputName1" placeholder="keyword">
  137.                                                 <label for="exampleInputEmail"><span class="flaticon-magnifying-glass"></span></label>
  138.                                             </div>
  139.                                         </li>
  140.                                         <li class="search_area">
  141.                                             <div class="form-group">
  142.                                                 <input type="text" class="form-control" id="exampleInputEmail" placeholder="Location">
  143.                                                 <label for="exampleInputEmail"><span class="flaticon-maps-and-flags"></span></label>
  144.                                             </div>
  145.                                         </li>
  146.                                         <li>
  147.                                             <div class="search_option_two">
  148.                                                 <div class="candidate_revew_select">
  149.                                                     <div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
  150.                                                         <option>Status</option>
  151.                                                         <option>Apartment</option>
  152.                                                         <option>Bungalow</option>
  153.                                                         <option>Condo</option>
  154.                                                         <option>House</option>
  155.                                                         <option>Land</option>
  156.                                                         <option>Single Family</option>
  157.                                                     </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>
  158.                                                 </div>
  159.                                             </div>
  160.                                         </li>
  161.                                         <li>
  162.                                             <div class="search_option_two">
  163.                                                 <div class="candidate_revew_select">
  164.                                                     <div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
  165.                                                         <option>Property Type</option>
  166.                                                         <option>Apartment</option>
  167.                                                         <option>Bungalow</option>
  168.                                                         <option>Condo</option>
  169.                                                         <option>House</option>
  170.                                                         <option>Land</option>
  171.                                                         <option>Single Family</option>
  172.                                                     </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>
  173.                                                 </div>
  174.                                             </div>
  175.                                         </li>
  176.                                         <li>
  177.                                             <div class="small_dropdown2">
  178.                                                 <div id="prncgs" class="btn dd_btn">
  179.                                                     <span>Price</span>
  180.                                                     <label for="exampleInputEmail2"><span class="fa fa-angle-down"></span></label>
  181.                                                 </div>
  182.                                                   <div class="dd_content2">
  183.                                                     <div class="pricing_acontent">
  184.                                                         <span id="slider-range-value1">$52,000</span>
  185.                                                         <span class="mt0" id="slider-range-value2">$98,000</span>
  186.                                                         <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>
  187.                                                         <!-- <input type="text" class="amount" placeholder="$52,239"> 
  188.                                                         <input type="text" class="amount2" placeholder="$985,14">
  189.                                                         <div class="slider-range"></div> -->
  190.                                                     </div>
  191.                                                   </div>
  192.                                             </div>
  193.                                         </li>
  194.                                         <li>
  195.                                             <div class="search_option_two">
  196.                                                 <div class="candidate_revew_select">
  197.                                                     <div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
  198.                                                         <option>Bathrooms</option>
  199.                                                         <option>1</option>
  200.                                                         <option>2</option>
  201.                                                         <option>3</option>
  202.                                                         <option>4</option>
  203.                                                         <option>5</option>
  204.                                                         <option>6</option>
  205.                                                     </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>
  206.                                                 </div>
  207.                                             </div>
  208.                                         </li>
  209.                                         <li>
  210.                                             <div class="search_option_two">
  211.                                                 <div class="candidate_revew_select">
  212.                                                     <div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
  213.                                                         <option>Bedrooms</option>
  214.                                                         <option>1</option>
  215.                                                         <option>2</option>
  216.                                                         <option>3</option>
  217.                                                         <option>4</option>
  218.                                                         <option>5</option>
  219.                                                         <option>6</option>
  220.                                                     </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>
  221.                                                 </div>
  222.                                             </div>
  223.                                         </li>
  224.                                         <li>
  225.                                             <div class="search_option_two">
  226.                                                 <div class="candidate_revew_select">
  227.                                                     <div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
  228.                                                         <option>Garages</option>
  229.                                                         <option>Yes</option>
  230.                                                         <option>No</option>
  231.                                                         <option>Others</option>
  232.                                                     </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>
  233.                                                 </div>
  234.                                             </div>
  235.                                         </li>
  236.                                         <li>
  237.                                             <div class="search_option_two">
  238.                                                 <div class="candidate_revew_select">
  239.                                                     <div class="dropdown bootstrap-select w100 show-tick"><select class="selectpicker w100 show-tick" tabindex="-98">
  240.                                                         <option>Year built</option>
  241.                                                         <option>2013</option>
  242.                                                         <option>2014</option>
  243.                                                         <option>2015</option>
  244.                                                         <option>2016</option>
  245.                                                         <option>2017</option>
  246.                                                         <option>2018</option>
  247.                                                         <option>2019</option>
  248.                                                         <option>2020</option>
  249.                                                     </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>
  250.                                                 </div>
  251.                                             </div>
  252.                                         </li>
  253.                                         <li class="min_area style2 list-inline-item">
  254.                                             <div class="form-group">
  255.                                                 <input type="text" class="form-control" id="exampleInputName2" placeholder="Min Area">
  256.                                             </div>
  257.                                         </li>
  258.                                         <li class="max_area list-inline-item">
  259.                                             <div class="form-group">
  260.                                                 <input type="text" class="form-control" id="exampleInputName3" placeholder="Max Area">
  261.                                             </div>
  262.                                         </li>
  263.                                         <li>
  264.                                               <div id="accordion" class="panel-group">
  265.                                                 <div class="panel">
  266.                                                       <div class="panel-heading">
  267.                                                           <h4 class="panel-title">
  268.                                                             <a href="#panelBodyRating" class="accordion-toggle link" data-toggle="collapse" data-parent="#accordion"><i class="flaticon-more"></i> Advanced features</a>
  269.                                                         </h4>
  270.                                                       </div>
  271.                                                     <div id="panelBodyRating" class="panel-collapse collapse">
  272.                                                         <div class="panel-body row">
  273.                                                               <div class="col-lg-12">
  274.                                                                 <ul class="ui_kit_checkbox selectable-list float-left fn-400">
  275.                                                                     <li>
  276.                                                                         <div class="custom-control custom-checkbox">
  277.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck1">
  278.                                                                             <label class="custom-control-label" for="customCheck1">Air Conditioning</label>
  279.                                                                         </div>
  280.                                                                     </li>
  281.                                                                     <li>
  282.                                                                         <div class="custom-control custom-checkbox">
  283.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck4">
  284.                                                                             <label class="custom-control-label" for="customCheck4">Barbeque</label>
  285.                                                                         </div>
  286.                                                                     </li>
  287.                                                                     <li>
  288.                                                                         <div class="custom-control custom-checkbox">
  289.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck10">
  290.                                                                             <label class="custom-control-label" for="customCheck10">Gym</label>
  291.                                                                         </div>
  292.                                                                     </li>
  293.                                                                     <li>
  294.                                                                         <div class="custom-control custom-checkbox">
  295.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck5">
  296.                                                                             <label class="custom-control-label" for="customCheck5">Microwave</label>
  297.                                                                         </div>
  298.                                                                     </li>
  299.                                                                     <li>
  300.                                                                         <div class="custom-control custom-checkbox">
  301.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck6">
  302.                                                                             <label class="custom-control-label" for="customCheck6">TV Cable</label>
  303.                                                                         </div>
  304.                                                                     </li>
  305.                                                                     <li>
  306.                                                                         <div class="custom-control custom-checkbox">
  307.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck2">
  308.                                                                             <label class="custom-control-label" for="customCheck2">Lawn</label>
  309.                                                                         </div>
  310.                                                                     </li>
  311.                                                                     <li>
  312.                                                                         <div class="custom-control custom-checkbox">
  313.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck11">
  314.                                                                             <label class="custom-control-label" for="customCheck11">Refrigerator</label>
  315.                                                                         </div>
  316.                                                                     </li>
  317.                                                                     <li>
  318.                                                                         <div class="custom-control custom-checkbox">
  319.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck3">
  320.                                                                             <label class="custom-control-label" for="customCheck3">Swimming Pool</label>
  321.                                                                         </div>
  322.                                                                     </li>
  323.                                                                 </ul>
  324.                                                                 <ul class="ui_kit_checkbox selectable-list float-right fn-400">
  325.                                                                     <li>
  326.                                                                         <div class="custom-control custom-checkbox">
  327.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck12">
  328.                                                                             <label class="custom-control-label" for="customCheck12">WiFi</label>
  329.                                                                         </div>
  330.                                                                     </li>
  331.                                                                     <li>
  332.                                                                         <div class="custom-control custom-checkbox">
  333.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck14">
  334.                                                                             <label class="custom-control-label" for="customCheck14">Sauna</label>
  335.                                                                         </div>
  336.                                                                     </li>
  337.                                                                     <li>
  338.                                                                         <div class="custom-control custom-checkbox">
  339.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck7">
  340.                                                                             <label class="custom-control-label" for="customCheck7">Dryer</label>
  341.                                                                         </div>
  342.                                                                     </li>
  343.                                                                     <li>
  344.                                                                         <div class="custom-control custom-checkbox">
  345.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck9">
  346.                                                                             <label class="custom-control-label" for="customCheck9">Washer</label>
  347.                                                                         </div>
  348.                                                                     </li>
  349.                                                                     <li>
  350.                                                                         <div class="custom-control custom-checkbox">
  351.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck13">
  352.                                                                             <label class="custom-control-label" for="customCheck13">Laundry</label>
  353.                                                                         </div>
  354.                                                                     </li>
  355.                                                                     <li>
  356.                                                                         <div class="custom-control custom-checkbox">
  357.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck8">
  358.                                                                             <label class="custom-control-label" for="customCheck8">Outdoor Shower</label>
  359.                                                                         </div>
  360.                                                                     </li>
  361.                                                                     <li>
  362.                                                                         <div class="custom-control custom-checkbox">
  363.                                                                             <input type="checkbox" class="custom-control-input" id="customCheck15">
  364.                                                                             <label class="custom-control-label" for="customCheck15">Window Coverings</label>
  365.                                                                         </div>
  366.                                                                     </li>
  367.                                                                 </ul>
  368.                                                             </div>
  369.                                                         </div>
  370.                                                     </div>
  371.                                                 </div>
  372.                                             </div>
  373.                                         </li>
  374.                                         <li>
  375.                                             <div class="search_option_button">
  376.                                                 <button type="submit" class="btn btn-block btn-thm">Search</button>
  377.                                             </div>
  378.                                         </li>
  379.                                     </ul>
  380.                                 </div>
  381.                             </div>
  382.                         </div>
  383.                     </div>
  384.                 </div>
  385.             </div>
  386.             <div class="row">
  387.                 <div class="col-lg-6">
  388.                     <div class="breadcrumb_content style2 mb0-991">
  389.                         <ol class="breadcrumb">
  390.                             <li class="breadcrumb-item"><a href="#">Home</a></li>
  391.                             <li class="breadcrumb-item active text-thm" aria-current="page">Simple Listing – List View</li>
  392.                         </ol>
  393.                         <h2 class="breadcrumb_title">Simple Listing – List View</h2>
  394.                     </div>
  395.                 </div>
  396.                 <div class="col-lg-6">
  397.                     <div class="listing_list_style mb20-xsd tal-991">
  398.                         <ul class="mb0">
  399.                             <li class="list-inline-item"><a href="#"><span class="fa fa-th-large"></span></a></li>
  400.                             <li class="list-inline-item"><a href="#"><span class="fa fa-th-list"></span></a></li>
  401.                         </ul>
  402.                     </div>
  403.                     <div class="dn db-991 mt30 mb0">
  404.                         <div id="main2">
  405.                             <span id="open2" class="flaticon-filter-results-button filter_open_btn style2"> Show Filter</span>
  406.                         </div>
  407.                     </div>
  408.                 </div>
  409.             </div>
  410.             <div class="row">
  411.                 <div class="col-lg-4 col-xl-4">
  412.                     <div class="sidebar_listing_grid1 dn-991">
  413.                         
  414.                         
  415.    {{ include('recherche/form.html.twig') }}  
  416.     {{ include('widget/propositionliste.html.twig') }} 
  417.                         <div class="terms_condition_widget">
  418.                             <h4 class="title">Categories Property</h4>
  419.                             <div class="widget_list">
  420.                                 <ul class="list_details">
  421.                                     <li><a href="#"><i class="fa fa-caret-right mr10"></i>Apartment <span class="float-right">6 properties</span></a></li>
  422.                                     <li><a href="#"><i class="fa fa-caret-right mr10"></i>Condo <span class="float-right">12 properties</span></a></li>
  423.                                     <li><a href="#"><i class="fa fa-caret-right mr10"></i>Family House <span class="float-right">8 properties</span></a></li>
  424.                                     <li><a href="#"><i class="fa fa-caret-right mr10"></i>Modern Villa <span class="float-right">26 properties</span></a></li>
  425.                                     <li><a href="#"><i class="fa fa-caret-right mr10"></i>Town House <span class="float-right">89 properties</span></a></li>
  426.                                 </ul>
  427.                             </div>
  428.                         </div>
  429.                         <div class="sidebar_feature_listing">
  430.                             <h4 class="title">Recently Viewed</h4>
  431.                             <div class="media">
  432.                                 <img class="align-self-start mr-3" src="images/blog/fls1.jpg" alt="fls1.jpg">
  433.                                 <div class="media-body">
  434.                                     <h5 class="mt-0 post_title">Nice Room With View</h5>
  435.                                     <a href="#">$13,000/<small>/mo</small></a>
  436.                                     <ul class="mb0">
  437.                                         <li class="list-inline-item">Beds: 4</li>
  438.                                         <li class="list-inline-item">Baths: 2</li>
  439.                                         <li class="list-inline-item">Sq Ft: 5280</li>
  440.                                     </ul>
  441.                                 </div>
  442.                             </div>
  443.                             <div class="media">
  444.                                 <img class="align-self-start mr-3" src="images/blog/fls2.jpg" alt="fls2.jpg">
  445.                                 <div class="media-body">
  446.                                     <h5 class="mt-0 post_title">Villa called Archangel</h5>
  447.                                     <a href="#">$13,000<small>/mo</small></a>
  448.                                     <ul class="mb0">
  449.                                         <li class="list-inline-item">Beds: 4</li>
  450.                                         <li class="list-inline-item">Baths: 2</li>
  451.                                         <li class="list-inline-item">Sq Ft: 5280</li>
  452.                                     </ul>
  453.                                 </div>
  454.                             </div>
  455.                             <div class="media">
  456.                                 <img class="align-self-start mr-3" src="images/blog/fls3.jpg" alt="fls3.jpg">
  457.                                 <div class="media-body">
  458.                                     <h5 class="mt-0 post_title">Sunset Studio</h5>
  459.                                     <a href="#">$13,000<small>/mo</small></a>
  460.                                     <ul class="mb0">
  461.                                         <li class="list-inline-item">Beds: 4</li>
  462.                                         <li class="list-inline-item">Baths: 2</li>
  463.                                         <li class="list-inline-item">Sq Ft: 5280</li>
  464.                                     </ul>
  465.                                 </div>
  466.                             </div>
  467.                         </div>
  468.                     </div>
  469.                 </div>
  470.                 <div class="col-md-12 col-lg-8">
  471.                     <div class="row">
  472.                         <div class="grid_list_search_result">
  473.                             <div class="col-sm-12 col-md-4 col-lg-4 col-xl-5">
  474.                                 <div class="left_area tac-xsd">
  475.                                     <p> {% for message in app.flashes('success') %}
  476.                                                         {{ message| raw  }}  
  477.                                             {% endfor %}</p>
  478.                                 </div>
  479.                             </div>
  480.                              
  481.                         </div>
  482.                     </div>
  483.  <!DOCTYPE html>
  484. <html dir="ltr" lang="en">
  485. <head>
  486.  
  487. <!-- css file -->
  488. <link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
  489. <link rel="stylesheet" href="{{ asset('css/style.css') }}">
  490.  
  491.  
  492. </head>
  493. <body>
  494.   
  495.     <div id="results"></div>
  496.             <div id="loader_image"><img src="{{ asset('images/loader.gif') }}" alt="" width="24" height="24"> Loading...please wait</div>
  497.             <div class="margin10"></div>
  498.             <div id="loader_message"></div>
  499.                
  500.      
  501.                 </div>
  502.             </div>
  503.         </div>
  504.     </section>
  505.  
  506.  
  507. <!-- Wrapper End -->
  508. <script type="text/javascript" src="{{ asset('js/jquery-3.3.1.js') }}"></script>
  509.  
  510.  
  511. <script type="text/javascript" src="{{ asset('js/bootstrap.min.js') }}"></script>
  512.  
  513.  
  514.  
  515. <!-- Custom script for all pages --> 
  516. <script type="text/javascript" src="{{ asset('js/script.js') }}"></script>
  517.     
  518.  <!-- Wrapper End -->
  519. <script type="text/javascript" src="{{ asset('js/progressbar.js') }}"></script>
  520. <script>
  521.  
  522.  
  523.  
  524.     function onClickBtnLike(event) {
  525.     event.preventDefault();
  526.     const url = this.href;
  527.     const spanCount = this.querySelector('span.js-likes');
  528.     const icone = this.querySelector('i');
  529.     axios.get(url).then(function (response) {
  530.         spanCount.textContent = response.data.likes;
  531. if (response.status === 200){
  532.                if (icone.classList.contains('fas')) {
  533.             icone.classList.replace('fas','far');
  534.         }
  535.         else {
  536.             icone.classList.replace('far', 'fas');
  537.         }
  538.         
  539.         }
  540.  
  541.  
  542.     }).catch(function (error) {
  543.          
  544.     });
  545. }
  546. document.querySelectorAll('a.js-like').forEach(function (link){
  547.     link.addEventListener('click', onClickBtnLike)
  548. })
  549.         </script>
  550.   
  551.  {% if  type ==  1 %}
  552.   
  553. <script type="text/javascript">
  554.       var limit = 10
  555.       var offset = 0;
  556.  
  557.       function displayRecords(lim, off) {
  558.         $.ajax({
  559.           type: "GET",
  560.           async: false,
  561.           url: "/getrecords/{{ ville }}",
  562.           data: "limit=" + lim + "&offset=" + off,
  563.           cache: false,
  564.           beforeSend: function() {
  565.             $("#loader_message").html("").hide();
  566.             $('#loader_image').show();
  567.           },
  568.           success: function(html) {
  569.             $('#loader_image').hide();
  570.             $("#results").append(html);
  571.             if (html == "") {
  572.               $("#loader_message").html('<button data-atr="nodata" class="btn btn-default" type="button">Fin des résultas.</button>').show()
  573.             } else {
  574.               $("#loader_message").html('<button class="btn btn-default" type="button">Charger plus de données</button>').show();
  575.             }
  576.           }
  577.         });
  578.       }
  579.       $(document).ready(function() {
  580.         // start to load the first set of data
  581.         displayRecords(limit, offset);
  582.         $('#loader_message').click(function() {
  583.           // if it has no more records no need to fire ajax request
  584.           var d = $('#loader_message').find("button").attr("data-atr");
  585.           if (d != "nodata") {
  586.             offset = limit + offset;
  587.             displayRecords(limit, offset);
  588.           }
  589.         });
  590.       });
  591.     </script>
  592. {% else %}
  593. <script type="text/javascript">
  594. var busy = false;
  595. var limit = 15
  596. var offset = 0;
  597. function displayRecords(lim, off) {
  598.   $.ajax({
  599.     type: "GET",
  600.     async: false,
  601.     url: "/getrecords/{{ ville }}",
  602.     data: "limit=" + lim + "&offset=" + off,
  603.     cache: false,
  604.     beforeSend: function() {
  605.       $("#loader_message").html("").hide();
  606.       $('#loader_image').show();
  607.     },
  608.     success: function(html) {
  609.       $("#results").append(html);
  610.       $('#loader_image').hide();
  611.       if (html == "") {
  612.         $("#loader_message").html('<button data-atr="nodata" class="btn btn-default" type="button">Fin des résultas.</button>').show()
  613.       } else {
  614.         $("#loader_message").html('<button class="btn btn-default" type="button">Charger plus de données</button>').show();
  615.       }
  616.       window.busy = false;
  617.     }
  618.   });
  619. }
  620. $(document).ready(function() {
  621.   // start to load the first set of data
  622.   if (busy == false) {
  623.     busy = true;
  624.     // start to load the first set of data
  625.     displayRecords(limit, offset);
  626.   }
  627.   $(window).scroll(function() {
  628.     // make sure u give the container id of the data to be loaded in.
  629.     if ($(window).scrollTop() + $(window).height() > $("#results").height() && !busy) {
  630.       busy = true;
  631.       offset = limit + offset;
  632.       // this is optional just to delay the loading of data
  633.       setTimeout(function() { displayRecords(limit, offset); }, 500);
  634.       // you can remove the above code and can use directly this function
  635.       // displayRecords(limit, offset);
  636.     }
  637.   });
  638. });
  639. </script>
  640.  
  641.  
  642.  
  643. {% endif %}  
  644.  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  645. <script>
  646.  
  647.  
  648. 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">&times;</span></button></div>';
  649.     function onClickBtnLike(event) {
  650.     event.preventDefault();
  651.     const url = this.href;
  652.     const spanCount = this.querySelector('span.js-likes');
  653.     const icone = this.querySelector('i');
  654.     axios.get(url).then(function (response) {
  655.         spanCount.textContent = response.data.likes;
  656. if (response.status === 200){
  657.                if (icone.classList.contains('fas')) {
  658.             icone.classList.replace('fas','far');
  659.         }
  660.         else {
  661.             icone.classList.replace('far', 'fas');
  662.         }
  663.         
  664.         }
  665.  
  666.  
  667.     }).catch(function (error) {
  668.          
  669.     });
  670. }
  671. document.querySelectorAll('a.js-like').forEach(function (link){
  672.     link.addEventListener('click', onClickBtnLike)
  673. })
  674.         </script>
  675.    <script src="{{ asset('bootstrap/js/bootstrap.min.js') }}"></script>
  676. </body>
  677. </html>
  678.  
  679. {% endblock %}
  680.  
  681. {% block javascripts %}
  682.  
  683.   {{ include('recherche/js.html.twig') }}  
  684.  
  685. {% endblock %}