templates/network/horse/sections/horse_section_news.html.twig line 47

Open in your IDE?
  1. {# {% set news = auction.auctionhouse.news ? auction.auctionhouse.news.children : null %} #}
  2. <turbo-frame id="tab_content">
  3.   {% if app.user %}
  4.     {% do section_navigation_add({ name: 'press-releases', anchor: 'press-releases' }) %}
  5.     <section class="p-4 bg-white md:p-8 xl:p-16" id="press-releases">
  6.       {# <div class="container py-14"> #}
  7.       <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7">
  8.         {{ 'news'|trans }}
  9.       </h2>
  10.       <div data-turbo="false"
  11.         {{
  12.         react_component(
  13.           'NewsList',
  14.           { objectId: horse.id, objectType: horse.classId, limit: 3, locale: app.request.locale }
  15.         )
  16.         }}></div>
  17.       {# <turbo-frame id="horse-news"
  18.         src="{{
  19.         path(
  20.           'network_horse_news_frame',
  21.           { _locale: app.request.locale, id: horse.id }
  22.         )
  23.         }}"></turbo-frame> #}
  24.       {# </div> #}
  25.     </section>
  26.   {% elseif not app.user %}
  27.     {% do section_navigation_add({ name: 'press-releases', anchor: 'press-releases' }) %}
  28.     <section id="press-releases" class="container p-4 bg-white md:p-8 xl:p-16">
  29.       <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7">
  30.         {{ 'news'|trans }}
  31.       </h2>
  32.       {% include 'network/profile/components/login_required_hint.html.twig' %}
  33.     </section>
  34.   {% else %}
  35.     <section id="press-releases" class="container p-4 bg-white md:p-8 xl:p-16">
  36.       <h2 class="text-lg font-medium uppercase md:text-xl font-headline mb-7">
  37.         {{ 'news'|trans }}
  38.       </h2>
  39.       {{ 'no.horse.news.available'|trans }}
  40.     </section>
  41.   {% endif %}
  42.   <turbo-stream action="replace" target="tab_navigation">
  43.     <template>
  44.       {% include 'network/horse/components/tab_navigation_component.html.twig' with {
  45.         horse: horse,
  46.         highlightedTab: app.request.pathInfo
  47.       } %}
  48.     </template>
  49.   </turbo-stream>
  50. </turbo-frame>