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

Open in your IDE?
  1. {% set isCompound = compound is defined and compound|length > 0 %}
  2. {% set establishingYear =  null %}
  3. {% set numberOfProjects =  null %}
  4. {% set projectsInhabited = null %}
  5. {% set projectsDelivered = null %}
  6. {% set projectsUnderConstruction =  null %}
  7. {% set developerName = '' %}
  8. {% set userLogo = listing.user.logo ? listing.user.logo.file : null %}
  9. {% set logo = listing.logo ? listing.logo.file : null %}
  10. {% set developerLogo = logo ? logo : userLogo %}
  11. {% if isCompound  %}
  12.     {% set establishingYear = compound.establishingYear %}
  13.     {% set numberOfProjects = compound.numberOfProjects %}
  14.     {% set projectsInhabited = compound.numberOfProjectsInhabited %}
  15.     {% set projectsDelivered = compound.numberOfProjectsDelivered %}
  16.     {% set projectsUnderConstruction = compound.numberOfProjectsUnderConstruction %}
  17.     {% set developerName =  compound.developerName %}
  18. {% endif %}
  19. {% set imageSize = 56 %}
  20. <div class="users-cards p-0">
  21.     <div class="users-card vertical no-border p-0" >
  22.         <div class="user-info d-flex w-100">
  23.             <div class="user-card__img-container user-card__img-container_ml-0 rounded-circle mt-2 ">
  24.                 {% if developerLogo %}
  25.                     <img class="user-card__img lazyload"
  26.                     src="{{ asset('images/placeholder.svg') }}"
  27.                     data-src="{{ custom_vich_uploader_asset(developerLogo, 'file')  | thumbnail('logo')}}"
  28.                     alt="company-logo" width="{{imageSize}}" height="{{imageSize}}">
  29.                 {% else %}
  30.                     <img class="user-card__img lazyload rounded-circle user-card__img_empty"
  31.                         src="" data-src="{{ asset('images/emblem.svg') }}" alt="compound-logo" width="{{imageSize}}" height="{{imageSize}}">
  32.                 {% endif %}
  33.             </div>
  34.             <div class="user-card__data w-80 np-border">
  35.                 <div class="user-card__name">
  36.                     <b class="user-card__name-text" title="{{ developerName }}">{{ developerName }}</b>
  37.                 </div>
  38.                 <div class="user-card__stat">
  39.                     <span class="user-card__joined-text w-100">
  40.                         {% if establishingYear is not null %}
  41.                             {{ 'labels.compound.from'|trans }} {{ establishingYear }} ,
  42.                         {% endif %}
  43.                         {% if numberOfProjects is not null %}
  44.                                 {{ numberOfProjects }} {{ 'labels.compound.projects_title'|trans }}
  45.                         {% endif %}
  46.                     </span>
  47.                 </div>
  48.                 <div class="user-properties">
  49.                     <div class="properties">
  50.                         <div class="projects mt-3">
  51.                             {% if projectsInhabited is not null %}
  52.                             <div class="projects-details col-auto">
  53.                                 <label class="font-weight-bold count">{{ projectsInhabited }}</label>
  54.                                 <label class="font-weight-normal sub-text">{{ 'labels.compound.inhabited'|trans }}</label>
  55.                             </div>
  56.                             {% endif %}
  57.                             {% if projectsDelivered is not null %}
  58.                             <div class="projects-details col-auto">
  59.                                 <label class="font-weight-bold count">{{ projectsDelivered }}</label>
  60.                                 <label class="font-weight-normal sub-text">{{ 'labels.compound.delivered'|trans }}</label>
  61.                             </div>
  62.                             {% endif %}
  63.                             {% if projectsUnderConstruction is not null %}
  64.                             <div class="projects-details col-auto">
  65.                                 <label class="font-weight-bold count">{{ projectsUnderConstruction }}</label>
  66.                                 <label class="font-weight-normal sub-text">{{ 'labels.compound.in_progress'|trans }}</label>
  67.                             </div>
  68.                             {% endif %}
  69.                         </div>
  70.                     </div>
  71.                 </div>
  72.             </div>
  73.         </div>
  74.     </div>
  75. </div>