src/Aqarmap/Bundle/ListingBundle/Resources/views/ListingSearch/listingCardVertical.html.twig line 1
{# Constants #}{% set FIRST_LISTING_FOR_FREE_LISTING_CATEGORY = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingCategories::FIRST_LISTING_FOR_FREE') %}{% set EBAWAB_LISTING_CATEGORY = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingCategories::EBAWAB') %}{% set UNLIMITED_LISTING_CATEGORY = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingCategories::UNLIMITED') %}{% set PAID_LISTING_CATEGORY = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingCategories::PAID') %}{% set PROJECT_LISTING_CATEGORY = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingCategories::PROJECTS') %}{% set SCRAPPED_LISTING_CATEGORY = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingCategories::SCRAPPED') %}{% set SPONSORED_TYPE = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingFeaturedTypes::SPONSORED') %}{% set FEATURE_TYPE = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingFeaturedTypes::FEATURED') %}{% set PREMIUM_CONSTANT = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingFeaturedTypes::PREMIUM') %}{% set SPOTLIGHT_CONSTANT = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingFeaturedTypes::SPOTLIGHT') %}{% set SOLD_BY_OWNER_TYPE = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingFeaturedTypes::SOLD_BY_OWNER') %}{% set SOLD_BY_OWNER_SPONSORED_TYPE = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingFeaturedTypes::SOLD_BY_OWNER_SPONSORED') %}{% set SCRAPPED_LISTING_CATEGORY = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingCategories::SCRAPPED') %}{% set SHOW_PHONE_CONSTANT = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\LeadTypes::SHOW_PHONE') %}{% set SEND_WHATSAPP_CONSTANT = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\LeadTypes::WHATSAPP') %}{% set CALL_REQUEST_CONSTANT = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\LeadTypes::CALL_REQUEST') %}{% set TOP_VIEWED_CONST = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingLabel::TOP_VIEWED') %}{% set TOP_FAVOURITAED_CONST = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingLabel::TOP_FAVORITE') %}{% set VALID_PRICE_CONST = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\ListingLabel::VALID_PRICE') %}{# Toggles #}{% set isEnabledSearchResultsActivity = (isEnabledFeature('web.activity.app') and isEnabledFeature('web.search.results.activities')) %}{% set isTopCustomerListingsPage = app.request.attributes.get('_route') == 'aqarmap_user_listings' %}{% set hideCtaButtons = hideCta is defined and hideCta %}{% set isCtaButtonsEnabled = isEnabledFeature('listing_card.lead.button') and not hideCtaButtons %}{% set showCtaButtons = isCtaButtonsEnabled %}{% set isEnabledElasticScoringDebug = elasticScoringDebug is defined and elasticScoringDebug and app.request.get('esdebug') %}{# inFeed #}{% set inFeedAdAppearance = 6 %}{% set isInFeedAdAappeared = false %}{% set scrappedUserName = "Aqarmap" %}{# user logo macro #}{% macro userLogo(imgLink, disableLazyLoadImgIndex, listingUserPhotoSize, listingId, classList = "") %}<div class="search-listing-card__logo {{ classList }}"><img{% if disableLazyLoadImgIndex %}src="{{ imgLink }}"{% else %}class="lazyload"src=""data-src="{{ imgLink }}"{% endif %}width="{{ listingUserPhotoSize }}"height="{{ listingUserPhotoSize }}"alt="user-logo-{{ listingId }}"fetchpriority="low"></div>{% endmacro %}{% for listing in listings %}{% if agent is defined %}{% set listing = listing['listing'] %}{% endif %}{# Listing Toggles #}{% set isCompoundSearchResultsCard = isCompoundSearchResults is defined ? isCompoundSearchResults : false %}{% set isVerified = ((listing.featured == SPONSORED_TYPE) or (listing.featured == SPOTLIGHT_CONSTANT)) and isEnabledFeature('web.show.verified.sign') %}{% set isEligibleForMortgage = isEnabledFeature('web.mortgage.options') and listing.isMortgageApproved %}{% set isSponsoredCard = loop.index == 1 and not topSellersResults and not isRelatedResults and (listing.featured == SPONSORED_TYPE or listing.featured == SOLD_BY_OWNER_SPONSORED_TYPE) %}{% set isListingPhotosDefined = listingPhotos[listing.id] is defined and listingPhotos[listing.id].main is defined %}{% set isListingLogoDefined = listingPhotos[listing.id] is defined and listingPhotos[listing.id].logo is defined %}{% set disableLazyLoadImgIndex = loop.index in [1, 2] %}{% set searchedByOneLocation = isSearchedByOneLocation is defined and isSearchedByOneLocation %}{% if not isCompoundSearchResultsCard %}{% set isPricesWidgetListingTypes = not defaultResults and not topSellersResults and searchedByOneLocation %}{% set mobileFeedadsScreenLocation = loop.index == inFeedAdAppearance %}{% set isMobileFeedadsToggledOn = isEnabledFeature('web.search.mobile.feedads') and isMobile and isUXVersion %}{% set isFeedAdsWithinListingTypes = not defaultResults and not isInFeedAdAappeared %}{% set showMobileFeedads = isMobileFeedadsToggledOn and isFeedAdsWithinListingTypes and mobileFeedadsScreenLocation %}{% endif %}{# Listing Vars #}{% set listingCategory = listing.category %}{% set urlSource = app.request.query.get("source") ? app.request.query.get("source") : ''%}{% set containerSource = source is defined ? source : null %}{% set leadSources = containerSource ? [containerSource] : [urlSource] %}{% set financeFeatureValue = get_setting('features', 'finance_service') %}{% set isRelatedToMainListing = isRelatedToListing is defined ? isRelatedToListing : false %}{% set mainListingObj = (isRelatedToMainListing and mainListing is defined) ? mainListing : {} %}{% if isEnabledFeature('listing_card.lead.button') %}{% set listingPhones = isEnabledFeature('listing_user_phones') ? listing.phones : listing.listingPhones %}{% else %}{% set listingPhones = [] %}{% endif %}{% set listingPhone = null %}{% if listingPhones is not empty %}{% set listingPhone = listingPhones|first %}{% endif %}{% if listing.slug %}{% set LISTING_URL = isRelatedResults ? path("listing_slug", {id: listing.id, slug: listing.slug}|merge({'relatedseaarchlisting': true})) : path("listing_slug", {id: listing.id, slug: listing.slug}) %}{% else %}{% set LISTING_URL = isRelatedResults ? path('listing_view', {'id': listing.id}|merge({'relatedseaarchlisting': true})) : path('listing_view', {'id': listing.id}) %}{% endif %}{% if isRelatedToMainListing %}{% set LISTING_URL = LISTING_URL ~ '?source=listing-related' %}{% endif %}{% set relatedListingAnalytics = isRelatedResults ? 'gtm-btn-related-result-listing-click' : '' %}{% set relatedListingClass = isRelatedResults ? 'related-listing__card' : '' %}{% set searchListingCardClass = isTopPicksResults is defined and isTopPicksResults ? 'search-listing-card top-picks-card' : 'search-listing-card search-listing-card_mb-xl' %}{% set listingEvents = [{'isFired':isVerified , 'trigger': 'gtm-btn-verified-listing-click' }] %}{% set listingPhotoSize = 110 %}{% set iconSize = 24 %}{% set listingUserPhotoSize = 32 %}{% set neighborhoodAppearance = 9 %}{% set isExcludeWhatsappFromListing = isEnabledFeature('web.whatsapp.chat.exclude') and listing.getIsExcludedFromWhatsApp %}{% set acceptedWhatsAppFeature = not isExcludeWhatsappFromListing or not isEnabledFeature('web.whatsapp.chat.exclude') %}{% set isEnabledSendByWhatsapp = isEnabledFeature('web.whats.app.chat') and acceptedWhatsAppFeature %}{% if isEnabledSendByWhatsapp %}{% if (listing.user.getWhatsAppNumber) %}{% set whatsAppNumber = listing.user.getWhatsAppNumber.getPhone.getNumber %}{% endif %}{% set hasWhatsapp = listing.user.getWhatsAppNumber %}{% else %}{% set hasWhatsapp = false %}{% endif %}{% set callBtnClass = not hasWhatsapp ? 'big': '' %}{% set callBtnText = not hasWhatsapp ? 'listing.show_seller_phone'|trans : "" %}{% set isProject = listingCategory == PROJECT_LISTING_CATEGORY %}{% set projectListingChild = listing.parent != null %}{% set notProjectListing = not isProject and not projectListingChild %}{% set strictQuickRegistration = get_setting('features', 'strict_to_quick_registration') %}{% set autoShowPhone = not strictQuickRegistration and notProjectListing %}{% set isSoldByOwnerType = listing.featured == SOLD_BY_OWNER_TYPE or listing.featured == SOLD_BY_OWNER_SPONSORED_TYPE %}{% set listing_attributes = listing.getAttributesList() %}{% set listing_rooms = (listing_attributes["rooms"]) is defined ? getRoomsLabel(listing_attributes["rooms"]) : '' %}{% set listing_baths = (listing_attributes["baths"]) is defined ? getBathsLabel(listing_attributes["baths"]) : '' %}{% set backgroundClass = 'listing-phone-container_bg-white listing-phone-container_number-gray'%}{% set cardGridSize = cardGridSize is defined ? cardGridSize : 'col-sm-6 col-12' %}{% set showPhotosCount = disablePhotosCount is not defined or not disablePhotosCount %}{% set sellerName = '' %}{% set listingUser = listing.user %}{% set sellerName = listingUser.fullName %}{% set userLogo = listingUser.logo ? listingUser.logo.file : null %}{% set logo = listing.validUserLogo %}{% set sellerLogo = logo ? logo : userLogo %}{% set sellerUrl = path('aqarmap_user_listings', {'id': listingUser.id})%}{% set joinedData = listingUser.createdAt|date('Y')%}{% set activeListingsCount = liveListingsPerUser[listing.user.id] is defined ? liveListingsPerUser[listing.user.id] : 0 %}{% set leadsCount = listingUser.getClientServedCount() %}{% set encodedSellerPhones = []%}{% for phone in listingPhones %}{% set encodedSellerPhones = encodedSellerPhones | merge([{'number': phone.number|phoneNumberEncode}]) %}{% endfor %}{% set listingLabelType = listing.label %}{% set isListingTopPicks = listing.isTopPicks %}{% set allowListingLabel = isSearchResultsPage and not isListingTopPicks %}{% set isTopFavourited = listingLabelType == TOP_FAVOURITAED_CONST %}{% set isValidPrice = listingLabelType == VALID_PRICE_CONST %}{% set isTopViewed = listingLabelType == TOP_VIEWED_CONST %}{% set labelLeadSource = '' %}{% if isTopFavourited %}{% set labelLeadSource = 'top-favourite' %}{% set leadSources = leadSources|merge([labelLeadSource]) %}{% elseif isValidPrice %}{% set labelLeadSource = 'valid-price' %}{% set leadSources = leadSources|merge([labelLeadSource]) %}{% elseif isTopViewed %}{% set labelLeadSource = 'top-viewed' %}{% set leadSources = leadSources|merge([labelLeadSource]) %}{% endif %}{% set listingPrice = listing.price ?? null %}{% set listingFeatured = listing.featured %}{% set isSpotLight = listingFeatured == SPOTLIGHT_CONSTANT %}{% set isSponserd = listingFeatured == SPONSORED_TYPE %}{% set isPremium = listingFeatured == PREMIUM_CONSTANT %}{% set isFeatured = listingFeatured == FEATURE_TYPE %}{% set isPaid = listingCategory == PAID_LISTING_CATEGORY %}{% set isScrapped = listingCategory == SCRAPPED_LISTING_CATEGORY %}{% set isEBawab = listingCategory == EBAWAB_LISTING_CATEGORY %}{% set isUnlimited = listingCategory == UNLIMITED_LISTING_CATEGORY %}{% set isFlf2 = listingCategory == FIRST_LISTING_FOR_FREE_LISTING_CATEGORY %}{# Compounds Listing Vars #}{% if isCompoundSearchResultsCard %}{% set compoundAveragePrices = listing.compoundAveragePrices is defined ? listing.compoundAveragePrices : [] %}{% set isCompoundAveragePrices = compoundAveragePrices is not empty %}{% set showCompoundAveragePrices = false %}{% set compoundField = listing.CompoundField ? listing.CompoundField :{} %}{% set isEnabledDdeveloperCardData = isCompoundSearchResultsCard and isEnabledFeature('web.developer.card.data') %}{% set isCompoundPlannerPage = isCompoundPlanner is defined and isCompoundPlanner %}{% set compoundPrice = listing.CompoundField ? listing.CompoundField.minPrice : null %}{% set listingPrice = compoundPrice ?? listingPrice %}{% endif %}{# gtm events variables #}{% set leadSourcePage = leadSourcePage is defined ? leadSourcePage : "search_results"%}{% set propertySectionSlug = isProject ? "projects" : section is defined ? section.slug: listing.section.slug %}{% set propertyCategory = isProject ? "projects" : isScrapped ? "scrapped" :isPaid ? "paid" : isEBawab ? "bawab" : isUnlimited ? "unlimited" :isFlf2 ? "flf2" : "free" %}{% set depthProduct = isFeatured ? "featured" : isPremium ? "premium" :isSponserd ? "sponsored": isSpotLight ? "spotlight" : "regular" %}{% set insideCompound = isProject or listing.parent != null %}<div id="{{listing.id}}" class="{{ cardGridSize }} {{relatedListingClass}} {{searchListingCardClass}}"ng-init='setSourceRoute("{{ app.request.attributes.get('_route') }}");'itemscope itemtype="https://schema.org/SingleFamilyResidence"><div class="search-listing-card__container" ng-content-loadedcallback='setListingDetail("{{listing.id}}",{"section": "{{listing.section.id}}","sellerPhones": {{ (isCtaButtonsEnabled ? encodedSellerPhones : [])|json_encode() }},"sellerPhone": "{{ isCtaButtonsEnabled ? (hasWhatsapp ? whatsAppNumber|phoneNumberEncode : (listingPhone ? listingPhone.number|phoneNumberEncode : '')) :''}}","financeUrl":"{{listing.getFinancialAidURL()}}","userEmail": {{currentUserEmail|json_encode()}},"financeFeatureValue": "{{financeFeatureValue}}","listingName" : {{listing.customSlug|default(listing.id)|serialize()}},"listingTitle" : {{listing.title|serialize()}},"listingUser": {"sellerName" : {{sellerName|serialize()}},"sellerLogo": "","sellerUrl": "{{sellerUrl}}","joinedData":"{{joinedData}}","activeListingsCount": "{{activeListingsCount}}","leadsCount":"{{leadsCount}}"}})'><div class="search-listing-card__wrapper"><a class="search-listing-card__container__link {{ relatedListingAnalytics }}"onclick="elementEvents.fireGTM( 'listingId',{{ listing.id }}, {{ listingEvents|json_encode() }})"href="{{ LISTING_URL }}"></a><div class="search-listing-card__labels">{% if isUserHasActiveSubscription %}{% if listing.featured == PREMIUM_CONSTANT %}<span class="search-listing-card__labels_card search-listing-card__labels_card_sponsored">{{ 'search_results.premium_small'|trans }}</span>{% elseif listing.featured == SPOTLIGHT_CONSTANT %}<span class="search-listing-card__labels_card search-listing-card__labels_card_sponsored">{{ 'search_results.spotlight'|trans }}</span>{% elseif listing.featured == SPONSORED_TYPE %}<span class="search-listing-card__labels_card search-listing-card__labels_card_sponsored">{{ 'search_results.sponsored'|trans }}</span>{% elseif isCompoundSearchResultsCard and listing.featured %}<span class="search-listing-card__labels_card search-listing-card__labels_card_sponsored">{{ 'search_results.featured_small'|trans }}</span>{% endif %}{% if listing.featured == FEATURE_TYPE %}<span class="search-listing-card__labels_card search-listing-card__labels_card_featured">{{ 'search_results.featured_capital'|trans }}</span>{% elseif isSoldByOwnerType %}<span class="search-listing-card__labels_card search-listing-card__labels_card_featured">{{ 'search_results.sold_by_owner'|trans }}</span>{% endif %}{% endif %}{% if isVerified %}<span class="search-listing-card__labels_card search-listing-card__labels_card_verified">{{ 'search_results.verified'|trans }}</span>{% endif %}{% if isEligibleForMortgage %}<span class="search-listing-card__labels_card search-listing-card__labels_card_mortgage">{{ 'search_results.is_mortgage'|trans }}</span>{% endif %}{% if isRelatedToMainListing %}<span class="search-listing-card__labels_card search-listing-card__labels_card_featured">{{ getSimilarLabel(mainListingObj, listing)|trans }}</span>{% endif %}</div><div class="search-listing-card__img embed-responsive embed-responsive-4by3"><div class="search-listing-card__img__wrapper embed-responsive-item">{% if isListingPhotosDefined %}{% if disableLazyLoadImgIndex %}<picture><source srcset="{{ custom_vich_uploader_asset(listingPhotos[listing.id].main.file, 'file')|thumbnail('search-thumb-webp') }}"type="image/webp"><source srcset="{{ custom_vich_uploader_asset(listingPhotos[listing.id].main.file, 'file')|thumbnail('search-thumb') }}"type="image/jpg"><imgalt="{{ listing.title|excludeNumbers }}"width="{{ listingPhotoSize }}" height="{{ listingPhotoSize }}"fetchpriority="high" /></picture>{% else %}<picture><source data-srcset="{{ custom_vich_uploader_asset(listingPhotos[listing.id].main.file, 'file')|thumbnail('search-thumb-webp') }}"type="image/webp"><source data-srcset="{{ custom_vich_uploader_asset(listingPhotos[listing.id].main.file, 'file')|thumbnail('search-thumb') }}"type="image/jpg"><imgsrc="/images/placeholder.svg"class="lazyload"alt="{{ listing.title|excludeNumbers }}"width="{{ listingPhotoSize }}" height="{{ listingPhotoSize }}"fetchpriority="low" /></picture>{% endif %}{% elseif listing.mainPhoto %}{% if disableLazyLoadImgIndex %}<picture><source srcset="{{ custom_vich_uploader_asset(listing.mainPhoto.file, 'file')|thumbnail('search-thumb-webp') }}"type="image/webp"><source srcset="{{ custom_vich_uploader_asset(listing.mainPhoto.file, 'file')|thumbnail('search-thumb') }}"type="image/jpg"><imgalt="{{ listing.title|excludeNumbers }}"width="{{ listingPhotoSize }}" height="{{ listingPhotoSize }}"fetchpriority="high" /></picture>{% else %}<picture><source data-srcset="{{ custom_vich_uploader_asset(listing.mainPhoto.file, 'file')|thumbnail('search-thumb-webp') }}"type="image/webp"><source data-srcset="{{ custom_vich_uploader_asset(listing.mainPhoto.file, 'file')|thumbnail('search-thumb') }}"type="image/jpg"><imgsrc="/images/placeholder.svg"class="lazyload"alt="{{ listing.title|excludeNumbers }}"width="{{ listingPhotoSize }}" height="{{ listingPhotoSize }}"fetchpriority="low" /></picture>{% endif %}{% else %}<div class="search-listing-card__img__no-photo">{{ 'layout.no_listing_photo'|trans }}</div>{% endif %}{% if showPhotosCount %}<div class="search-listing-card__img__thumbnail search-listing-card__img__thumbnail_bottom"><div class="search-listing-card__img__count"><span class="fa fa-image"></span>{% if listingPhotosCount[listing.id] is defined %}{{ listingPhotosCount[listing.id] }}{% else %}0{% endif %}</div></div>{% endif %}</div></div><div class="search-listing-card__details">{% if app.request.attributes.get("_route") != 'aqarmap_user_listings' %}{% if isListingLogoDefined %}{{ _self.userLogo(custom_vich_uploader_asset(listingPhotos[listing.id].logo.file, 'file') | thumbnail('logo'),disableLazyLoadImgIndex,listingUserPhotoSize,listing.id) }}{% elseif listing.validUserLogo %}{{ _self.userLogo(custom_vich_uploader_asset(listing.validUserLogo, 'file') | thumbnail('logo'),disableLazyLoadImgIndex,listingUserPhotoSize,listing.id) }}{% endif %}{% endif %}<div class="search-listing-card__details__wrapper" >{% if isCompoundSearchResultsCard %}<div class="search-listing-card__compound-title"><span> {{ listing.title|fixArabicNumbers|raw }}</span></div><p class="search-listing-card__address search-listing-card__address_compound"><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_location.svg"class="search-listing-card__attributes_icon"alt="{{ listing.address }}"width="{{ iconSize }}" height="{{ iconSize }}"/><span> {{ listing.address }} </span></p>{% if showCompoundAveragePrices %}<div class="search-listing-card__units__wrapper">{% if isCompoundAveragePrices%}{% include '@AqarmapListingBundle/Listing/compoundAveragePrices.html.twig' with {'units': compoundAveragePrices} %}{% endif %}</div>{% endif %}<div class="search-listing-card__starting-price">{% if listingPrice %}{{ 'listing.starting_from'|trans }}<span class="integer">{{ listingPrice |number_format }}</span><span>{{ get_setting('general', 'currency')|trans }}</span>{% elseif listing.section.searchable %}{{ 'listing.call_for_price'|trans }}{% endif %}</div>{% else %}{% if allowListingLabel %}<div class="search-listing-card__best-label">{% if isValidPrice %}<img fetchpriority="low" width="{{ iconSize }}" height="{{ iconSize }}"src="{{ asset('images/picks/ic_money_blue.svg') }}" alt="{{'listing.valid_price'|trans }}" />{{'listing.valid_price'|trans }}{% elseif isTopViewed %}<img fetchpriority="low" width="{{ iconSize }}" height="{{ iconSize }}"src="{{ asset('images/picks/analytics-arrow-up_blue.svg') }}" alt="{{'listing.top_viewed'|trans }}" />{{'listing.top_viewed'|trans }}{% elseif isTopFavourited %}<img fetchpriority="low" width="{{ iconSize }}" height="{{ iconSize }}"src="{{ asset('images/picks/ic_heart_blue.svg') }}" alt="{{'listing.top_favourite'|trans }}" />{{'listing.top_favourite'|trans }}{% endif %}</div>{% endif %}<div class="search-listing-card__price">{% if listing.price %}<span class="integer">{{ listing.price|number_format }}</span><span class="mx-2">{{ get_setting('general', 'currency')|trans }}</span>{% elseif listing.section.searchable %}{{ 'listing.call_for_price'|trans }}{% endif %}</div><h2 class="search-listing-card__title">{{ listing.title|fixArabicNumbers|raw }}</h2><p class="search-listing-card__address" ><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_location.svg"class="search-listing-card__attributes_icon"alt="{{ listing.address }}"width="{{ iconSize }}" height="{{ iconSize }}"/><span>{{ listing.address }}</span></p><div class="search-listing-card__attributes"><label class="search-listing-card__attributes_item"><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_size.svg"class="search-listing-card__attributes_icon"alt="Listing attributes"width="{{ iconSize }}" height="{{ iconSize }}"/>{{ listing.area}} {{ get_setting('general', 'measurement_unit')|trans }}</label>{% if listing_attributes|length > 0 %}{% if listing_rooms %}<label class="search-listing-card__attributes_item"><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_bedroom.svg"class="search-listing-card__attributes_icon"alt="Listing attributes"width="{{ iconSize }}" height="{{ iconSize }}"/>{{ listing_rooms }}</label>{% endif %}{% if listing_baths %}<label class="search-listing-card__attributes_item"><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_bathroom.svg"class="search-listing-card__attributes_icon"alt="Listing attributes"width="{{ iconSize }}" height="{{ iconSize }}"/>{{ listing_baths }}</label>{% endif %}{% endif %}</div>{% endif %}</div></div></div>{% if isEnabledDdeveloperCardData is defined and isEnabledDdeveloperCardData %}<div class="search-listing-card__user-properties__container"><hr class="desktop-separator"><div class="search-listing-card__user-properties user-properties-container">{% include '@AqarmapListingBundle/Listing/compoundCardDeveloperData.html.twig' with {'compound': compoundField} %}</div></div>{% endif %}{% if showCtaButtons %}<div class="search-listing-card__footer"><hr class="desktop-separator"><div class="search-listing-card__cta w-100">{% if listingPhones is not empty and not listing.isCallRequest %}{% if hasWhatsapp %}<button aria-label="text seller by whatsapp"class="search-listing-card__cta-button search-listing-card__cta-button_whatsapp whatsapp big"ng-click="onSendLead($event,{leadType:'whatsapp' ,actionType:'{{ SEND_WHATSAPP_CONSTANT }}' ,{# listingType: {{leadSources|serialize('json')}} , #}propertySection: '{{propertySectionSlug}}' ,propertyCategory: '{{propertyCategory}}',leadSourcePage: '{{leadSourcePage}}' ,depthProduct: '{{depthProduct}}',listingId: '{{ listing.id }}' ,insideCompound : '{{insideCompound}}'});"><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_whatsapp.svg"class="search-listing-card__cta-button_whatsapp_icon"alt="{{ 'label.lead.whatsApp'|trans }}"width="{{ iconSize }}" height="{{ iconSize }}"/>{{ 'label.lead.whatsApp'|trans }}</button><div class="vertical-separator"></div>{% endif %}{% set phoneBtnClass = 'search-listing-card__cta-button search-listing-card__cta-button_call ' ~ callBtnClass %}<button class="{{ phoneBtnClass }}" aria-label="show seller phone"submit-text="{{ 'listing.show_seller_phone'|trans }}"ng-click="searchActionType = 'showNumber';onSendLead($event,{leadType:'call' ,actionType:'{{ SHOW_PHONE_CONSTANT }}' ,leadSourcePage: '{{leadSourcePage}}' ,propertySection: '{{propertySectionSlug}}' ,propertyCategory: '{{propertyCategory}}',depthProduct: '{{depthProduct}}',{# listingType: {{leadSources|serialize('json')}} , #}listingId: '{{ listing.id }}' ,insideCompound : '{{insideCompound}}'});"ng-if="!phoneShowed[{{listing.id}}]"data-gtm-listing-id="{{ listing.id }}"><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_phone.svg"class="search-listing-card__cta-button_call_icon"alt="{{ 'listing.show_seller_phone'|trans }}"width="{{ iconSize }}" height="{{ iconSize }}"/><span class="cta-button-text"> {{ 'listing.show_seller_phone'|trans }}</span></button><button class="{{ phoneBtnClass }}" aria-label="seller phone"ng-cloakng-click="showPhoneModalByListingId({{listing.id}})"ng-if="phoneShowed[{{listing.id}}]"><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_phone.svg"class="search-listing-card__cta-button_call_icon"alt="{{ 'listing.show_seller_phone'|trans }}"width="{{ iconSize }}" height="{{ iconSize }}"/><span class="cta-button-text"> {{ 'listing.show_seller_phone'|trans }}</span></button>{% else %}<button aria-label="request seller call"class="search-listing-card__cta-button search-listing-card__cta-button_call-request big m-0"ng-hide="callRequested[{{listing.id}}]"ng-click="searchActionType = 'sendRequest';onSendLead($event,{leadType:'request_call' ,actionType:'{{ CALL_REQUEST_CONSTANT }}' ,{# listingType: {{leadSources|serialize('json')}} , #}leadSourcePage: '{{leadSourcePage}}' ,propertySection: '{{propertySectionSlug}}' ,propertyCategory: '{{propertyCategory}}',depthProduct: '{{depthProduct}}',listingId: '{{ listing.id }}' ,insideCompound : '{{insideCompound}}'});"><imgfetchpriority="low"src="/images/BrandsIcons/listing/ic_phone.svg"class="search-listing-card__cta-button_call_icon"alt="{{ 'label.lead.call_request'|trans }}"width="{{ iconSize }}" height="{{ iconSize }}"/><span ng-hide="callRequested[{{listing.id}}]" class="cta-button-text"> {{ 'label.lead.call_request'|trans }} </span></button><button aria-label="seller call requested"class="search-listing-card__cta-button big success ng-hide"ng-show="callRequested[{{listing.id}}]"type= "button"disabled><i class="fa fa-check circle-badge success"></i><span class="mx-1"> {{ 'label.lead.call_requested'|trans }} </span></button>{% endif %}</div></div>{% endif %}</div>{# elastic scoring debug #}{% if isEnabledElasticScoringDebug %}{% include "@AqarmapListing/ListingSearch/listingElasticScore.html.twig" %}{% endif %}</div>{% if showMobileFeedads is defined and showMobileFeedads %}<div class="text-center col-12 visible-sm visible-xs" style="margin-bottom: 24px;">{% if get_setting('general', 'country') == 'SA' %}<div id='div-gpt-ad-1611049193067-0' style='width: 320px; height: 320px; margin: 0 auto 10px;'><script>setTimeout(function() {if (typeof googletag !== 'undefined') {googletag.cmd.push(function() { googletag.display('div-gpt-ad-1611049193067-0'); });}}, 3000);</script></div>{% else %}<div id='div-gpt-ad-1588541966744-0' style='width: 320px; height: 320px; margin: 0 auto 10px;'><script type="application/javascript" v-pre defer>setTimeout(function() {if (typeof googletag !== 'undefined') {googletag.cmd.push(function() { googletag.display('div-gpt-ad-1588541966744-0'); });}}, 3000);</script></div>{% endif %}</div>{% set isInFeedAdAappeared = true %}{% endif %}{% set listingPhoto = isListingPhotosDefined ? custom_vich_uploader_asset(listingPhotos[listing.id].main.file, 'file')|thumbnail('search-thumb-webp') : listing.mainPhoto ? custom_vich_uploader_asset(listing.mainPhoto.file, 'file')|thumbnail('search-thumb-webp') : "" %}{% block headScripts %}<script type="application/ld+json">{"@context": "https://schema.org","@type": "SingleFamilyResidence","name" : "{{listing.title}}","image": "{{listingPhoto}}","url": "{{ absolute_url(LISTING_URL) }}","address": {"@type": "PostalAddress","name": "{{ listing.location.title }}"},"geo": {"@type": "GeoCoordinates","latitude": "{{ listing.location.centerLat }}","longitude": "{{ listing.location.centerLng }}"},"floorSize": {"@type": "QuantitativeValue","value": "{{ listing.area }}"}}</script>{% endblock %}{% endfor %}