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

Open in your IDE?
  1. {% set DOWNLOAD_BROCHURE_CONSTANT = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\LeadTypes::DOWNLOAD_BROCHURE') %}
  2. {% set leadSourcePage = leadSourcePage is defined ? leadSourcePage : "listing_details_fixed_buttons"%}
  3. {% set leadSources = []%}
  4. {% set leadSources = app.request.query.get("source") ? leadSources|merge([app.request.query.get("source")]) : leadSources %}
  5. {% set leadSources = source is defined ? leadSources|merge([source]) : leadSources %}
  6. {% set listingBrochure = IS_PROJECT_PARENT ?  listing.brochure :  listing.parent.brochure %}
  7. {% set allowDownloadBrochure = IS_PROJECT  and listingBrochure %}
  8. {% if allowDownloadBrochure %}
  9.     {% set downloadFile =   listingBrochure.id  %}
  10.     {% set downloadName = listingBrochure.name %}
  11.     <button id="download-brochure-btn" hidden ng-click="onSendLead($event,{
  12.         leadType:'brochure' ,
  13.         actionType:'{{ DOWNLOAD_BROCHURE_CONSTANT }}' ,
  14.         leadSourcePage: '{{leadSourcePage}}' ,
  15.         propertyCategory: '{{propertyCategory}}',
  16.         propertySection: '{{propertySectionSlug}}' ,
  17.         depthProduct: '{{depthProduct}}',
  18.         insideCompound: '{{insideCompound}}',
  19.         listingType:  {{leadSources|serialize('json')}} ,
  20.         listingId: '{{ listing.id }}' ,
  21. });"  data-name="{{ downloadName }}" 
  22.      data-url="{{ path('download_brochure', {'file': downloadFile}) }}"
  23.     data-img-src="/images/activites/ic_download_white.svg" data-img-class="cta-icon"  
  24.     submit-text="{{ 'label.lead.download_brochure_now'|trans }}"
  25.     ></button>
  26. {% endif %}
  27. <one-listing-cta :listing='{
  28.     "isEnabledActivity":{{isEnabledActivityListingPage ? 1 : 0}},
  29.     "allowDownloadBrochure":{{allowDownloadBrochure ? 1 : 0 }},
  30.     "phones":{{encodedSellerPhones|serialize('json')}},
  31.     "id": {{ listing.id }},
  32.     "is_favourite": {{ listing.isfavourite ? 1 : 0 }},
  33.     "note": `{{ listing.usernote|default(' ')}}`,
  34.     "listingTitle" : {{listing.title|serialize()}},
  35.     "locationTitle": {{listing.location.title|serialize()}},
  36.     "propertyTypeTitle": {{listing.propertyType.title|serialize()}},
  37.     "price": "{{listing.price}}",
  38.     "image": "{{ listingMainPhoto }}",
  39.     "pricePerMeter": "{{listing.calculatePricePerMeter }}",
  40.     "baths": "{{  listing_baths }}",
  41.     "rooms": "{{  listing_rooms }}",
  42.     "yearBuilt": "{{  listing_year_built }}",
  43.     "finishType": "{{  listing_finish_type }}",
  44.     "view": {{ listing.propertyViewLabel|trans|serialize() }},
  45.     "area": "{{listing.area}}",
  46.     }' :show-call="false"></one-listing-cta>