templates/front/main_page.twig line 1

Open in your IDE?
  1. {% extends "front/layouts/default.twig" %}
  2. {% block content %}
  3.     {% set arrayOffer = {pl:'oferta',en:'offer'} %}
  4.     
  5.     {% include 'front/main_page/includes/main_page_offer_search.twig' with { main_page_search } %}
  6.     <section class="jobs">
  7.         <div class="container">
  8.             <div class="row justify-content-center">
  9.                 <div class="col-12">
  10.                     <div class="row align-items-center">
  11.                         <div class="col-lg-12 px-lg-0">
  12.                             {% for message in app.flashes('response_message') %}
  13.                                 <div class="row mt-3">
  14.                                     <div class="alert" style="font-size: 15px;">
  15.                                         {{ message|raw }}
  16.                                     </div>
  17.                                 </div>
  18.                             {% endfor %}
  19.                         </div>
  20.                     </div>
  21.                 </div>
  22.             </div>
  23.         </div>
  24.      
  25.         {% for industryWithOffer in industrys|default([]) %}
  26.             <div class="container">
  27.                 <div class="row justify-content-center">
  28.                     <div class="col-12">
  29.                         <div class="row align-items-center">
  30.                             <div class="col-lg-12 job px-lg-0">
  31.                                 <a href="{{ path('front-page', {url: get_page_url(app.request.locale, constant('App\\Config\\Pages::OFFERS_INDUSTRY'))}) }}" data-filter-key="filters[industry][]" data-filter="{{ industryWithOffer.industry.searchSlug }}" class="search-button-list">
  32.                                 <span class="industry">
  33.                                 {% if app.request.locale == 'pl' %}
  34.                                     <h2>{{ industryWithOffer.industry.name|default(industryWithOffer.industry.nameEn) }}</h2>
  35.                                 {% endif %}
  36.                                     {% if app.request.locale == 'en' %}
  37.                                         <h2>{{ industryWithOffer.industry.nameEn|default(industryWithOffer.industry.name) }}</h2>
  38.                                     {% endif %}
  39.                                 </span>
  40.                                 </a>
  41.                             </div>
  42.                             {% for offer in industryWithOffer.offers %}
  43.                                 {% set arrayOfferName = {
  44.                                     pl: offer.offerNamePL|default(offer.offerNameEN),
  45.                                     en: offer.offerNameEN|default(offer.offerNamePL)
  46.                                 } %}
  47.                                 {% set boxToken = generate_token() %}
  48.                                 <div class="col-lg-12 job py-3 py-lg-2 {% if offer.localizationCount > 1 %} offer_name_show_list_location {% endif %}" data-id="{{ boxToken }}" data-localization="{{ offer.localizationCount }}">
  49.                                     {% if offer.localizationCount <= 1 %}
  50.                                         <a href="{{ path('front-offer', queryParams|default([])|merge({ _locale: offer.language|default('pl'), offer: arrayOffer[app.request.locale],  temporaryId: offer.temporaryId ,branch_extra: slug(arrayOfferName[offer.language|default('pl')])})) }}" class="">
  51.                                     {% endif %}
  52.                                         <div class="row align-items-sm-center align-content-sm-center">
  53.                                             <div class="job__image col-3 col-lg-2 text-lg-center">
  54.                                                 <img src="{{ offer.offerCompany is defined and offer.offerCompany is not null and offer.offerCompany.logo.fileName is null or offer.offerCompany.logo.extension is null ? asset('/default_photo/logo_default.png')|imagine_filter('logo_offer') : asset('firm/' ~ offer.offerCompany.logo.fileName|default('') ~ '.' ~ offer.offerCompany.logo.extension|default(''))|default()|imagine_filter('logo_offer') }}" class="img-fluid" alt="">
  55.                                             </div>
  56.                                             <div class="job__type col-9 col-lg-4">
  57.                                                 <h3 class="job__position " >{{ arrayOfferName[offer.language|default('pl')] }}</h3>
  58.                                                 <div class="job__company">{{ offer.offerCompany.invoiceData.name|default(' - ') }}</div>
  59.                                             </div>
  60.                                             <div class="col-md-8 col-lg-4 col-sm-8 col-12 mt-3 mt-lg-0">
  61.                                                 <div class="row">
  62.                                                     <div class="job__localization my-lg-2 col-sm-6 col-6">
  63.                                                         <div class="row align-content-center align-items-center">
  64.                                                             <div class="col-1 col-sm-2 col-xl-1 localization-wrapper">
  65.                                                                 <i class="fas fa-map-marker-alt"></i>
  66.                                                             </div>
  67.                                                             {% if offer.workData|default(null) %}
  68.                                                                 {% if offer.workData.address.city|default(null) %}
  69.                                                                     {% if offer.offers|default(null) is not null and offer.localizationCount > 1 %}
  70.                                                                         <div class="col"><span class="offer_show_list_location" data-id="{{ boxToken }}" data-localization="{{ offer.localizationCount }}">{{ offer.localizationCount }} {{ get_many_location(offer.localizationCount, app.request.locale) }}</span></div>
  71.                                                                         <div class="col-12"></div>
  72.                                                                         <div class="col-1 col-sm-2 col-xl-1 localization-wrapper"></div>
  73.                                                                         <div class="col box_many_location box_many_location_{{ boxToken }} mt-2" style="display: none">
  74.                                                                         {% for childOffer in offer.offers|default([]) %}
  75.                                                                             {% if childOffer.workData.address.city|default(null) is not iterable %}
  76.                                                                                 <div class="col-12"></div>
  77.                                                                                 <div class="col-1 col-sm-2 col-xl-1"></div>
  78.                                                                                 <div class="col element_many_location" style="margin-top: 8px">
  79.                                                                                     <a href="{{ path('front-offer', queryParams|default([])|merge({ _locale: childOffer.language|default('pl'), offer: arrayOffer[app.request.locale],  temporaryId: childOffer.temporaryId ,branch_extra: slug(arrayOfferName[childOffer.language|default('pl')])})) }}" onclick="event.stopPropagation()" class="">
  80.                                                                                     {{ childOffer.workData.address.city|default('') }}
  81.                                                                                     </a>
  82.                                                                                 </div>
  83.                                                                             {% endif %}
  84.                                                                         {% endfor %}
  85.                                                                         </div>
  86.                                                                     {% else %}
  87.                                                                         {% if offer.workData.address.city|default([]) is iterable %}
  88.                                                                             <div class="col">{{ offer.workData.address.city.0|default('-') }}</div>
  89.                                                                         {% else %}
  90.                                                                             <div class="col">{{ offer.workData.address.city|default('-') }}</div>
  91.                                                                         {% endif %}
  92.                                                                     {% endif %}
  93.                                                                 {% endif %}
  94.                                                             {% else %}
  95.                                                                 <div class="col">{{ 'MAIN_PAGE.NONE'|trans }}</div>
  96.                                                             {% endif %}
  97.                                                         </div>
  98.                                                     </div>
  99.                                                     <div class="job__salary col-sm-6  my-lg-2 col-6">
  100.                                                         {% set break = false %}
  101.                                                         {% for data in offer.salaryData  %}
  102.                                                             {% if data.checked is defined and data != '' %}
  103.                                                                 {% if data.checked != '' and data.from != '' and data.to != '' and break == false %}
  104.                                                                     {{ data.from|number_format(0, ' ', ' ')|default }} - {{ data.to|number_format(0, ' ', ' ')|default }} {{ data.currency|default }}
  105.                                                                     {% set break = true %}
  106.                                                                 {% endif %}
  107.                                                             {% endif %}
  108.                                                         {% endfor %}
  109.                                                     </div>
  110.                                                 </div>
  111.                                             </div>
  112.                                             <div class="job__info mt-3 my-lg-2 col-md-4 col-lg-2 col-sm-4 col-6 d-none d-sm-block">
  113.                                                 {% if offer.workData != null and offer.workData != '' %}
  114.                                                     {% if offer.workData.remote_work is defined and offer.workData.remote_work != '' %}
  115.                                                         {% if offer.workData.remote_work.checked == true %}
  116.                                                             <div class="job__recruitment"><i class="fmx-lg-2 fas fa-check"></i>{{ 'MAIN_PAGE.REMOTE'|trans }}{% if offer.workData.remote_work.option != null %}: {{ offer.workData.remote_work.option|default }} %{% endif %}</div>
  117.                                                         {% else %}
  118.                                                             <div class="job__recruitment"><i class="fmx-lg-2 fas fa-check"></i>{{ 'MAIN_PAGE.OFFICE'|trans }}</div>
  119.                                                         {% endif %}
  120.                                                     {% endif %}
  121.                                                     {% if offer.workData.recruitment_remote is defined and offer.workData.recruitment_remote != '' %}
  122.                                                         {% if offer.workData.recruitment_remote.checked == true %}
  123.                                                             <div class="job__recruitment"><i class="fmx-lg-2 fas fa-check"></i>{{ 'MAIN_PAGE.REMOTE_RECRUITMENT'|trans }}</div>
  124.                                                         {% endif %}
  125.                                                     {% endif %}
  126.                                                 {% else %}
  127.                                                     {{ 'MAIN_PAGE.NONE'|trans }}
  128.                                                 {% endif %}
  129.                                             </div>
  130.                                         </div>
  131.                                     {% if offer.localizationCount <= 1 %}
  132.                                         </a>
  133.                                     {% endif %}
  134.                                 </div>
  135.                             {% endfor %}
  136.                         </div>
  137.                     </div>
  138.                     
  139.                     <div class="col-12">
  140.                         <div class="row justify-content-center">
  141.                             <div class="col-12 text-center">
  142.                                 <a href="{{ path('front-page', {url: get_page_url(app.request.locale, constant('App\\Config\\Pages::OFFERS_INDUSTRY'))})}}"
  143.                                    type="button"
  144.                                    data-filter-key="filters[industry][]"
  145.                                    data-filter="{{ industryWithOffer.industry.searchSlug|default('') }}"
  146.                                    class="btn btn-secondary search-button-list my-4">
  147.                                     {{'USER_ZONE.HOME_PAGE.BUTTON_OFFERS'|trans}}
  148.                                 </a>
  149.                             </div>
  150.                         </div>
  151.                     </div>
  152.                 </div>
  153.             </div>
  154.         {% endfor %}
  155.     </section>
  156.     <div class="container categories">
  157.         <div class="row justify-content-center my-4">
  158.             <div class="col-12">
  159.                 <div class="row ">
  160.                     <div class="col-lg-4 ">
  161.                         <div class="categories__type row col-lg-12 px-0 mx-0  mt-4">
  162.                             <div class="col-4 d-inline-block px-0 mx-0">
  163.                                 <h2 class="text-quinary">{{'USER_ZONE.HOME_PAGE.TEXT_CATEGORIES_1'|trans}}</h2>
  164.                             </div>
  165.                         </div>
  166.                         <div class="
  167.               col-lg-12
  168.               categories__item
  169.               border-start border-1 border-dark
  170.               px-2
  171.             " id="categories-left">
  172.                             <div class="categories__list">
  173.                                 <ul>
  174.                                     {% for industry in industry_list_footer %}
  175.                                         {% if app.request.locale == 'pl' %}
  176.                                             {% if industry.name|default('') != '' %}
  177.                                                 <li><a href="{{ path('front-page', {url: get_page_url(app.request.locale, constant('App\\Config\\Pages::OFFERS_INDUSTRY'))}) }}?filters[industry][]={{ get_slug(industry.nameEn != '' ? industry.nameEn : industry.name) }}">{{ industry.name|default('') }}</a></li>
  178.                                             {% endif %}
  179.                                         {% else %}
  180.                                             {% if industry.nameEn|default('') != '' %}
  181.                                                 <li><a href="{{ path('front-page', {url: get_page_url(app.request.locale, constant('App\\Config\\Pages::OFFERS_INDUSTRY'))}) }}?filters[industry][]={{ get_slug(industry.nameEn != '' ? industry.nameEn : industry.name)  }}">{{ industry.nameEn|default('') }}</a></li>
  182.                                             {% endif %}
  183.                                         {% endif %}
  184.                                     {% endfor %}
  185.                                 </ul>
  186.                             </div>
  187.                         </div>
  188.                     </div>
  189.                     <div class="col-lg-4">
  190.                         <div class="categories__type row col-lg-12 px-0 mx-0 mt-4">
  191.                             <div class="col-4 d-inline-block px-0 mx-0">
  192.                                 <h2 class="text-quinary">{{'USER_ZONE.HOME_PAGE.TEXT_CATEGORIES_2'|trans}}</h2>
  193.                             </div>
  194.                         </div>
  195.                         <div class="
  196.               col-lg-12
  197.               categories__item
  198.               border-start border-1 border-dark
  199.               px-2
  200.             " id="categories-middle">
  201.                             <div class="categories__list">
  202.                                 <ul>
  203.                                     {% for popular in popular_list_footer %}
  204.                                       {% if app.request.locale == 'pl' %}
  205.                                             {% if popular.name != '' %}
  206.                                                 <li><a href="{{ path('front-page', {url: get_page_url(app.request.locale, constant('App\\Config\\Pages::OFFERS_INDUSTRY'))}) }}?filters[technology][]={{ get_slug(popular.name != '' ? popular.name : popular.nameEn) }}">{{popular.name|default('')}}</a></li>
  207.                                             {% endif %}
  208.                                       {% else %}
  209.                                             {% if popular.nameEn != '' %}
  210.                                                 <li><a href="{{ path('front-page', {url: get_page_url(app.request.locale, constant('App\\Config\\Pages::OFFERS_INDUSTRY'))}) }}?filters[technology][]={{ get_slug(popular.name != '' ? popular.name : popular.nameEn) }}">{{ popular.nameEn|default('') }}</a></li>
  211.                                             {% endif %}
  212.                                       {% endif %}
  213.                                     {% endfor %}
  214.                                 </ul>
  215.                             </div>
  216.                         </div>
  217.                     </div>
  218.                     <div class="col-lg-4">
  219.                         <div class="categories__type row col-lg-12 px-0 mx-0 mt-4">
  220.                             <div class="col-4 d-inline-block px-0 mx-0">
  221.                                 <h2 class="text-quinary">{{'USER_ZONE.HOME_PAGE.TEXT_CATEGORIES_3'|trans}}</h2>
  222.                             </div>
  223.                         </div>
  224.                         <div class="
  225.               col-lg-12
  226.               categories__item
  227.               border-start border-1 border-dark
  228.               px-2
  229.             " id="categories-right">
  230.                             <div class="categories__list">
  231.                                 <ul>
  232.                                     {% for city in city_list_footer %}  
  233.                                         <li><a href="{{ path('front-page', {url: get_page_url(app.request.locale, constant('App\\Config\\Pages::OFFERS_INDUSTRY'))}) }}?filters[location][]={{ get_slug(city.name) }}">{{ city.name }}</a></li>
  234.                                     {% endfor %}
  235.                                 </ul>
  236.                             </div>
  237.                         </div>
  238.                     </div>
  239.                     <div class="row">
  240.                         <div class="col-12 mt-4 mx-3 border-bottom border-dark border-1"></div>
  241.                     </div>
  242.                 </div>
  243.             </div>
  244.         </div>
  245.     </div>
  246.     {% include 'front/includes/alert_cookies.twig'  %}
  247.     {% if seo is defined %}
  248.         {% include 'front/main_page/includes/section/section_seo.twig' with { seo } %}
  249.     {% endif %}
  250. {% endblock %}
  251. {% block script %}
  252.     {{ parent() }}
  253.     {% include 'front/main_page/includes/js/main_page_js.twig' %}
  254. {% endblock %}