src/Package/Openform/Front/Templates/AntiqueSuit/_templates/_template-mobile.html.twig line 156

Open in your IDE?
  1. {% from '@openform_front_templates/_includes/_icons.html.twig' import fullscreen, zoomin, zoomout, sliderprev, slidernext, arrowright, copyrights, info, infoClose %}
  2. {% set ImageSlides = entity.ImageSlide|filterVisibles(app.request.locale) %}
  3. <section class="object-mobile js-collections">
  4.     <div class="collections-mobile__header" style="background: {{rootParent.headerBackground|default('#F1ECC5') }};">
  5.         {% if rootParent.logo[0] is defined ? rootParent.logo[0] %}
  6.             {% set imgLogo = openform_front_util.getImagePathByType(rootParent.logo[0].Thumb ?? '','logo') %}
  7.             <div class="collections-mobile__header__logotype">
  8.                 <img src="{{imgLogo}}" alt="{{rootParent.logo[0].Translation[app.request.locale].alt}}" title="{{rootParent.logo[0].Translation[app.request.locale].title}}">
  9.             </div>
  10.         {% endif %}
  11.             
  12.         <div class="collections-mobile__header__title">{{rootParent.Translation[app.request.locale].titleHtml|raw}}</div>
  13.         {# {% set href = toolkit_route_localizer.generate('relict_pack_item', { 'slug': parentPage.Translation[app.request.locale].slug}, app.request.locale) %}  #}
  14.         {% set href = toolkit_route_localizer.generate('antique_suit_item', {
  15.                     'slug': entity.AntiqueSuit.Translation[app.request.locale].slug
  16.                     }, app.request.locale) %} 
  17.                 {# <a href="{{href}}" class="object__nav__title">{{ entity.AntiqueSuit.Translation[app.request.locale].title }}</a> #}
  18.         <a class="collections-mobile__header__title" href="{{href}}">{{parentPage.Translation[app.request.locale].titleHtml|raw}}</a>
  19.     </div>
  20.     <div class="collections-mobile__arrows object-mobile__arrows" style="background: {{entity.background|default('#F8F7F0') }};">
  21.         {% for key, Antique in entity.AntiqueSuit.getVisibleAntiques(app.request.locale) %}
  22.                             {% if entity.id == Antique.id  %}
  23.                                 {% if entity.AntiqueSuit.getVisibleAntiques(app.request.locale)[key - 1] is defined %}
  24.                                     {% set prevElement = entity.AntiqueSuit.getVisibleAntiques(app.request.locale)[key - 1] %}
  25.                                     {% set href = toolkit_route_localizer.generate('antique_item',{ slug : prevElement.Translation[app.request.locale].slug }, app.request.locale) %}
  26.                                     <a href="{{href}}" class="object__nav__button-white" disabled>
  27.                                         {{ sliderprev('PREV_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  28.                                     </a>
  29.                                 {% else %}
  30.                                     <div>
  31.                                         
  32.                                     </div>
  33.                                 {% endif%}
  34.                                 {% if entity.Translation[app.request.locale].titleHtml is defined and entity.Translation[app.request.locale].titleHtml %}
  35.                                     <div class="collections-mobile__arrows__title">
  36.                                         {{ entity.Translation[app.request.locale].titleHtml|raw }}
  37.                                     </div>
  38.                                 {% endif %}
  39.                                 {% if entity.AntiqueSuit.getVisibleAntiques(app.request.locale)[key + 1] is defined %}
  40.                                     {% set nextElement = entity.AntiqueSuit.getVisibleAntiques(app.request.locale)[key + 1] %}
  41.                                     {% set href = toolkit_route_localizer.generate('antique_item',{ slug : nextElement.Translation[app.request.locale].slug }, app.request.locale) %}
  42.                                     <a href="{{href}}" class="object__nav__button-white" disabled>
  43.                                         {{ slidernext('Next_Relict'|trans({}, 'openform_front', app.request.locale)) }}
  44.                                     </a>
  45.                                 {% else %}
  46.                                     <div>
  47.                                         
  48.                                     </div>
  49.                                 {% endif %}
  50.                             {% endif %}
  51.         {% endfor %}
  52.     </div>
  53.     
  54.     <div class="collections-mobile__gallery">
  55.     {% if ImageSlides|length > 1 %}
  56.         <div class="js-collection-gallery-standard" >
  57.                     <div class="splide js-collections-gallery-mobile collection-gallery" aria-label="Galeria" >
  58.                         <div class="splide__track">
  59.                             <ul class="splide__list" >
  60.                                 {% for key, image in ImageSlides %}
  61.                                         {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','original') %}
  62.                                         {# {% set img = openform_front_util.getImagePathByType(image.Thumb ?? '','medium') %} #}
  63.                                         {% set imgPagination = openform_front_util.getImagePathByType(image.Thumb ?? '','list') %}
  64.                                         <li class="splide__slide">
  65.                                             <div class="js-zoom" data-alt="{{image.Translation[app.request.locale].alt}}">
  66.                                                 <div class="collection-gallery__item" style="width: 100%; aspect-ratio: 431 / 317;">
  67.                                                     <div class="my-zoomist" data-zoomist-src="{{img}}" data-alt="{{image.Translation[app.request.locale].alt}}"></div>
  68.                                                 </div>
  69.                                                 
  70.                                                 <div class="collection-gallery__wrap">
  71.                                                     <div class="collection-gallery__buttons">
  72.                                                         {% if image.Translation[app.request.locale].text is defined and image.Translation[app.request.locale].text %}
  73.                                                             <div class="object__info-wrap">
  74.                                                                 <button class="collection-gallery__buttons__btn" type="button" aria-expanded="false" data-expanded="js-info-{{key}}" tabindex="0">{{info(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
  75.                                                                 <div class="object__info js-info-{{key}}" data-lenis-prevent>
  76.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].text|raw}}</div>
  77.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  78.                                                                 </div>
  79.                                                             </div>
  80.                                                         {% endif %}
  81.                                                         {% if image.Translation[app.request.locale].copyrights %}
  82.                                                             <div class="object__info-wrap">
  83.                                                                 <button class="collection-gallery__buttons__btn" type="button" aria-expanded="false" data-expanded="js-copyright-{{key}}" tabindex="0">{{copyrights(('T_INFO')|trans({}, 'openform_front', app.request.locale))}}</button>
  84.                                                                 <div class="object__info js-copyright-{{key}}" data-lenis-prevent>
  85.                                                                     <div class="object__info__text block__text">{{image.Translation[app.request.locale].copyrights|raw}}</div>
  86.                                                                     <button class="object__info__close js-expanded-close" type="button">{{infoClose()}}</button>
  87.                                                                 </div>
  88.                                                             </div>
  89.                                                         {% endif %}
  90.                                                         
  91.                                                         <button class="collection-gallery__buttons__btn js-fullscreen" data-alt="{{image.Translation[app.request.locale].alt}}" tabindex="0" data-color="{{image.imageBackgroundColor is defined and image.imageBackgroundColor ? image.imageBackgroundColor }}"
  92.                                                         data-image="{{img}}"
  93.                                                         data-description="{{image.Translation[app.request.locale].text}}"
  94.                                                         data-copyrights="{{image.Translation[app.request.locale].copyrights}}"
  95.                                                         data-start="{{key}}"
  96.                                                                         data-imagestyle="{% if image.imageBorderColor and image.imageBorderWidth %}border: {{image.imageBorderColor}} solid {{image.imageBorderWidth}}px;{% endif %}"
  97.                                                         >
  98.                                                             {{fullscreen(('T_FULLSCREEN')|trans({}, 'openform_front', app.request.locale))}}
  99.                                                         </button>
  100.                                                         <button class="collection-gallery__buttons__btn js-zoom-out">{{zoomout(('T_ZOOMOUT')|trans({}, 'openform_front', app.request.locale))}}</button>
  101.                                                         <button class="collection-gallery__buttons__btn js-zoom-in">{{zoomin(('T_ZOOMIN')|trans({}, 'openform_front', app.request.locale))}}</button>
  102.                                                     </div>
  103.                                                 </div>
  104.                                             </div>
  105.                                         </li>
  106.                                 {% endfor %}                               
  107.                             </ul>
  108.                             <div class="splide__arrows">
  109.                                 <div class="slider-nav collections-mobile__gallery__nav">
  110.                                     <button class="splide__arrow splide__arrow--prev slider-nav__btn slider-nav__btn--prev" disabled>
  111.                                         {{ sliderprev('PREV_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  112.                                     </button>
  113.                                     <div class="slider-nav__info">
  114.                                         <span class="slider-nav__info__current js-slider-nav-current" aria-label="{{ 'CURRENT_PAGE'|trans({}, 'openform_front', app.request.locale) }}"></span><span class="slider-nav__info__all">/</span><span aria-label="{{ 'ALL_PAGE'|trans({}, 'openform_front', app.request.locale) }}" class="js-slider-nav-all slider-nav__info__all"></span>
  115.                                     </div>
  116.                                     <button class="splide__arrow splide__arrow--next slider-nav__btn slider-nav__btn--next">
  117.                                         {{ slidernext('NEXT_SLIDE'|trans({}, 'openform_front', app.request.locale)) }}
  118.                                     </button>
  119.                                 </div>
  120.                             </div>
  121.                         </div>
  122.                     </div>
  123.                 </div> 
  124.         {% endif %}
  125.     </div>
  126.     <div class="collections-mobile__content" style="background: {{rootParent.headerBackground|default('#F8F7F0') }};">
  127.        {% if entity.AntiqueSuit and entity.AntiqueSuit.AntiqueFormDesign == constant('\\App\\Package\\Openform\\Entity\\AntiqueSuit::ANTIQUE_FORM_DESIGN_MUSEUM') %}
  128.         
  129.         <div class="object__item">
  130.             <div class="object__item__section object__item__section--first">
  131.                
  132.                 {% if entity.Artist|length > 0 %}
  133.                     <div class="object__item-wrap object__item-wrap--author">
  134.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_AUTHOR')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  135.                         <div class="object__item-wrap__text">
  136.                             {% for artist in entity.Artist %}
  137.                                 <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?artist={{ artist.fullName }}">
  138.                                     {{artist.fullName ? artist.fullName }}
  139.                                 </a>{{entity.Artist|length > 1 ? ', '}}
  140.                             {% endfor %}
  141.                         </div>
  142.                     </div>
  143.                 {% endif %}
  144.                 {% if (entity.date or entity.dateTo or entity.age or  entity.ageTo or entity.year or entity.yearTo) %}
  145.                     <div class="object__item-wrap">
  146.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_DATE')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  147.                         <div class="object__item-wrap__text">
  148.                             {% include('@openform_front_templates/AntiqueSuit/_templates/_fields/_dates_and_ages.html.twig') with {
  149.                                 'dateFrom': entity.date, 
  150.                                 'dateTo': entity.dateTo,
  151.                                 'ageFrom': entity.age, 
  152.                                 'ageTo': entity.ageTo,
  153.                                 'yearFrom': entity.year ?? entity.shownObjectYear, 
  154.                                 'yearTo': entity.yearTo ?? entity.shownObjectAge,
  155.                             } %}
  156.                         </div>
  157.                     </div>
  158.                 {% endif %}
  159.                 {% if entity.AntiqueType|length > 0 %}
  160.                     <div class="object__item-wrap">
  161.                         <h3 class="object__item-wrap__title">{{('T_OBJECT_TYPE')|trans({}, 'openform_front', app.request.locale) ~ ': ' }}</h3>
  162.                         <div class="object__item-wrap__text">
  163.                             {% for key, item in entity.AntiqueType %}
  164.                                 <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?antiqueType={{ item.Translation[app.request.locale].title }}">
  165.                                     {{ item.Translation[app.request.locale].title }}
  166.                                 </a>{% if not loop.last %}, {% endif %}
  167.                             {% endfor %}
  168.                         </div>
  169.                     </div>
  170.                 {% endif %}
  171.                 {% if entity.AntiqueTechnique|length > 0 %}
  172.                     <div class="object__item-wrap">
  173.                         <h3 class="object__item-wrap__title">{{('T_MATERIALS_AND_TECHNIQUES')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  174.                         <div class="object__item-wrap__text">
  175.                             {% for item in entity.AntiqueTechnique %}
  176.                                 <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?antiqueTechnique={{ item.Translation[app.request.locale].title }}">
  177.                                     {{item.Translation[app.request.locale].title ? item.Translation[app.request.locale].title}}
  178.                                 </a>{% if not loop.last %}, {% endif %}
  179.                             {% endfor %}
  180.                         </div>
  181.                     </div>
  182.                 {% endif %}
  183.                 {% if entity.Translation[app.request.locale].text %}
  184.                     <div class="object__item-wrap object__item-wrap--description object__item-wrap--description-master js-text-dropdown" data-limit="6" data-lineHeight="22">
  185.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_DESCRIPTION')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  186.                         <div class="object__item-wrap__text">
  187.                         <span class="js-text-dropdown-content">{{entity.Translation[app.request.locale].text|raw}}</span> <button class="js-text-dropdown-btn hide"><span>{{('T_TEXT_SHOW_MORE')|trans({}, 'openform_front', app.request.locale) }} ▼</span><span>{{('T_TEXT_SHOW_LESS')|trans({}, 'openform_front', app.request.locale) }} ▲</span></button>
  188.                             
  189.                         </div>
  190.                     </div>
  191.                 {% endif %}
  192.                 {% if entity.AntiqueCopyrights|length > 0 %}
  193.                     <div class="object__item-wrap">
  194.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_COPYRIGHTS')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  195.                         <div class="object__item-wrap__text object__item-wrap__copyright">
  196.                             {% for key, item in entity.AntiqueCopyrights %}
  197.                                 <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?antiqueCopyrights={{ item.Translation[app.request.locale].title }}">
  198.                                     {{ item.Translation[app.request.locale].title }}
  199.                                 </a>{% if not loop.last %}, {% endif %}
  200.                             {% endfor %}
  201.                         </div>
  202.                     </div>
  203.                 {% endif %}
  204.                             
  205.             </div>
  206.             
  207.         </div>
  208.         {% else %}
  209.             
  210.         {# ------------------------Archive--------------------------- #}
  211.         <div class="object__item">
  212.             <div class="object__item__section object__item__section--first">
  213.                 {% if entity.Translation[app.request.locale].descPlace %}
  214.                     <div class="object__item-wrap">
  215.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_PLACE_DESC')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  216.                         <div class="object__item-wrap__text">
  217.                             {{entity.Translation[app.request.locale].descPlace}}
  218.                         </div>
  219.                     </div>
  220.                 {% endif %}
  221.                 {% if entity.AntiquePlace %}
  222.                     <div class="object__item-wrap">
  223.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_OBJECT_PLACE')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  224.                         <div class="object__item-wrap__text">
  225.                             {{entity.AntiquePlace.Translation[app.request.locale].title}}
  226.                         </div>
  227.                     </div>
  228.                 {% endif %}
  229.                 {% if entity.documentDate or entity.documentAge or entity.documentYear %}
  230.                     <div class="object__item-wrap">
  231.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_DOCUMENT_DATE')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  232.                         <div class="object__item-wrap__text">
  233.                             {% include('@openform_front_templates/AntiqueSuit/_templates/_fields/_date_and_age_search.html.twig') with {
  234.                                 'date': entity.documentDate,
  235.                                 'age': entity.documentAge,
  236.                                 'year': entity.documentYear,
  237.                             } %}
  238.                         </div>
  239.                     </div>
  240.                 {% endif %}
  241.                 {% if entity.Artist|length > 0 %}
  242.                     <div class="object__item-wrap">
  243.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_AUTHOR_OF_THE_PHOTOGRAPH_OR_DOCUMENT')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  244.                         <div class="object__item-wrap__text">
  245.                             {% for artist in entity.Artist %}
  246.                                 <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?artist={{ artist.fullName }}">
  247.                                     {{artist.fullName ? artist.fullName }} {{ artist.authorNickName ? '"' ~ artist.authorNickName ~ '"'}}
  248.                                 </a>{{entity.Artist|length > 1 ? ', '}}
  249.                             {% endfor %}
  250.                         </div>
  251.                     </div>
  252.                 {% endif %}
  253.                 {% if entity.AntiqueType|length > 0 %}
  254.                     <div class="object__item-wrap">
  255.                         <h3 class="object__item-wrap__title">{{('T_OBJECT_TYPE')|trans({}, 'openform_front', app.request.locale) ~ ': ' }}</h3>
  256.                         <div class="object__item-wrap__text">
  257.                             {% for key, item in entity.AntiqueType %}
  258.                                 <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?antiqueType={{ item.Translation[app.request.locale].title }}">
  259.                                     {{ item.Translation[app.request.locale].title }}
  260.                                 </a>{% if not loop.last %}, {% endif %}
  261.                             {% endfor %}
  262.                         </div>
  263.                     </div>
  264.                 {% endif %}
  265.                 {% if entity.AntiqueTechnique|length > 0 %}
  266.                     <div class="object__item-wrap">
  267.                         <h3 class="object__item-wrap__title">{{('T_MATERIALS_AND_TECHNIQUES')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  268.                         <div class="object__item-wrap__text">
  269.                             {% for item in entity.AntiqueTechnique %}
  270.                                 <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?antiqueTechnique={{ item.Translation[app.request.locale].title }}">
  271.                                     {{item.Translation[app.request.locale].title ? item.Translation[app.request.locale].title}}
  272.                                 </a>{% if not loop.last %}, {% endif %}
  273.                             {% endfor %}
  274.                         </div>
  275.                     </div>
  276.                 {% endif %}
  277.                 {% if entity.Translation[app.request.locale].text %}
  278.                     <div class="object__item-wrap object__item-wrap--description object__item-wrap--description-master js-text-dropdown" data-limit="6" data-lineHeight="22">
  279.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_DESCRIPTION')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  280.                         <div class="object__item-wrap__text">
  281.                         <span class="js-text-dropdown-content">{{entity.Translation[app.request.locale].text|raw}}</span> <button class="js-text-dropdown-btn hide"><span>{{('T_TEXT_SHOW_MORE')|trans({}, 'openform_front', app.request.locale) }} ▼</span><span>{{('T_TEXT_SHOW_LESS')|trans({}, 'openform_front', app.request.locale) }} ▲</span></button>
  282.                             
  283.                         </div>
  284.                     </div>
  285.                 {% endif %}
  286.                 {% if entity.AntiqueCopyrights|length > 0 %}
  287.                     <div class="object__item-wrap">
  288.                         <h3 class="object__item-wrap__title">{{('T_ANTIQUE_COPYRIGHTS')|trans({}, 'openform_front', app.request.locale) }}:</h3>
  289.                         <div class="object__item-wrap__text object__item-wrap__copyright">
  290.                             {% for key, item in entity.AntiqueCopyrights %}
  291.                                 <a href="{{ toolkit_route_localizer.generate('search', {}, app.request.locale) }}?antiqueCopyrights={{ item.Translation[app.request.locale].title }}">
  292.                                     {{ item.Translation[app.request.locale].title }}
  293.                                 </a>{% if not loop.last %}, {% endif %}
  294.                             {% endfor %}
  295.                         </div>
  296.                     </div>
  297.                 {% endif %}
  298.                             
  299.             </div>
  300.             
  301.         </div>
  302.         {% endif %}
  303.         {% include '@openform_front_templates/AntiqueSuit/_templates/_sections/_all-sections.html.twig' with {design: "single"} %}
  304.     </div>
  305.     {% include "@openform_front_templates/_blocks_sections/block.html.twig" with { sections: openform_front_util.getSections(entity) } %}
  306. </section>