templates/Frontend/Properties/viewProperty.html.twig line 1

Open in your IDE?
  1. {% extends 'Frontend/_templates/default.html.twig' %}
  2. {% block page_title %}{{ property.address2 }}, Property #{{ property.reference }}{% endblock %}
  3. {% block meta_tags %}
  4. {% endblock %}
  5. {% block content %}
  6.     <div class="block-heading">
  7.         <div class="container">
  8.             <h1>{{ property.address2 }}, {{ property.area.name }}</h1>
  9.             <p class="sub-title">
  10.                 Property reference: #{{ property.reference }}
  11.             </p>
  12.         </div>
  13.     </div>
  14.     <div class="block-viewproperty">
  15.         <div class="container">
  16.             <div class="large-gallery mb-5" id="property-large-images">
  17.                 <div class="arrows">
  18.                     <a href="" class="prev-image"><i class="fas fa-angle-left"></i></a>
  19.                     <a href="" class="next-image"><i class="fas fa-angle-right"></i></a>
  20.                 </div>
  21.                 {% for imageKey,someImage in images %}
  22.                     <img src="{{ file_helper.thumbnail('data/' ~ someImage.filename, 1300, 760, null, true) }}" alt="" data-image-id="{{ imageKey }}" class="large-property-image {{ loop.first ? 'd-block' : 'd-none' }}"/>
  23.                 {% endfor %}
  24.                 <div class="bottom">
  25.                     <div class="section">
  26.                         {% if property.listingType == "letting" %}
  27.                             <span class="price">{{ (property.rentalPrice / 10)|format_currency('GBP', {fraction_digit: 0}) }}</span>
  28.                             <span class="frequency">/{{ property.rentFrequency|short_rental_frequency }}</span>
  29.                         {% elseif property.listingType == "sale" %}
  30.                             <span class="price">{{ (property.salePrice / 10)|format_currency('GBP', {fraction_digit: 0}) }}</span>
  31.                         {% endif %}
  32.                     </div>
  33.                     <div class="section">
  34.                         {% if property.dateAvailable and property.dateAvailable > "today"|date %}
  35.                             <span class="availability">Available {{ property.dateAvailable|date('M') }}</span>
  36.                         {% else %}
  37.                             <span class="availability">Available Now</span>
  38.                         {% endif %}
  39.                     </div>
  40.                     <div class="section section-btn">
  41.                         <a href="{{ path('frontend_properties_propertyenquiry', {property_reference: property.reference}) }}" class="btn btn-primary">Make Enquiry</a>
  42.                     </div>
  43.                 </div>
  44.             </div>
  45.         </div>
  46.         <div class="property-desc mb-5">
  47.             <div class="container">
  48.                 <h3>About This Property</h3>
  49.                 <p class="m-0">{{ property.description|raw|nl2br }}</p>
  50.             </div>
  51.         </div>
  52.         <div class="features mb-5">
  53.             <div class="container">
  54.                 <div class="row">
  55.                     <div class="col-md-6 col-lg-3">
  56.                         <div class="feature mb-2">
  57.                             <i class="fas fa-bed"></i>
  58.                             <span class="title">{{ property.bedrooms }} Bedrooms</span>
  59.                         </div>
  60.                     </div>
  61.                     <div class="col-md-6 col-lg-3">
  62.                         <div class="feature mb-2">
  63.                             <i class="fas fa-bath"></i>
  64.                             <span class="title">{{ property.bathrooms }} Bathrooms</span>
  65.                         </div>
  66.                     </div>
  67.                     <div class="col-md-6 col-lg-3">
  68.                         <div class="feature mb-2">
  69.                             <i class="fas fa-couch"></i>
  70.                             {% if features|filter((f) => f.name == "Furnished") is not empty %}
  71.                                 <span class="title">Furnished</span>
  72.                             {% else %}
  73.                                 <span class="title">Unfurnished</span>
  74.                             {% endif %}
  75.                         </div>
  76.                     </div>
  77.                     <div class="col-md-6 col-lg-3">
  78.                         <div class="feature mb-2">
  79.                             <i class="far fa-calendar"></i>
  80.                             {% if property.dateAvailable and property.dateAvailable > "today"|date %}
  81.                                 <span class="title">Available {{ property.dateAvailable|date('F') }}</span>
  82.                             {% else %}
  83.                                 <span class="title">Available Now</span>
  84.                             {% endif %}
  85.                         </div>
  86.                     </div>
  87.                 </div>
  88.             </div>
  89.         </div>
  90.         <div class="mb-5 text-center">
  91.             <a href="{{ path('frontend_properties_propertyenquiry', {property_reference: property.reference}) }}" class="btn btn-primary btn-lg"><i class="fas fa-info-circle"></i> Make an Enquiry</a>
  92.             <!--<a href="" class="btn btn-dark btn-lg"><i class="fas fa-star"></i> Add to Favorites</a>-->
  93.         </div>
  94.         {% if features is not empty %}
  95.             <div class="features-list mb-5">
  96.                 <div class="container">
  97.                     <h3>Property Features</h3>
  98.                     <ul class="features mb-0 pb-0">
  99.                         {% for someFeature in features %}
  100.                             <li>{{ someFeature.name }}</li>
  101.                         {% endfor %}
  102.                         {% if property.epcUrl %}
  103.                             <li><a href="{{ property.epcUrl }}" rel="nofollow" target="_blank">View EPC details</a></li>
  104.                         {% endif %}
  105.                     </ul>
  106.                 </div>
  107.             </div>
  108.         {% endif %}
  109.         {% if property.latitude and property.longitude %}
  110.             <div id="property-detail-map" data-latitude="{{ property.latitude }}" data-longitude="{{ property.longitude }}" data-google-key="AIzaSyB4ITylLvMZNbqEMuUhtxXIZIRAc70vWXY"></div>
  111.         {% endif %}
  112.     </div>
  113.     {% if similarProperties is not empty %}
  114.         <div class="block-propertylist pt-0">
  115.             <div class="container">
  116.                 <h2>Similar Properties</h2>
  117.                 {% include "Frontend/Properties/_inc/propertyGrid.html.twig" with {properties: similarProperties} %}
  118.             </div>
  119.         </div>
  120.     {% endif %}
  121. {% endblock %}