src/Package/Openform/Front/Templates/AntiqueSuit/_templates/_template-4.html.twig line 139

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