templates/index/properties1.html.twig line 1

Open in your IDE?
  1.      <!-- Feature Properties -->
  2.     <section id="feature-property" class="feature-property bgc-f7">
  3.         <div class="container">
  4.             <div class="row">
  5.                 <div class="col-lg-12">
  6.                     <a href="#feature-property">
  7.                         <div class="mouse_scroll">
  8.                             <div class="icon">
  9.                                 <h4>Scroll Down</h4>
  10.                                 <p>to discover more</p>
  11.                             </div>
  12.                             <div class="thumb">
  13.                                 <img src="images/resource/mouse.png" alt="mouse.png">
  14.                             </div>
  15.                         </div>
  16.                     </a>
  17.                 </div>
  18.             </div>
  19.         </div>
  20.         <div class="container ovh">
  21.             <div class="row">
  22.                 <div class="col-lg-6 offset-lg-3">
  23.                     <div class="main-title text-center mb40">
  24.                         <h2>Featured Properties</h2>
  25.                         <p>Handpicked properties by our team.</p>
  26.                     </div>
  27.                 </div>
  28.                 <div class="col-lg-12">
  29.                     <div class="feature_property_slider">
  30.  {% set annoncevue = 0  %}
  31.      {% set nbr =   0  %}
  32.        {% for propositions in propositions %}
  33.   {% set nbr =   nbr + 1  %}
  34.  
  35. {% for visiteurs in visiteurs %}
  36.   
  37. {% if visiteurs.annonce.id == propositions.id %}   {% set annoncevue = 1  %}   {% endif %}
  38.  
  39. {% endfor %} 
  40.        
  41.  
  42.                         <div class="item">
  43.                             <div class="feat_property">
  44.                                 <div class="thumb">
  45.                                     <img  {% if annoncevue == '0' %} class="img-whp"{% else %}style="width: 100% !important; filter: opacity(0.5)"{% endif %} src="{{ asset('https://{{propositions.domaine}}/uploads/' ~ propositions.image) | imagine_filter('mini') }}" alt="fp1.jpg">
  46.                                     <div class="thmb_cntnt">
  47.                                     
  48.                                         <ul class="tag mb0">
  49.                                             <li class="list-inline-item"><a href="#">For Rent</a></li>
  50.                                             <li class="list-inline-item"><a href="#">Featured</a></li>
  51.                                         </ul>
  52.                                         <ul class="icon mb0">
  53.                                             <li class="list-inline-item"><a href="#null" onclick="javascript:open_infos{{ nbr }}();"><span class="flaticon-share"></span></a></li>
  54.                                             <li class="list-inline-item"><a href="{{ path('post_like', {'id':propositions.id})}}"  class="js-like">
  55.                                              
  56.                                                   {% set like = 0  %}  
  57.                           {% for post in post %}
  58.   
  59. {% if post.annonce.id == propositions.id %}   {% set like = 1  %}   {% endif %}
  60.  
  61.     {% endfor %} 
  62.                                               {% if like == '1' %}  {{ propositions.Postlikes | length }}  <span class="flaticon-heart"style="color: red;"></span>
  63.  
  64.                                               {% else %}
  65.                                            
  66.                              {{ propositions.Postlikes | length }}  <span class="flaticon-heart"></span>
  67.                                               {% endif %}
  68.                                              
  69.                                             </a></li>
  70.                                         </ul>
  71.                                         <a class="fp_price" href="#">{{  propositions.prix }} €
  72.                                         {% if propositions.transaction == 2 %} 
  73.                                         <small>/mo</small>
  74.                                         {% endif %}
  75.                                         </a>
  76.                                     </div>
  77.                                 </div>
  78.                                 <a href="logement/{{ propositions.slug }}">
  79.                                 <div class="details">
  80.                                     <div class="tc_content">
  81.                                         <p class="text-thm">
  82.                                     {% if propositions.logement == 0 %} 
  83.                                         Maison
  84.                                         {% endif %}
  85.                                        {% if propositions.logement == 1 %} 
  86.                                         Appartement 
  87.                                         {% endif %}
  88.                                         
  89.                                         
  90.                                         </p>
  91.                                         <h4 {% if annoncevue == '1' %} 
  92.                                             style="color:#C0C0C0; "
  93.                                             {% endif %}>{{  propositions.titre }} </h4>
  94.                                         <p><span class="flaticon-placeholder"></span> 1421 San Pedro St, Los Angeles, CA 90015</p>
  95.                                         <ul class="prop_details mb0">
  96.                                             <li class="list-inline-item"><a href="#">Beds: 4</a></li>
  97.                                             <li class="list-inline-item"><a href="#">Baths: 2</a></li>
  98.                                             <li class="list-inline-item"><a href="#">Sq Ft: 5280</a></li>
  99.                                         </ul>
  100.                                     </div>
  101.                                     </a>
  102.                                     <div class="fp_footer">
  103.                                         <ul class="fp_meta float-left mb0">
  104.                                             {% set profil =   0  %}
  105.         {% if propositions.agence == true %} 
  106.                             
  107.  {% set profil =   1  %}
  108.                                             <li class="list-inline-item"><a href="/profil/profil/agence/{{ propositions.agence.id }}"><img src="
  109.                                             
  110. {% if propositions.agence.image == true %} 
  111.   {{ asset('uploads/' ~ propositions.agence.image) | imagine_filter('profilmini') }}
  112.   {% else %}
  113. images/property/pposter1.png
  114. {% endif %}
  115.                                             
  116.                                             
  117.                                             " alt="pposter1.png"></a></li>
  118.                                             <li class="list-inline-item">
  119.                                             <a href="/profil/profil/agence/{{ propositions.agence.id }}"> 
  120.                                             {{  propositions.agence.nom }} 
  121.                                             </a>
  122.                                         {% endif %}
  123.         {% if propositions.hotel == true %}     
  124.  {% set profil =   1  %}
  125.                                             <li class="list-inline-item"><a href="/profil/profil/hotel/{{ propositions.hotel.id }}"><img src="
  126.                                             {% if propositions.hotel.image == true %} 
  127.                                               {{ asset('uploads/' ~ propositions.hotel.image) | imagine_filter('profilmini') }}
  128.   {% else %}
  129. images/property/pposter1.png
  130. {% endif %}
  131.                                             
  132.                                             " alt="pposter1.png"></a></li>
  133.                                             <li class="list-inline-item">
  134.                                             <a href="/profil/profil/hotel/{{ propositions.hotel.id }}"> 
  135.                                             {{  propositions.hotel.nom }} 
  136.                                             </a>
  137.                                         {% endif %}
  138.                                                 {% if profil == 0 %} 
  139.                      
  140.                                             <li class="list-inline-item"><a href="/profil/profil/profil/{{ propositions.user.id }}"><img src="
  141.                                             {% if propositions.user.image == true %} 
  142.    {{ asset('uploads/' ~ propositions.user.image) | imagine_filter('profilmini') }}
  143.   {% else %}
  144. images/property/pposter1.png
  145. {% endif %}
  146.                                             " alt="pposter1.png"></a></li>
  147.                                             <li class="list-inline-item">
  148.                                             <a href="/profil/profil/profil/{{ propositions.user.id }}"> 
  149.                                             {{  propositions.user.nom }} 
  150.                                             </a>
  151.                                         {% endif %}
  152.                                         
  153.                                             
  154.                                             </li>
  155.                                         </ul>
  156.                                         <div class="fp_pdate float-right"> 
  157. {% set difference = date(date(date)).diff(date(propositions.createdAt|date)) %}
  158. {% set leftDays = difference.days %}
  159.  
  160.  {% if leftDays == '0' %} 
  161. Publier aujourd'hui
  162. {% else %}
  163.  {% if leftDays == '1' %} 
  164. Publier hier
  165. {% else %}
  166. Il y a {{ leftDays }} jours. 
  167.   {% endif %}
  168.   {% endif %}
  169.  </div>
  170.                                     </div>
  171.                                 </div>
  172.                             </div>
  173.                         </div>
  174.     {% endfor %}
  175.                     </div>
  176.                 </div>
  177.             </div>
  178.         </div>
  179.     </section>
  180.      {% set nbr =   0  %}
  181.        {% for propositions in propositions %}
  182.   {% set nbr =   nbr + 1  %}
  183.  <script type="text/javascript">
  184.                 <!--
  185.                         function open_infos{{ nbr }}()
  186.                         {
  187.                                 width = 300;
  188.                                 height = 200;
  189.                                 if(window.innerWidth)
  190.                                 {
  191.                                         var left = (window.innerWidth-width)/2;
  192.                                         var top = (window.innerHeight-height)/2;
  193.                                 }
  194.                                 else
  195.                                 {
  196.                                         var left = (document.body.clientWidth-width)/2;
  197.                                         var top = (document.body.clientHeight-height)/2;
  198.                                 }
  199.                                window.open('/partage/{{ propositions.slug }} ','nom_de_ma_popup','menubar=no, scrollbars=no, top='+top+', left='+left+', width='+width+', height='+height+'');
  200.                         }
  201.                 -->
  202.                 </script>
  203.     {% endfor %}