src/Aqarmap/Bundle/ListingBundle/Resources/views/Listing/listingDetailsList.html.twig line 1

  1. {% set PRIMARY_ID_CONST = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\MarketPropertyTypes::PRIMARY')%}
  2. {% set PRIMARY_LABEL_CONST = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\MarketPropertyTypes::PRIMARY_LABEL')%}
  3. {% set RESALE_LABEL_CONST = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\MarketPropertyTypes::RESALE_LABEL')%}
  4. {% set listing_attributes = listing.getAttributesList() %}
  5. {% set country = get_setting('general', 'country') %}
  6. {% set hasPaymentMethod = listing.paymentMethod and not isListingForRent %}
  7. {% set showPricePerMeter = listing.price and listing.area and not isListingForRent %}
  8. <div class="listing-info-container listing-details-item">
  9. <p class="section-title__header">
  10. {{ 'listing.listing_details'|trans }}
  11. </p>
  12. <ul class="list-group">
  13. {% if listing.area %}
  14. <li class="list-group-item d-flex ">
  15. <span class="col-md-3 col-5"> {{ 'listing.sizes'|trans }} </span>
  16. <span class="col-md-9 col-7">
  17. <span class="count badge badge-default">{{ listing.area|trans }} {{ get_setting('general', 'measurement_unit')|trans }}</span>
  18. </span>
  19. </li>
  20. {% endif %}
  21. {% if listing.attributes|length > 0 %}
  22. {% set listing_rooms = (listing_attributes["rooms"]) is defined ? getRoomsLabel(listing_attributes["rooms"]) : '' %}
  23. {% if listing_rooms %}
  24. <li class="list-group-item d-flex ">
  25. <span class="col-md-3 col-5"> {{ 'listing.rooms'|trans }} </span>
  26. <span class="col-md-9 col-7">
  27. <span class="count badge badge-default">{{ listing_rooms }}</span>
  28. </span>
  29. </li>
  30. {% endif %}
  31. {% set listing_baths = (listing_attributes["baths"]) is defined ? getRoomsLabel(listing_attributes["baths"]) : '' %}
  32. {% if listing_baths %}
  33. <li class="list-group-item d-flex ">
  34. <span class="col-md-3 col-5"> {{ 'listing.baths'|trans }}</span>
  35. <span class="col-md-9 col-7">
  36. <span class="count badge badge-default">{{ listing_baths }}</span>
  37. </span>
  38. </li>
  39. {% endif %}
  40. {% set listing_floor = (listing_attributes["floor"]) is defined ? getFloorLabel(listing_attributes["floor"])|trans : '' %}
  41. {% if listing_floor %}
  42. <li class="list-group-item d-flex ">
  43. <span class="col-md-3 col-5">{{ 'listing.floor'|trans }}</span>
  44. <span class="col-md-9 col-7">
  45. <span class="count badge badge-default">{{ listing_floor }}</span>
  46. </span>
  47. </li>
  48. {% endif %}
  49. {% set listing_finish_type = (listing_attributes["finish-type"]) is defined ? listing_attributes["finish-type"] : '' %}
  50. {% if listing_finish_type %}
  51. <li class="list-group-item d-flex ">
  52. <span class="col-md-3 col-5"> {{ 'listing.finish-type'|trans }}</span>
  53. <span class="col-md-9 col-7">
  54. <span class="count badge badge-default">{{ listing_finish_type|trans }}</span>
  55. </span>
  56. </li>
  57. {% endif %}
  58. {% if listing.propertyView %}
  59. <li class="list-group-item d-flex ">
  60. <span class="col-md-3 col-5"> {{ 'layout.property_view'|trans }} </span>
  61. <span class="col-md-9 col-7">
  62. <span class="count badge badge-default">{{ listing.propertyViewLabel|trans }}</span>
  63. </span>
  64. </li>
  65. {% endif %}
  66. {% set listing_year_built = (listing_attributes["year-built"]) is defined ? listing_attributes["year-built"] : '' %}
  67. {% set sectionId = listing.section.id %}
  68. {% if listing_year_built and sectionId != forRent %}
  69. <li class="list-group-item d-flex ">
  70. <span class="col-md-3 col-5"> {{ 'listing.year-built'|trans }} </span>
  71. <span class="col-md-9 col-7">
  72. <span class="count badge badge-default">{{ listing_year_built }}</span>
  73. </span>
  74. </li>
  75. {% endif %}
  76. {% endif %}
  77. <li class="list-group-item d-flex ">
  78. <span class="col-md-3 col-5"> {{ 'listing.listing_id'|trans }} </span>
  79. <span class="col-md-9 col-7">
  80. <span class="count badge badge-default">{{ get_setting('general', 'country') }}-{{ listing.id }}</span>
  81. </span>
  82. </li>
  83. {% if showPricePerMeter %}
  84. <li class="list-group-item d-flex ">
  85. <span class="col-md-3 col-5"> {{ 'listing.price_per_meter'|trans }} </span>
  86. <span class="col-md-9 col-7">
  87. {% set unitPricePerMeter = get_setting('general', 'currency')|trans ~ "/" ~ get_setting('general', 'measurement_unit')|trans %}
  88. <span class="count badge badge-default">{{ listing.calculatePricePerMeter|number_format }} {{ unitPricePerMeter }}</span>
  89. </span>
  90. </li>
  91. {% endif %}
  92. {% if hasPaymentMethod %}
  93. <li class="list-group-item d-flex ">
  94. <span class="col-md-3 col-5"> {{ 'layout.payment_method'|trans }} </span>
  95. <span class="col-md-9 col-7">
  96. <span class="count badge badge-default">{{ listing.paymentMethodLabel|trans }}</span>
  97. </span>
  98. </li>
  99. {% endif %}
  100. <li class="list-group-item d-flex ">
  101. <span class="col-md-3 col-5"> {{ 'listing.seller_role'|trans }} </span>
  102. <span class="col-md-9 col-7">
  103. <span class="count badge badge-default">{{ listing.sellerRoleLabel|trans }}</span>
  104. </span>
  105. </li>
  106. {% if isEligibleForMortgage %}
  107. {% set mortgageData = listing.eligibleForMortgageWithLabel %}
  108. {% set mortgageDataLength = mortgageData|length %}
  109. <li class="list-group-item d-flex ">
  110. <span class="col-md-3 col-5"> {{ 'listing.mortgage'|trans }} </span>
  111. <span class="col-md-9 col-7">
  112. <span class="count badge badge-default">
  113. {% for data in mortgageData %}
  114. {% set comma = mortgageDataLength > 1 and loop.index != mortgageDataLength ? "," : "" %}
  115. {{data.title|trans }}
  116. {{comma}}
  117. {% endfor %}
  118. </span>
  119. </span>
  120. </li>
  121. {% endif %}
  122. {% if listing.advertiserNumber and country == 'SA' %}
  123. <li class="list-group-item d-flex ">
  124. <span class="col-md-3 col-5"> {{ 'listing.advertiser_number'|trans }} </span>
  125. <span class="col-md-9 col-7">
  126. <span class="count badge badge-default">{{ listing.advertiserNumber }}</span>
  127. </span>
  128. </li>
  129. {% endif %}
  130. {% if listing.authorizationNumber and country == 'SA' %}
  131. <li class="list-group-item d-flex ">
  132. <span class="col-md-3 col-5"> {{ 'listing.authorization_number'|trans }} </span>
  133. <span class="col-md-9 col-7">
  134. <span class="count badge badge-default">{{ listing.authorizationNumber }}</span>
  135. </span>
  136. </li>
  137. {% endif %}
  138. {% if listing.marketPropertyType %}
  139. {% set typeInMarketLabel = listing.marketPropertyType == PRIMARY_ID_CONST ? 'listing.primary' : 'listing.resale'%}
  140. <li class="list-group-item d-flex ">
  141. <span class="col-md-3 col-5"> {{ 'listing.market_property_type'|trans }} </span>
  142. <span class="col-md-9 col-7">
  143. <span class="count badge badge-default">{{ typeInMarketLabel|trans }}</span>
  144. </span>
  145. </li>
  146. {% endif %}
  147. </ul>
  148. </div>