src/Aqarmap/Bundle/ListingBundle/Resources/views/Section/compoundsSubLinks.html.twig line 1

Open in your IDE?
  1. {% set compounds_types_links = compoundLocationSubLinks() %}
  2. {% set isCompoundsLinks = compounds_types_links is defined %}
  3. {% set isMobile = (isMobile is defined) ? isMobile : isMobileAgent(app.request.headers.get('User-Agent')) %}
  4. {% set seeMoreClass = isMobile ? '' : 'large-element' %}
  5. {% set maxCollapsedHeight = 52 %}
  6. {% set compoundSubLocationHeader =  get_setting('general', 'country') == 'SA' ? 'layout.country_projects_quick_links_main_title'|trans({'%country%': country}) : 'layout.projects_quick_links_main_title'|trans %}
  7. {% if get_setting('general', 'country')|lower == 'eg' %}
  8.     {% set country = 'layout.countries.egypt'|trans %}
  9. {% else %}
  10.     {% set country = 'layout.countries.ksa'|trans %}
  11. {% endif %}
  12. {% if isCompoundsLinks %}
  13.     <div class="page-header">
  14.         <h3>
  15.             {{ compoundSubLocationHeader }}
  16.         </h3>
  17.     </div>
  18.     <div class="chips-links sub-location-container large-element-parent">
  19.         <div class="clearfix {{seeMoreClass}} noScrollIntoView" {% if isMobile %} always-show="true" {% endif %} data-height="{{ maxCollapsedHeight }}">
  20.             <ul class="chips-links__list {% if not isMobile %} no-scroll {% endif %}">
  21.                 {% for sub_type in compounds_types_links %}
  22.                     <li class="col-md-3 col-xs-6 chips-links__item">
  23.                         <a class="chips-links__link"
  24.                             href="{{ url(sub_type.route, sub_type.routeParameters) }}"
  25.                             alt="{{ sub_type.label }}">
  26.                             {{ sub_type.title }} ({{ sub_type.listingsCount }})
  27.                         </a>
  28.                     </li>
  29.                 {% endfor %}
  30.             </ul>
  31.         </div>
  32.         {% if not isMobile %}
  33.             <a href="javascript:void(0)" id="seeMoreParagraph" class="see-more-custom-paragraph see-more-paragraph-button px-3 mb-5"
  34.                 data-seeMore="{{ 'listing.see_more'|trans }}" data-seeLess="{{ 'listing.see_less'|trans }}"></a>
  35.         {% endif %}
  36.     </div>
  37. {% endif %}