templates/logement/index.html.twig line 1

Open in your IDE?
  1.  
  2. {% extends 'base.html.twig' %}
  3. {% block title %}Hello IndexController!{% endblock %}
  4. {% block stylesheets %}
  5.   <link href="{{ asset('theme/css/t-datepicker.min.css') }}" rel="stylesheet" type="text/css">
  6.   <link href="{{ asset('theme/css/themes/t-datepicker-blue.css') }}" rel="stylesheet" type="text/css">
  7. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>     
  8.    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.8.0/dist/leaflet.css" integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ==" crossorigin=""/>
  9.     <script src="https://unpkg.com/leaflet@1.8.0/dist/leaflet.js" integrity="sha512-BB3hKbKWOc9Ez/TAwyWxNXeoV9c1v6FIeYiBieIWkpLjauysF18NzgR1MBNBXf8/KABdlkX68nAhlwcDFLGPCQ==" crossorigin=""></script>
  10.     <style>
  11.         html, body {
  12.             height: 100%;
  13.             margin: 0;
  14.         }
  15.         .leaflet-container {
  16.             height: 400px;
  17.             width: 600px;
  18.             max-width: 100%;
  19.             max-height: 100%;
  20.         }
  21.     </style>
  22.     
  23. {% endblock %}
  24. {% block modal %}
  25.     {{ include('logement/modal.html.twig') }}
  26.  
  27. {% endblock %}
  28. {% block nav %}
  29.     <header class="header-nav menu_style_home_one style2 navbar-scrolltofixed stricky main-menu">
  30.  
  31. {% endblock %}
  32.   {% block logo %}
  33.                   {{ include('include/logopage.html.twig') }} 
  34. {% endblock %}
  35.  
  36.  
  37. {% block body %}
  38. {{ include('modele/modele.html.twig') }}   
  39. {{ include('logement/equipement.html.twig') }}   
  40. <div class="col-lg-12">
  41.                             <div class="property_attachment_area">
  42.                                 <h4 class="mb30">GPE</h4>
  43.                                 
  44.                                                                  {% if   annonce.ges !=  0 %}
  45. {{ include('widget/dpe.html.twig') }}   
  46.  {% else %} 
  47. <h4 class="mb30">GES non renseigner</h4>
  48.  {% endif %} 
  49.                             </div>
  50.                         </div>
  51.                         <div class="col-lg-12">
  52.                             <div class="property_attachment_area">
  53.                                 <h4 class="mb30">Property Attachments</h4>
  54.                                  {% if   annonce.ges !=  0 %}
  55. {{ include('widget/ges.html.twig') }}   
  56.  {% else %} 
  57. <h4 class="mb30">GES non renseigner</h4>
  58.  {% endif %} 
  59.                             </div>
  60.                         </div>
  61.  
  62.  
  63. {{ include('widget/proxi.html.twig') }}   
  64.          
  65.                         
  66.                                        
  67. {{ include('widget/map.html.twig') }}   
  68.                
  69.  
  70.  
  71. {{ include('logement/form.html.twig') }}   
  72.  
  73.                          {% if annonce.commentairesLogements | length != 0 %}
  74. {{ include('logement/commantaires.html.twig') }}   
  75.   {% endif %}                
  76. {{ include('logement/propositions.html.twig') }}   
  77.  
  78.                     </div>
  79.                 </div>
  80.  
  81. {{ include('widget/menu.html.twig') }}   
  82.     </section>
  83.  
  84. {% endblock %}
  85. {% block jsindex %}
  86.  
  87.               <script src="https://code.jquery.com/jquery-3.3.1.min.js"
  88.     integrity="sha384-tsQFqpEReu7ZLhBV2VZlAu7zcOV+rXbYlF2cqB8txI/8aZajjp4Bqd+V6D5IgvKT"
  89.     crossorigin="anonymous"></script>
  90. {% endblock %}
  91. {% block javascripts %}
  92.  
  93.  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  94. <script>
  95.  
  96.  
  97. 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>';
  98.     function onClickBtnLike(event) {
  99.     event.preventDefault();
  100.     const url = this.href;
  101.     const spanCount = this.querySelector('span.js-likes');
  102.     const icone = this.querySelector('i');
  103.     axios.get(url).then(function (response) {
  104.         spanCount.textContent = response.data.likes;
  105. if (response.status === 200){
  106.                if (icone.classList.contains('fas')) {
  107.             icone.classList.replace('fas','far');
  108.         }
  109.         else {
  110.             icone.classList.replace('far', 'fas');
  111.         }
  112.         
  113.         }
  114.  
  115.  
  116.     }).catch(function (error) {
  117.          
  118.     });
  119. }
  120. document.querySelectorAll('a.js-like').forEach(function (link){
  121.     link.addEventListener('click', onClickBtnLike)
  122. })
  123.         </script>
  124.  
  125.  
  126. {% endblock %}