src/Aqarmap/Bundle/ListingBundle/Resources/views/ListingSearch/topSellersResponsive.html.twig line 1

Open in your IDE?
  1. {% if not isCompaniesDataParamsDefined is defined %}
  2.     {% set attrPropertyType = app.request.attributes.get('propertyType') %}
  3.     {% set attrPropertyTypeId = propertyType is defined ?  propertyType.id : null %}
  4.     {% set listingPropertyType = listing is defined ? listing.propertyType : null %}
  5.     {% set listingPropertyTypeId = listingPropertyType ?  listingPropertyType.id : 'null' %}
  6.     {% set attrSection = app.request.attributes.get('section') %}
  7.     {% set attrSectionId = section is defined  ? section.id : null %}
  8.     {% set listingSection = listing is defined ? listing.section : null %}
  9.     {% set listingSectionId = listingSection ? listingSection.id : 'null' %}
  10.     {% set paramLocation = app.request.query.get('location')%}
  11.     {% set paramLocationId = paramLocation ? paramLocation : null %}
  12.     {% set attrLocation = app.request.attributes.get('location')%}
  13.     {% set attrLocationId = attrLocation ? attrLocation.id : null %}
  14.     {% set listingLocation = listing is defined ? listing.location : null %}
  15.     {% set listingLocationId = listingLocation ? listingLocation.id : 'null' %}
  16.     {% set locationId = attrLocationId ? attrLocationId: (paramLocationId ? paramLocationId : listingLocationId)  %}
  17.     {% set propertyTypeId = attrPropertyTypeId ? attrPropertyTypeId :  listingPropertyType %}
  18.     {% set sectionId = attrSectionId ? attrSectionId :  listingSectionId %}
  19. {% endif %}
  20. {% set leadSourcePage = leadSourcePage is defined ? leadSourcePage : "search_results"%}
  21. <div class="top-sellers w-100"
  22.     ng-controller="FeaturedCompaniesController">
  23.     <div ng-content-loaded callback="setTopCompaniesData({
  24.             'propertyType':'{{propertyTypeId}}',
  25.             'section':'{{sectionId}}',
  26.             'location': '{{locationId}}'});
  27.             fetchFeaturedCompanies();"
  28.         >
  29.         <div class="top-sellers-container section-wrapper section-wrapper__bordered_flex" ng-if="!isTopCompaniesEmpty()" ng-cloak>
  30.             <div class="top-sellers-container__header">
  31.                 {% if location is not null %}
  32.                     <h2 class="section-title__header-with-sub">{{ 'top_sellers.real_estate'|trans({"%location%": location.title}) }}</h2>
  33.                     <section class="section-title__sub-header">{{ 'top_sellers.sub_text_location'|trans({"%location%": location.title}) }}</section>
  34.                 {% else %}
  35.                     <h2 class="section-title__header-with-sub">{{ 'top_sellers.real_estate_empty'|trans }}</h2>
  36.                     <section class="section-title__sub-header">{{ 'top_sellers.sub_text'|trans }}</section>
  37.                 {% endif %}
  38.             </div>
  39.             <div class="top-sellers-details">
  40.                 <div class="cards-list">
  41.                     <div class="user-card" ng-repeat="company in getTopCompanies()">
  42.                         <div class="user-card__details" >
  43.                             <div class="user-card__info d-flex">
  44.                                 <div class="user-card__checkbox">
  45.                                     {% set cardsPosition = position is defined ? position : "vertical" %}
  46.                                     <input type="checkbox"  class="styled-checkbox"
  47.                                         id="company-{{'ng::company.user.id::'}}-{{cardsPosition}}"
  48.                                         ng-model="companiesChecked[company.user.id]"
  49.                                         ng-value="company.user.id" value="company.user.id"
  50.                                         ng-init="companiesChecked[company.user.id] = true"
  51.                                         ng-checked="true"/>
  52.                                     <label class="m-0" for="company-{{'ng::company.user.id::'}}-{{cardsPosition}}"></label>
  53.                                 </div>
  54.                                 <div class="user-card__img-container">
  55.                                     {% set thumb = 'ng::company.user.logo.thumbnails.thumb::' %}
  56.                                     <img ng-if="company.user.logo" class="user-card__img" src="{{thumb}}" alt="logo">
  57.                                     <img ng-if="!company.user.logo" class="user-card__img user-card__img_empty" src="{{ asset('images/emblem.svg') }}"  alt="logo">
  58.                                 </div>
  59.                                 <div class="user-card__data">
  60.                                     <div class="user-card__name">
  61.                                         <b class="user-card__name-text" title=""
  62.                                         ng-bind="company.user.full_name"
  63.                                         ng-class="getSellerNameDir(company.user.full_name)"></b>
  64.                                     </div>
  65.                                     <div class="user-card__stat">
  66.                                         <label class="user-card__joined-text w-auto" ng-if="company.numberOfActiveListing > 0">
  67.                                             <span ng-bind="getFormattedNumber(company.numberOfActiveListing)"></span>
  68.                                             <span>
  69.                                                 {{ 'labels.listings'|trans }}
  70.                                             </span>
  71.                                         </label>
  72.                                         <label class="user-card__joined-text w-auto" ng-if="company.leadsCount > 0">
  73.                                             <span ng-bind="getFormattedNumber(company.leadsCount)"></span>
  74.                                             <span>
  75.                                                 {{ 'labels.clients_served'|trans }}
  76.                                             </span>
  77.                                         </label>
  78.                                     </div>
  79.                                 </div>
  80.                             </div>
  81.                         </div>
  82.                     </div>
  83.                 </div>
  84.                 <div class="w-100">
  85.                     <button
  86.                         type="submit"
  87.                         class="btn btn-primary cta-btn-vertical cards-list__footer-btn"
  88.                         ng-show="showButton()"
  89.                         ng-click="onSendRequest($event,'{{ trigger }}', '{{ eventAction }}', {
  90.                             leadSourcePage: '{{leadSourcePage}}' ,                          
  91.                         });"
  92.                     >
  93.                         {{ 'label.lead.call_request' | trans }}
  94.                     </button>
  95.                 </div>
  96.                 <div>
  97.                     <div class="alert alert-dismissable alert-success" ng-show="!showButton()">
  98.                         {{ 'listing.top_seller_success_call_request'| trans }}
  99.                     </div>
  100.                 </div>
  101.             </div>
  102.             {% include "@AqarmapListing/ListingSearch/featuredCompaniesModal.html.twig" %}
  103.         </div>
  104.     </div>
  105. </div>