templates/Frontend/Properties/_inc/propertyGrid.html.twig line 1

Open in your IDE?
  1. {% set cols = opt|default({
  2.     cols: 3
  3. }).cols %}
  4. <div class="row">
  5.     {% for propIndex,someProperty in properties %}
  6.         <div class="col-12 col-md-6 col-lg-4 col-xl-{{ 12 / cols }}">
  7.             <div class="property">
  8.                 <a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="image"><img src="{{ file_helper.thumbnail((someProperty.featuredImage ? 'data/' ~ someProperty.featuredImage.filename : '.' ~ asset('data/placeholder.png')), 750, 750) }}" alt=""/></a>
  9.                 {% if someProperty.cornerBanner %}
  10.                     <img src="{{ asset('build/images/' ~ someProperty.cornerBanner) }}" class="corner-banner" alt=""/>
  11.                 {% endif %}
  12.                 <div class="detail">
  13.                     <span class="area">{{ someProperty.area.name }}, {{ someProperty.postcode }}</span>
  14.                     <a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="title">{{ someProperty.address2 }}</a>
  15.                     <div class="row mt-3">
  16.                         <div class="col-4">
  17.                             <div class="spec">
  18.                                 <i class="fas fa-bed"></i>
  19.                                 <span>{{ someProperty.bedrooms }} Beds</span>
  20.                             </div>
  21.                         </div>
  22.                         <div class="col-4">
  23.                             <div class="spec">
  24.                                 <i class="fas fa-bath"></i>
  25.                                 <span>{{ someProperty.bathrooms }} Bathrooms</span>
  26.                             </div>
  27.                         </div>
  28.                         <div class="col-4">
  29.                             <div class="spec">
  30.                                 <i class="far fa-calendar"></i>
  31.                                 {% if someProperty.dateAvailable and someProperty.dateAvailable > "today"|date %}
  32.                                     <span class="availability">Available {{ someProperty.dateAvailable|date('M') }}</span>
  33.                                 {% else %}
  34.                                     <span>Available Now</span>
  35.                                 {% endif %}
  36.                             </div>
  37.                         </div>
  38.                     </div>
  39.                 </div>
  40.                 <div class="bottom">
  41.                     <div class="row">
  42.                         <div class="col-6">
  43.                             {% if someProperty.listingType == "letting" %}
  44.                                 <a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="btn btn-lg btn-outline-secondary w-100"><strong>{{ (someProperty.rentalPrice / 10)|format_currency('GBP', {fraction_digit: 0}) }}</strong> <small>/{{ someProperty.rentFrequency|short_rental_frequency }}</small></a>
  45.                             {% else %}
  46.                                 <a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="btn btn-lg btn-outline-secondary w-100"><strong>{{ (someProperty.salePrice / 10)|format_currency('GBP', {fraction_digit: 0}) }}</strong></a>
  47.                             {% endif %}
  48.                         </div>
  49.                         <div class="col-6">
  50.                             <a href="{{ path('frontend_properties_viewproperty', {property_reference: someProperty.reference}) }}" class="btn btn-lg btn-dark w-100">View Details</a>
  51.                         </div>
  52.                     </div>
  53.                 </div>
  54.             </div>
  55.         </div>
  56.     {% endfor %}
  57. </div>