templates/network/auction/widgets/auction_widget_auctionhouse.html.twig line 1

Open in your IDE?
  1. {# Address #}
  2. {% set title = 'auctionhouse'|trans %}
  3. {% embed 'network/widget/widget.html.twig' %}
  4.   {% block content %}
  5.     <div class="flex">
  6.       <div class="w-4 mr-4">
  7.         {% include 'icons/auction-house.svg.twig' with { class: 'w-4 h-4' } %}
  8.       </div>
  9.       <address class="flex flex-col not-italic leading-snug">
  10.         <span class="font-medium">{{ auction.auctionhouse.name }}</span>
  11.         <span>{{ auction.auctionhouse.street }}</span>
  12.         <span>{{ auction.auctionhouse.postalCode }} {{ auction.auctionhouse.city }}</span>
  13.         <span>{{ auction.auctionhouse.country|country_name }}</span>
  14.       </address>
  15.     </div>
  16.   {% endblock %}
  17. {% endembed %}
  18. {# Contact #}
  19. {% set title = null %}
  20. {% embed 'network/widget/widget.html.twig' %}
  21.   {% block content %}
  22.     {% import 'macros/button.macro.twig' as button %}
  23.     <div class="grid gap-2">
  24.       {% if auction.auctionhouse.phone %}
  25.         <div class="flex items-center text-neutral-900">
  26.           <div class="w-4 mr-4">
  27.             {% include 'icons/phone.svg.twig' with { class: 'w-4 h-4' } %}
  28.           </div>
  29.           <a data-turbo='false' class="font-bold no-underline" href="tel:+{{ auction.auctionhouse.phone }}">
  30.             {{ auction.auctionhouse.phone|trim }}
  31.           </a>
  32.         </div>
  33.       {% endif %}
  34.       {% if auction.auctionhouse.fax %}
  35.         <div class="flex items-center text-neutral-900">
  36.           <div class="w-4 mr-4">
  37.             {% include 'icons/fax.svg.twig' with { class: 'w-5 h-5 -ml-1px' } %}
  38.           </div>
  39.           <div class="font-bold">
  40.             {{ auction.auctionhouse.fax|trim }}
  41.           </div>
  42.         </div>
  43.       {% endif %}
  44.       {% if auction.auctionhouse.email %}
  45.         <div class="flex items-center text-neutral-900">
  46.           <div class="w-4 mr-4">
  47.             {% include 'icons/mail.svg.twig' with { class: 'w-4 h-4' } %}
  48.           </div>
  49.           <a data-turbo='false' class="font-bold no-underline" href="mailto:{{ auction.auctionhouse.email }}">
  50.             {{ auction.auctionhouse.email|trim }}
  51.           </a>
  52.         </div>
  53.       {% endif %}
  54.       {% if auction.auctionhouse.website %}
  55.         <div class="flex items-center truncate text-neutral-900">
  56.           <div class="w-5 mr-3">
  57.             {% include 'icons/weblink.svg.twig' with { class: 'w-5 h-5' } %}
  58.           </div>
  59.           <div class="font-bold">
  60.             <a data-turbo='false'  href="{{ auction.auctionhouse.website }}" target="_blank" rel="noopener noreferrer">
  61.               {{ auction.auctionhouse.website|default(auction.auctionhouse.website) }}
  62.             </a>
  63.           </div>
  64.         </div>
  65.       {% endif %}
  66.       {% set auctionhouseLink = pimcore_url({ object: auction.auctionhouse }) %}
  67.       {% if auctionhouseLink %}
  68.         {{
  69.           button.link(
  70.             'auctionhouse-link'|trans,
  71.             'primary',
  72.             auctionhouseLink,
  73.             { size: 'sm', icon_after: 'arrow-right-tail', attr: { class: 'mt-2', 'data-turbo': 'false' } }
  74.           )
  75.         }}
  76.       {% endif %}
  77.     </div>
  78.   {% endblock %}
  79. {% endembed %}
  80. {# Map #}
  81. {% embed 'network/widget/widget.html.twig' %}
  82.   {% block content %}
  83.     {% if auction.auctionhouse.geolocation %}
  84.       <div class="hidden xl:block aspect-w-16 aspect-h-9 xl:aspect-w-1 xl:aspect-h-1"
  85.         data-controller="leaflet"
  86.         data-leaflet-options-value="{{ {
  87.           center: [
  88.             auction.auctionhouse.geolocation.latitude,
  89.             auction.auctionhouse.geolocation.longitude
  90.           ],
  91.           zoom: 12
  92.         }|json_encode }}"
  93.         data-leaflet-marker-value="{{ [
  94.           {
  95.             geolocation: [
  96.               auction.auctionhouse.geolocation.latitude,
  97.               auction.auctionhouse.geolocation.longitude
  98.             ],
  99.             color: auction.auctionhouse.color.hex,
  100.             title: auction.auctionhouse.name,
  101.             text: auction.auctionhouse.street ~ '<br>' ~ auction.auctionhouse.postalCode ~ ' '
  102.               ~ auction.auctionhouse.city
  103.               ~ '<br>'
  104.               ~ (auction.auctionhouse.country|country_name)
  105.           }
  106.         ]|json_encode }}">
  107.         <template data-leaflet-target="markerTemplate">
  108.           <b>%title%</b><br />
  109.           <span>%text%</span><br />
  110.         </template>
  111.         <div class="w-full h-full map" data-leaflet-target="map"></div>
  112.       </div>
  113.     {% endif %}
  114.   {% endblock %}
  115. {% endembed %}