templates/Context/Vendor/VendorPage/index.html.twig line 1

Open in your IDE?
  1. {% extends '@SyliusShop/layout.html.twig' %}
  2. {% import '@SyliusUi/Macro/pagination.html.twig' as pagination %}
  3. {% import '@SyliusUi/Macro/messages.html.twig' as messages %}
  4. {% form_theme form with ['@SyliusUi/Form/theme.html.twig', 'Context/Shop/ProductCategory/formTheme.html.twig'] %}
  5. {% set reviewsCount = 0 %}
  6. {% set hasFullSupplierInfo = vendor.organization ? isFullSupplierInfo(vendor.organization) : false %}
  7. {% block content %}
  8.     <div class="ui clearing hidden divider"></div>
  9.     {% if is_mobile() %}
  10.         {% set vendor_banner_width = 330 %}
  11.         {% set vendor_banner_height = 550 %}
  12.     {% else %}
  13.         {% set vendor_banner_width = 1136 %}
  14.         {% set vendor_banner_height = 300 %}
  15.     {% endif %}
  16.     <div class="ui stackable grid vendor__view">
  17.         <div class="sixteen wide column vendor-banner">
  18.             {% if hasFullSupplierInfo and vendor.getBackgroundImage is not null %}
  19.                 <img id="vendor_banner"
  20.                      src="{{ aws_s3_base_url ~ '/media/cache/hyfindr_original/' ~ vendor.getBackgroundImage.path }}"
  21.                      alt="{{ vendor.companyName }} banner"
  22.                      width="{{ vendor_banner_width }}" height="{{ vendor_banner_height }}"
  23.                 >
  24.             {% endif %}
  25.             <h1 class="ui monster section dividing header">
  26.                 <div class="vendor-products--vendor-name{% if not hasOwner and vendor.organization %} has-takeover-btn{% endif %}">
  27.                     {% if hasFullSupplierInfo and vendor.getImage is not null %}
  28.                         <div class="vendor-logo">
  29.                             <img id="vendor_logo"
  30.                                  src="{{ aws_s3_base_url ~ '/media/cache/hyfindr_original/' ~ vendor.getImage.path }}"
  31.                                  alt="{{ vendor.companyName }} logo"
  32.                                  width="70" height="70"
  33.                             >
  34.                         </div>
  35.                     {% endif %}
  36.                     <div class="text-4xl">
  37.                         {{ vendor.companyName }}
  38.                         {% if hasFullSupplierInfo %}
  39.                             <div class="vendor-icons">
  40.                                 {% include '@SyliusShop/Product/_vendorBadgeIcons.html.twig' %}
  41.                             </div>
  42.                         {% endif %}
  43.                     </div>
  44.                     {% if not hasOwner and vendor.organization %}
  45.                         <a href="{{ path('bitbag_organization_shop_user_request_join_or_claim', {'uuid': vendor.organization.uuid}) }}" class="hyfindr btn btn--primary take-over-button">
  46.                             <i class="user plus icon"></i>
  47.                             {{ 'app.ui.take_over_account'|trans }}
  48.                         </a>
  49.                     {% endif %}
  50.                 </div>
  51.                 {% set isBot = app.request.attributes.get('is_bot') %}
  52.                 {% set vendorAddress = vendor.vendorAddress %}
  53.                 {% if vendorAddress and not isBot %}
  54.                     <div class="text-lg font-normal text-left vendor-address">
  55.                         {{ vendorAddress.street }}, {{ vendorAddress.postalCode }} {{ vendorAddress.city }}, {{ vendorAddress.country }}
  56.                     </div>
  57.                 {% endif %}
  58.                 {% if vendor.termsOfService %}
  59.                 <div class="text-sm font-normal text-left">
  60.                     <a href="{{ vendor.termsOfService }}" target="_blank" class="vendors-terms">{{ 'app.ui.terms_and_conditions' | trans }}</a>
  61.                 </div>
  62.                 {% endif %}
  63.                 <div class="vendor-products--vendor-description text-lg font-normal text-left expandable-content-container">
  64.                     {% if not vendor.translation.isReviewed and app.request.locale not in ['en', 'de'] %}
  65.                         <a class="ui ribbon label ai-label">{{ 'app.ui.brands_page.ai_generated' | trans }}</a>
  66.                     {% endif %}
  67.                     <span class="expandable-content">{{ vendor.description | raw }}</span>
  68.                 </div>
  69.             </h1>
  70.         </div>
  71.     </div>
  72.         {{ form_start(form, {'method': 'GET', 'attr': {'class': 'ui loadable form'}}) }}
  73.         {# Mobile Filter Toggle Button #}
  74.         {% include 'bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/mobileFilters.twig' with {'filterForm': form} %}
  75.         <div class="ui stackable grid">
  76.             <div class="four wide column">
  77.                 {% embed 'bundles/BitBagSyliusElasticsearchPlugin/Shop/Filters/filters.twig' with {
  78.                     'filterForm': form,
  79.                     'resetUrl': path('open_marketplace_shop_vendor_page_index', {'vendor_slug': vendor.slug})
  80.                 } %}
  81.                     {% block formContent %}
  82.                         {{ form_row(form.filters) }}
  83.                     {% endblock %}
  84.                 {% endembed %}
  85.             </div>
  86.             <div class="twelve wide column">
  87.                 {% if products|length > 0 %}
  88.                     <div class="category-products-grid store-page" id="products">
  89.                         {% for product in products %}
  90.                             <div class="column">
  91.                                 {% include '@SyliusShop/Product/_box.html.twig' %}
  92.                             </div>
  93.                         {% endfor %}
  94.                     </div>
  95.                     <div class="ui hidden divider"></div>
  96.                     {{ pagination.simple(products) }}
  97.                 {% else %}
  98.                     {{ messages.info('sylius.ui.no_results_to_display') }}
  99.                 {% endif %}
  100.             </div>
  101.         </div>
  102.         <button type="submit" style="display: none">
  103.             <i class="search icon"></i>
  104.             {{ 'bitbag_sylius_elasticsearch_plugin.ui.filter'|trans }}
  105.         </button>
  106.         {{ form_end(form, {'render_rest': false}) }}
  107.     <div class="ui clearing hidden divider"></div>
  108.     <script>
  109.         window.translations = {
  110.             readMore: "{{ 'app.ui.read_more'|trans|lower }}",
  111.             readLess: "{{ 'app.ui.read_less'|trans|lower }}"
  112.         };
  113.     </script>
  114. {% endblock %}