templates/network/profile/sections/profile_section_news.html.twig line 1

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