src/Aqarmap/Bundle/ListingBundle/Resources/views/CompoundSearch/compoundSearchResult.html.twig line 1

Open in your IDE?
  1. {% extends "base.html.twig" %}
  2. {% set SHARING_IMAGE = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\SharingConstant::PROJECTS_IMAGE') %}
  3. {% set isCtaButtonsEnabled =  isEnabledFeature('web.compound.card.cta') %}
  4. {% set totalListingsCount = listings.getTotalItemCount() %}
  5. {% set SHOW_PHONE_CONSTANT = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\LeadTypes::SHOW_PHONE') %}
  6. {% set isKSASite = get_setting('general', 'country') == 'SA' %}
  7. {% if location.parent is defined and location.parent %}
  8.     {% set resortsCustomTitleWithLocation = 'layout.resorts_custom_title_with_location_with_parent'|trans({
  9.         '%location%': locationTitle,
  10.         '%parentLocation%': location.parent.title,
  11.         '%projects%': totalListingsCount
  12.     }) %}
  13.     {% if isKSASite %}
  14.         {% set projectsCustomTitleWithLocation = 'layout.projects_ksa_custom_title_with_location_with_parent'|trans({
  15.             '%location%': locationTitle,
  16.             '%parentLocation%': location.parent.title,
  17.             '%projects%': totalListingsCount
  18.         }) %}
  19.     {% else %}
  20.         {% set projectsCustomTitleWithLocation = 'layout.projects_custom_title_with_location_with_parent'|trans({
  21.             '%location%': locationTitle,
  22.             '%parentLocation%': location.parent.title,
  23.             '%projects%': totalListingsCount
  24.         }) %}
  25.     {% endif %}
  26. {% else %}
  27.     {% set resortsCustomTitleWithLocation = 'layout.resorts_custom_title_with_location'|trans({
  28.         '%location%': locationTitle,
  29.         '%projects%': totalListingsCount
  30.     }) %}
  31.     {% if isKSASite %}
  32.         {% set projectsCustomTitleWithLocation = 'layout.projects_ksa_custom_title_with_location'|trans({
  33.             '%location%': locationTitle,
  34.             '%projects%': totalListingsCount
  35.         }) %}
  36.     {% else %}
  37.         {% set projectsCustomTitleWithLocation = 'layout.projects_custom_title_with_location'|trans({
  38.             '%location%': locationTitle,
  39.             '%projects%': totalListingsCount
  40.         }) %}
  41.     {% endif %}
  42. {% endif %}
  43. {% set projectsCustomDescriptionWithLocation = 'layout.projects_custom_description_with_location'|trans({
  44.     '%location%': locationTitle,
  45.     '%projects%': totalListingsCount
  46. }) %}
  47. {% set ogDescription = locationTitle ? projectsCustomDescriptionWithLocation : 'listing.compound_guide.sharing.description'|trans %}
  48. {% set projectsTitleWithoutLocation = isKSASite ? 'layout.ksa_compounds_title' | trans : 'layout.compounds_title_without_location' |trans({'%projects%': totalListingsCount}) %}
  49. {# Page title #}
  50. {% block title %}
  51.     {% if locationTitle %}
  52.         {% if locationType == constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\CompoundType::RESORT') %}
  53.             {{ resortsCustomTitleWithLocation }}
  54.         {% else %}
  55.             {{ projectsCustomTitleWithLocation }}
  56.         {% endif %}
  57.     {% else %}
  58.         {{ projectsTitleWithoutLocation }}
  59.     {% endif %}
  60.     {{ parent() }}
  61. {% endblock %}
  62. {% block metatags %}
  63.     {% if isNoIndexMetaTag or not listingsCount %}
  64.         <meta name="robots" content="noindex">
  65.     {% endif %}
  66. {% endblock %}
  67. {% block meta_description %}
  68.     {% if locationTitle %}
  69.         {{ projectsCustomDescriptionWithLocation }}
  70.     {% elseif customParagraph %}
  71.         {{ customParagraph.paragraph|striptags|truncate(160) }}
  72.     {% endif %}
  73. {% endblock %}
  74. {% block categorizedStylesheets %}
  75.     {% if isMobile %}
  76.         <style type="text/css">
  77.             {{ source('@AqarmapListing/style/compoundSearchCritical.css', ignore_missing = true) }}
  78.         </style>
  79.     {% else %}
  80.         <link rel="stylesheet" href="{{ asset('builds/css/compoundsBuild'~ (app.environment == 'dev' ? '' : '.min') ~'.css') }}" />
  81.     {% endif %}
  82.     <meta name="twitter:card" content="summary_large_image" />
  83.     <meta name="twitter:site" content="{{ "%s%s"|format('@', 'layout.app_name'|trans) }}" />
  84.     <meta name="twitter:creator" content="{{ "%s%s"|format('@', 'layout.app_name'|trans) }}" />
  85.     {% if locationTitle %}
  86.         {% if locationType == constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\CompoundType::RESORT') %}
  87.             <meta property="og:title" content="{{ resortsCustomTitleWithLocation }}{{ 'layout.brand_suffix'|trans }}"/>
  88.         {% else %}
  89.             <meta property="og:title" content="{{ projectsCustomTitleWithLocation }}{{ 'layout.brand_suffix'|trans }}"/>
  90.         {% endif %}
  91.     {% else %}
  92.         <meta property="og:title" content="{{ projectsTitleWithoutLocation }}{{ 'layout.brand_suffix'|trans }}"/>
  93.     {% endif %}
  94.     <meta property="og:description" content="{{ ogDescription }}" />
  95.     <meta property="og:image" content="{{ SHARING_IMAGE }}" />
  96.     <meta property="og:site_name" content="{{ 'layout.app_name'|trans }}" />
  97.     <meta property="fb:app_id" content="{{ facebook_app_id }}"/>
  98. {% endblock %}
  99. {% block headerTop %}
  100. {% endblock %}
  101. {% block body %}
  102.     {% set sharingEvent = "compounds-guide" %}
  103.     <div class="filter-fixed-height">
  104.         <div class="stick-filter-box">
  105.             <div class="compoundSearchContainer filterSearchContainer visible-sm visible-xs">
  106.                 <div class="sectionContainer">
  107.                     <button class="btnTop" onclick="openCompoundsFilter('searchFormContainer')" alt="searchFilters">
  108.                         <div class="bs-custom-caret">
  109.                             <span class="caret"></span>
  110.                         </div>
  111.                         {{ 'layout.more_filter'|trans }}
  112.                     </button>
  113.                     <div class="btnTop sortContainer">
  114.                         <div class="bs-custom-caret">
  115.                             <span class="caret"></span>
  116.                         </div>
  117.                         <div class="d-flex justify-content-center w-100">
  118.                             <div class="sortSelect">
  119.                                 {% include "@AqarmapListing/CompoundSearch/sortSelect.html.twig" with {'location': location} %}
  120.                             </div>
  121.                         </div>
  122.                     </div>
  123.                 </div>
  124.             </div>
  125.         </div>
  126.     </div>
  127.     {% include "adsHeader.html.twig" %}
  128.     <section class="container sectionsContainer compoundPlannerContainer">
  129.         <div class="row">
  130.             <div class="col-lg-10 col-md-10 col-sm-10 col-xs-12 hidden-xs">
  131.                 {% set compound_search_breadcrumb = knp_menu_get( 'compound_search.breadcrumb' , [], {}) %}
  132.                 {{ knp_menu_render(compound_search_breadcrumb, {
  133.                     'allow_safe_labels': true,
  134.                     'template': 'knp_breadcrumbs.html.twig',
  135.                     'currentAsLink': true,
  136.                     'currentClass': 'active'
  137.                 }) }}
  138.             </div>
  139.             <div class="sortBy col-lg-2 col-md-2 col-sm-2 col-xs-12 hidden-sm hidden-xs">
  140.                 <div class="sortContainer">
  141.                     <div class="sortSelect">
  142.                         {% include "@AqarmapListing/CompoundSearch/sortSelect.html.twig" with {'location': location} %}
  143.                     </div>
  144.                 </div>
  145.             </div>
  146.             <div class="page-header d-flex justify-content-between align-items-md-center flex-md-row flex-column col-12">
  147.                 <h1>
  148.                     {% if locationTitle %}
  149.                         {% if locationType == constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\CompoundType::RESORT') %}
  150.                             {{ resortsCustomTitleWithLocation }}
  151.                         {% else %}
  152.                             {{ projectsCustomTitleWithLocation }}
  153.                         {% endif %}
  154.                     {% else %}
  155.                         {{ projectsTitleWithoutLocation }}
  156.                     {% endif %}
  157.                 </h1>
  158.                 {% if isEnabledFeature('web.compound.advisor') %}
  159.                     <a href="{{ path('compound_adviser') }}" class="compound-searching-links__btn font-weight-bold mt-md-0 mt-3" alt="compounds">{{ 'listing.compounds_adviser.sub_title'|trans }}</a>
  160.                 {% endif %}
  161.             </div>
  162.             <div class="col-12 hidden-page-header">
  163.                 {% include "@AqarmapListing/Section/compoundsSubLinks.html.twig" %}
  164.             </div>
  165.             <div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
  166.                 {% include '@AqarmapListingBundle/CompoundSearch/compoundSearchForm.html.twig' %}
  167.                 {% if isEnabledFeature('web.sharing.page') %}
  168.                     <div class="side-sub-links hidden-xs hidden-sm">
  169.                         <div class="listing-share-box">
  170.                             <label class="share-header-mob">
  171.                                 {{ isEgyptSite ? 'labels.compound.share_title' | trans : 'labels.compound.ksa_share_title' | trans }}
  172.                             </label>
  173.                             {% include '@AqarmapListingBundle/Listing/elementShareContent.html.twig' with {'url': app.request.uri} %}
  174.                         </div>
  175.                     </div>
  176.                 {% endif %}
  177.             </div>
  178.             {#Listings Cards#}
  179.             <div class="listingCardContainer p-0 col-lg-9 col-md-9 col-sm-12 col-xs-12">
  180.                     {% set neighborhoodLocation = null %}
  181.                     {% if firstRootLocation %}
  182.                         {% set neighborhoodLocation = firstRootLocation %}
  183.                     {% elseif location and location.location %}
  184.                         {% set neighborhoodLocation = location.location %}
  185.                     {% endif %}
  186.                 {% include '@AqarmapListingBundle/CompoundSearch/compoundResultsContainer.html.twig' %}
  187.                 {% if isKSASite %}
  188.                     {% set joinNowPath = path('contact_us_page') %}
  189.                 {% else %}
  190.                     {% set joinNowPath = app.request.locale == locale ? joinUsARURL : joinUsENURL %}
  191.                 {% endif %}
  192.                 <div class="addCompoundContainer col-lg-12 col-md-12 col-sm-12 col-xs-12">
  193.                     <div class="container-fluid">
  194.                         <div class="row">
  195.                             <div class="col-xs-12">
  196.                                 <div class="header">
  197.                                     <div class="questionContainer">
  198.                                         <h2 class="custom-header white">
  199.                                             <a  href="{{ joinNowPath }}" rel="nofollow" alt="Join">{{ 'layout.compound_planner.compound_join'|trans }}</a>
  200.                                         </h2>
  201.                                         <p class="responsive_style">
  202.                                             {{ 'layout.compound_planner.compound_git_more'|trans }} </p>
  203.                                     </div>
  204.                                     <div class="ask-question-btn-container">
  205.                                         <a class="btn btn-block btn-warning" href="{{ joinNowPath }}" rel="nofollow" alt="joinNow">{{ 'layout.compound_planner.join_now'|trans }}</a>
  206.                                     </div>
  207.                                 </div>
  208.                             </div>
  209.                         </div>
  210.                     </div>
  211.                 </div>
  212.                 {% if isEnabledFeature('web.sharing.page') %}
  213.                     <a class="listing-share-btn-container fixedBottom borderLight" data-toggle="modal" data-target="#listingShareModal">
  214.                         <label>{{ 'layout.compounds_title'|trans }}</label>
  215.                         <div class="btn btn-default btn-share">
  216.                             <i class="fa fa-share-alt"></i>
  217.                             <label class="hidden-lg hidden-xl">{{ 'layout.share'|trans }}</label>
  218.                         </div>
  219.                     </a>
  220.                 {% endif %}
  221.             </div>
  222.             <!-- /Pagination -->
  223.         </div>
  224.     </section><!-- sectionsContainer -->
  225.     <div class="container">
  226.         <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 mobile-breadcrumb visible-sm visible-xs">
  227.             {% set COMPOUND_SEARCH_BREADCRUMB = knp_menu_get('compound_search.breadcrumb') %}
  228.             {{
  229.                 knp_menu_render(COMPOUND_SEARCH_BREADCRUMB , {
  230.                     'allow_safe_labels': true,
  231.                     'template': 'knp_breadcrumbs.html.twig',
  232.                     'currentAsLink': true,
  233.                     'currentClass': 'active',
  234.                 })
  235.             }}
  236.         </div>
  237.     </div>
  238.     <div class="container">
  239.         {% if isEnabledFeature('web.seo.compound.locations.sublinks') and neighborhoodLocation %}
  240.         <div class="discussions">
  241.             <div class="tab-content searchResultsContainer interested-listings subsLinks more-locations-container">
  242.                 {% include "@AqarmapMainBundle/Default/locationsSubLinks.html.twig" with {'location': neighborhoodLocation} %}
  243.             </div>
  244.         </div>
  245.         {% endif %}
  246.     </div>
  247.     {% if isEnabledFeature('web.seo.custom.pragraphs') and customParagraph and listings.currentPageNumber == 1 %}
  248.         <br>
  249.         {% include '@AqarmapListingBundle/Listing/custom_paragraph.html.twig' with {'customParagraph': customParagraph} %}
  250.     {% endif %}
  251.     {% if isEnabledFeature('web.sharing.page') %}
  252.         {% include '@AqarmapListingBundle/Listing/listingShareModal.html.twig' %}
  253.     {% endif %}
  254.     {% if isCtaButtonsEnabled %}
  255.         {{ include('@AqarmapListingBundle/Listing/listingPhoneModal.html.twig') }}
  256.         <div ng-controller="listingLeadsWizardController">
  257.             <div ng-content-loaded callback="initFormWizard()">
  258.                 {{ include('@AqarmapUserBundle/User/listingMultiStepLeadModal.html.twig') }}
  259.             </div>
  260.         </div>
  261.         {{ include('@AqarmapUserBundle/User/RegistrationSurvey.html.twig') }}
  262.     {% endif %}
  263. {% endblock %}
  264. {% block stylesheets %}
  265.     {% if isMobile %}
  266.         {% set compoundsBuild = 'builds/css/compoundsBuild' ~ (app.environment == 'dev' ? '' : '.min') ~'.css' %}
  267.         <link rel="preload" href="{{ asset(compoundsBuild) }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
  268.         <noscript><link rel="stylesheet" href="{{ asset(compoundsBuild) }}"></noscript>
  269.     {% endif %}
  270.     {{ parent() }}
  271. {% endblock %}
  272. {% block getTranslations %}
  273.     <script>
  274.         function getAddLocationPlaceHolder() {
  275.             return '{{ 'layout.compound_planner.add_name_placeholer'|trans }}';
  276.         }
  277.         function getDefaultPlaceHolder() {
  278.             return '{{ 'layout.compound_planner.search_for_placeholder'|trans }}';
  279.         }
  280.     </script>
  281. {% endblock %}
  282. {% block categorizedJavascripts %}
  283.     <script src="{{ asset('builds/js/buildCompoundsCritical'~ (app.environment == 'dev' ? '' : '.min') ~'.js') }}"></script>
  284.     <script defer src="{{ asset('builds/js/buildCompoundsVendors'~ (app.environment == 'dev' ? '' : '.min') ~'.js') }}"></script>
  285.     <script defer src="{{ asset('builds/js/buildCompounds'~ (app.environment == 'dev' ? '' : '.min') ~'.js') }}"></script>
  286.     {% if topBar is not null %}
  287.         {{ encore_entry_script_tags('countdown') }}
  288.     {% endif %}
  289. {% endblock %}
  290. {% block javascripts %}
  291.     {{ parent() }}
  292.     <script>
  293.         jQuery(document).ready(function(){
  294.             $('#price_level').addClass('active');
  295.             $('.showMore').each(function () {
  296.                 var $this = $(this);
  297.                 var numberOfULChilds =  getNestedChildrens(this, '.nestedContainer', '.parentUL');
  298.                 var numberOfVisibleItems = getParents($this, '.nestedContainer').attr('data-hideStartFrom');
  299.                 if(numberOfULChilds.length >= numberOfVisibleItems){
  300.                     $this.css('display', 'block');
  301.                 }
  302.             });
  303.         });
  304.     </script>
  305.     <script>
  306.         jQuery(document).ready(function ($) {
  307.             loadMoreInit('.sectionLoadMore');
  308.         });
  309.     </script>
  310. {% endblock %}
  311. {% block htmlhead %}
  312.     {% if app.request.get('page') and app.request.get('page') > 1 %}
  313.         {% set canonical_url = url(app.request.get('_route'), app.request.get('_route_params')|merge({'page': app.request.get('page')})) %}
  314.     {% else %}
  315.         {% set canonical_url = url(app.request.get('_route'), app.request.get('_route_params')) %}
  316.     {% endif %}
  317.     <link rel="canonical" href="{{ canonical_url }}"/>
  318. {% endblock %}