src/Aqarmap/Bundle/NeighborhoodBundle/Resources/views/neighborhoodAveragePrices.html.twig line 1

Open in your IDE?
  1. {% set VILLA_ID_CONST = 16  %}
  2. {% set APARTMENT_ID_CONST = 1 %}
  3. {% set currency = get_setting('general', 'currency')|trans%}
  4. {% set villaPrice = 0 %}
  5. {% set apartmentPrice = 0 %}
  6. <div id="neighborhood-statistics">
  7.     <div class="container">
  8.         <div class="page-header">
  9.             <div class="avg-prices-title" >
  10.                 <h1 >{{ 'neighborhoods.prices_title'|trans({'%location%': location.title}, 'messages') }}</h1>
  11.                 <p class="pull-right flip">
  12.                     {{ 'neighborhoods.data_updated_at'|trans({'%date%': updatedDate|date("d-m-Y")|localizeddate('long', 'none', 'en')}) }}
  13.                     <a target="_blank" href="{{ path('page_view', {'slug': 'neighborhoods-statistics-information'}) }}"><span class="fa fa-info-circle" aria-hidden="true"></span></a>
  14.                 </p>
  15.             </div>
  16.         </div>
  17.         <div class="row">
  18.             <div class="col-md-5">
  19.                 {% for statistic in location_statistics %}
  20.                     {% set villaPrice =  statistic.propertyType.id == VILLA_ID_CONST ? statistic.avgPrice : villaPrice %}
  21.                     {% set apartmentPrice =  statistic.propertyType.id == APARTMENT_ID_CONST ? statistic.avgPrice: apartmentPrice %}
  22.                     {% if statistic.avgPrice %}
  23.                         <div class="avg-price-widget-container">
  24.                             <div class="d-flex align-items-center w-100">
  25.                                 <div class="stat-type">
  26.                                     <span>({{ statistic.propertyType.title }})</span>
  27.                                 </div>
  28.                                 <div class="avg-price-widget">
  29.                                     <span class="integer">
  30.                                         {{ statistic.avgPrice|number_format }}
  31.                                         <span class="sign">{{ get_setting('general', 'currency')|trans }}</span>
  32.                                     </span>
  33.                                 </div>
  34.                             </div>
  35.                         </div>
  36.                         <p class="avg-price-sub-text">
  37.                             {{ 'neighborhoods.headline.sub_header'|trans({
  38.                                 '%propertyType%': statistic.propertyType.title,
  39.                                 '%location%': location.title,
  40.                                 '%price%': statistic.avgPrice|number_format,
  41.                                 })
  42.                             }}
  43.                             <span class="sign">{{ get_setting('general', 'currency')|trans }}</span>
  44.                             {{ "neighborhoods.headline.per_square_meter"|trans }}
  45.                         </p>
  46.                     {% endif %}
  47.                 {% endfor %}
  48.                 <div class="avg-prices-btns">
  49.                     <a href="https://aqarmap.com/genie/" class="btn btn-block btn-warning large-price-btn btn-lg">{{ "neighborhoods.genie_button"|trans({'%location%': location.getNearestNeighborhood.title}, 'messages') }}</a>
  50.                     <div class="row ">
  51.                         <div class="search_add_btns col-xs-12 col-sm-6">
  52.                             <a  href="{{ path('search' ,{'location_slug' : location.slug, 'property_type_slug': 'apartment' , 'section_slug' : defaultSection.slug}) }}"
  53.                                 class="btn  navigate-btn btn-block btn-primary btn-lg">
  54.                                 {{ "layout.services.search_listings"|trans }}
  55.                             </a>
  56.                         </div>
  57.                         <div class="search_add_btns col-xs-12 col-sm-6">
  58.                             <a  href="{{ path('listing_initialize') }}" class="btn btn-block navigate-btn btn-primary btn-lg" rel="nofollow">
  59.                                 {{ "layout.add_listing"|trans }}
  60.                             </a>
  61.                         </div>
  62.                     </div>
  63.                 </div>
  64.             </div>
  65.             <div class="col-md-7 graph-container">
  66.                 {% if isEnabledFeature('web.pricegraph.resize') %}
  67.                     <div class="visible-sm visible-xs">
  68.                         <canvas class="statistics" width="1" height="1"></canvas>
  69.                     </div>
  70.                     <div class="hidden-sm hidden-xs">
  71.                         <canvas class="statistics"></canvas>
  72.                     </div>
  73.                     {% else %}
  74.                         <canvas id="statistics"></canvas>
  75.                 {% endif %}
  76.                 <div class="graph-title"><h2>{{ "neighborhoods.average_price_increase"|trans }}</h2></div>
  77.             </div>
  78.         </div>
  79.     </div>
  80. </div>