src/Notaris/FrontendBundle/Resources/views/tv/detail.html.twig line 1

Open in your IDE?
  1. {% extends '@NotarisFrontend/layout2017.html.twig' %}
  2. {% if notaryId is defined %}
  3.     {% set headTitle = info.header1  | replace({"<BR />":" "}) ~ ' - ' ~  subsite.pageTitle %}
  4. {% else %}
  5.     {% set headTitle = subsite.pageTitle %}
  6.     {% if section.meta.ogTitle and section.parent and section.parent.meta.ogTitle %}
  7.         {% set headTitle = section.meta.ogTitle | trans ~ " | " ~ section.parent.meta.ogTitle | trans %}
  8.     {% endif %}
  9.     {% set headTitle = headTitle ~ ' ' ~ 'alg_basetitle' | trans %}
  10. {% endif %}
  11. {% set linked_url_nl = url_nl ~ path('notaris_frontend_tv') %}
  12. {% set linked_url_fr = url_fr ~ path('notaris_frontend_tv') %}
  13. {% block title %}
  14.     <title>{{ headTitle }}</title>
  15. {% endblock %}
  16. {% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_tv_detail', {slug: pageslug}) %}
  17. {% block extralinks %}
  18.         <link rel="canonical" href="{{ canonicalLink }}"  />
  19. {% endblock %}
  20. {% block extrameta %}
  21.     {{ parent() }}
  22.     <meta name="keywords" content="{{ section.meta.metaKeywords }}"/>
  23.     <meta name="description" lang="{{ locale }}" content="{{ section.meta.metaDescription }}"/>
  24.     <meta property="og:title" content="{{ headTitle }}" />
  25.     <meta property="og:type" content="website" />
  26.     <meta property="og:url" content="{{ canonicalLink }}" />
  27.     {% if section.meta.ogDescription %}
  28.         <meta property="og:description" content="{{ section.meta.ogDescription }}" />
  29.     {% endif %}
  30. {% endblock %}
  31. {% block body %}
  32.     <section class="content u-padding-top-large">
  33.         {{ include('@NotarisFrontend/module/sidenav.html.twig', {'subsite': subsite }) }}
  34.         <div id="content-center" class="content-center-large standard">
  35.             <div id="content-center-header">
  36.                 <article class="niveau3 fillcolor">
  37.                     <div class="article-content">
  38.                         <h2>{{ section.title }}</h2>
  39.                         {{ section.description | raw }}
  40.                         {% if total %}<p>{{ total }} {{ 'tv_videos_beschikbaar' | trans | raw }}</p>{% endif %}
  41.                     </div>
  42.                 </article>
  43.             </div>
  44.             {% if totalpages > 1 %}
  45.                 <div class="prevnext-pages border-bottom">
  46.                     {% if currentpage + 1 != 1 %}
  47.                         {% if currentpage  == 1 %}
  48.                                 <a href="{{ path('notaris_frontend_tv_detail', {'slug': pageslug}) }}">{{ 'vorige' | trans | raw }}</a>
  49.                         {% else %}
  50.                                 <a href="{{ path('notaris_frontend_tv_detail_page', {'page': currentpage - 1, 'slug': pageslug}) }}">{{ 'vorige' | trans | raw }}</a>
  51.                         {% endif %}
  52.                     {% else %}
  53.                         <span>{{ 'vorige' | trans | raw }}</span>
  54.                     {% endif %}
  55.                     {% set count = 0 %}
  56.                     {% set vispages = 4 %}
  57.                     {% set index = 0 %}
  58.                     {% if currentpage + 1 <= 2 %}
  59.                         {% set start = 1 %}
  60.                     {% else %}
  61.                         {% set start = currentpage + 1 - 2 %}
  62.                         {% set vispages = vispages + 1 %}
  63.                     {% endif %}
  64.                     {% if start + 4> totalpages %}
  65.                         {% set start = totalpages - 3  %}
  66.                     {% endif %}
  67.                     {% if start < 1 %}
  68.                         {% set start = 1 %}
  69.                     {% endif %}
  70.                     {% if start != 1 %}
  71.                         <span>...</span>
  72.                     {% endif %}
  73.                     {% for  i in start..totalpages %}
  74.                         {% set count = count + 1 %}
  75.                         {% if count <= vispages %}
  76.                             {% set index = i %}
  77.                             {% if i == currentpage + 1 %}
  78.                                 <span class="current">{{ i }}</span>
  79.                             {% else %}
  80.                                 {% if i == 1 %}
  81.                                     <a href="{{ path('notaris_frontend_tv_detail', {'slug': pageslug}) }}">{{ i }}</a>
  82.                                 {% else %}
  83.                                     <a href="{{ path('notaris_frontend_tv_detail_page', {'page': i - 1, 'slug': pageslug}) }}">{{ i }}</a>
  84.                                 {% endif %}
  85.                             {% endif %}
  86.                         {% endif %}
  87.                     {% endfor %}
  88.                     {% if index != totalpages %}
  89.                         <span>...</span>
  90.                     {% endif %}
  91.                     {% if currentpage + 1 != totalpages %}
  92.                         <a href="{{ path('notaris_frontend_tv_detail_page', {'page': currentpage + 1, 'slug': pageslug}) }}">{{ 'volgende' | trans | raw }}</a>
  93.                     {% else %}
  94.                         <span>{{ 'volgende' | trans | raw }}</span>
  95.                     {% endif %}
  96.                 </div>
  97.             {% endif %}
  98.             <section id="info" class="no-margin">
  99.                 <div id="info-content" class="niveau1 info-news-content c-movies">
  100.                     {% for video in videos %}
  101.                     <div class="c-movies__item">
  102.                         <a href="{{ path('notaris_frontend_tv_detail_video', {'slug': pageslug, 'slugvideo': video.slug}) }}" title="{{ video.title }}" class="o-grid__item o-object-fit c-movies__link {% if video.asset.assetImages | length == 0 %}o-grid__item--overlay{% endif %}" data-slug="{{ video.slug }}">
  103.                             {% if video.asset.assetImages | length > 0 %}
  104.                                 {% set image_path = 'uploads/'~ locale ~ '/' ~ video.asset.assetImages[0].image.filename %}
  105.                                 {{image_path | responsive_image_source([448, 353, 436], {'filterset': 'responsive_article_image', 'sizes': '(min-width: 960px) 448px, (min-width: 768px and max-width: 960px) 353px, (min-width: 480px and max-width: 768px) 436px, (max-width: 480px) 100vw', 'alt': video.title, 'title': video.title}) }}
  106.                             {% endif %}
  107.                             <div class="c-movies__overlay">
  108.                                 <div class="o-grid__item__overlay__title c-movies__info">
  109.                                     <h3 class="u-h4">{{ video.title }}</h3>
  110.                                 </div>
  111.                                 <button class="c-btn c-btn--icon c-btn--icon--large c-btn__play">
  112.                                     <svg width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><style>.z{fill:#FFF;}</style><path class="z" d="M1576 927L248 1665q-23 13-39.5 3t-16.5-36V160q0-26 16.5-36t39.5 3l1328 738q23 13 23 31t-23 31z" fill="true"/></svg>
  113.                                 </button>
  114.                             </div>
  115.                             <div class="c-movies__info-back">
  116.                                 <span class="c-movies__meta">{{ video.publicationDate | localdate }}</span><br>
  117.                                 <span class="c-movies__meta c-movies__meta--theme">{{ 'tv_rubriek'|trans }}:</span>
  118.                                 <span class="c-movies__meta">{% for subsite in video.subsites %}{{ subsite.subsite.name }}{% if loop.last and not video.isVaria %}{% else %}, {% endif %}{% endfor %}{% if video.isVaria %}{{ 'tv_varia_tekst' | trans }}{% endif %}</span>
  119.                             </div>
  120.                         </a>
  121.                     </div>
  122.                     {% endfor %}
  123.                 </div>
  124.             </section>
  125.             {% if totalpages > 1 %}
  126.                 <div class="prevnext-pages">
  127.                     {% if currentpage + 1 != 1 %}
  128.                         {% if currentpage  == 1 %}
  129.                             <a href="{{ path('notaris_frontend_tv_detail', {'slug': pageslug}) }}">{{ 'vorige' | trans | raw }}</a>
  130.                         {% else %}
  131.                             <a href="{{ path('notaris_frontend_tv_detail_page', {'page': currentpage - 1, 'slug': pageslug}) }}">{{ 'vorige' | trans | raw }}</a>
  132.                         {% endif %}
  133.                     {% else %}
  134.                         <span>{{ 'vorige' | trans | raw }}</span>
  135.                     {% endif %}
  136.                     {% set count = 0 %}
  137.                     {% set vispages = 4 %}
  138.                     {% set index = 0 %}
  139.                     {% if currentpage + 1 <= 2 %}
  140.                         {% set start = 1 %}
  141.                     {% else %}
  142.                         {% set start = currentpage + 1 - 2 %}
  143.                         {% set vispages = vispages + 1 %}
  144.                     {% endif %}
  145.                     {% if start + 4> totalpages %}
  146.                         {% set start = totalpages - 3  %}
  147.                     {% endif %}
  148.                     {% if start < 1 %}
  149.                         {% set start = 1 %}
  150.                     {% endif %}
  151.                     {% if start != 1 %}
  152.                         <span>...</span>
  153.                     {% endif %}
  154.                     {% for  i in start..totalpages %}
  155.                         {% set count = count + 1 %}
  156.                         {% if count <= vispages %}
  157.                             {% set index = i %}
  158.                             {% if i == currentpage + 1 %}
  159.                                 <span class="current">{{ i }}</span>
  160.                             {% else %}
  161.                                 {% if i == 1 %}
  162.                                     <a href="{{ path('notaris_frontend_tv_detail', {'slug': pageslug}) }}">{{ i }}</a>
  163.                                 {% else %}
  164.                                     <a href="{{ path('notaris_frontend_tv_detail_page', {'page': i - 1, 'slug': pageslug}) }}">{{ i }}</a>
  165.                                 {% endif %}
  166.                             {% endif %}
  167.                         {% endif %}
  168.                     {% endfor %}
  169.                     {% if index != totalpages %}
  170.                         <span>...</span>
  171.                     {% endif %}
  172.                     {% if currentpage + 1 != totalpages %}
  173.                         <a href="{{ path('notaris_frontend_tv_detail_page', {'page': currentpage + 1, 'slug': pageslug}) }}">{{ 'volgende' | trans | raw }}</a>
  174.                     {% else %}
  175.                         <span>{{ 'volgende' | trans | raw }}</span>
  176.                     {% endif %}
  177.                 </div>
  178.             {% endif %}
  179.             {# dynamische cms modules #}
  180.             {{ include('@NotarisFrontend/module/mod_cms.html.twig', {'rightmodules': rightmodules }) }}
  181.         </div>
  182.         <!-- #### CONTENT #### -->
  183.         <!-- modules -->
  184.         {#
  185.         <aside id="content-right">
  186.             {% if notaryId is defined %}
  187.                 {{ include('@NotarisFrontend/Sven/_sven_address.html.twig') }}
  188.             {% else %}
  189.                 {{ include('@NotarisFrontend/Module/notsearch_module.html.twig') }}
  190.             {% endif %}
  191.             {% if videosubsite %}
  192.                 <article class="mod-faq">
  193.                     <a href="/{{ videosubsite.slug }}" class="module-header">
  194.                         <h2>{% if videosubsite.slug == 'acheter-louer-emprunter' %}{{ 'tv_allesover2' | trans | raw }}{% else %}{{ 'tv_allesover' | trans | raw }}{% endif %} {{ videosubsite.name | lower }}</h2>
  195.                     </a>
  196.                     <a href="/{{ videosubsite.slug }}" class="module-content">
  197.                     </a>
  198.                     <div class="cleaner">&nbsp;</div>
  199.                 </article>
  200.             {% endif %}
  201.             {{ include('@NotarisFrontend/Module/Side/glossary.html.twig', {'subsite': subsite, 'glossary': glossary}) }}
  202.             {{ include('@NotarisFrontend/Module/Side/faq.html.twig', {'subsite': subsite, 'faq': faq }) }}
  203.             {{ include('@NotarisFrontend/Module/mod_cms.html.twig', {'rightmodules': rightmodules }) }}
  204.             <div class="cleaner">&nbsp;</div>
  205.         </aside>
  206.         #}
  207.         {% include '@NotarisFrontend/navigation/mobilesubnav.html.twig' with {'websiteSlug': subsite.slug, 'isSven':false, 'isHome':false, 'subsite': subsite} %}
  208.     </section>
  209. {% endblock %}
  210. {% block extrajs %}
  211.     <script>
  212.         //adresbook();
  213.         $(document).ready(function(){
  214.             $('.info-news-content a').click(function(e){
  215.                 e.preventDefault();
  216.                 var href = $(this).attr('href');
  217.                 var slug = $(this).attr('data-slug');
  218.                 $.getJSON('{{ path('notaris_frontend_tv_clicked') }}/' + slug, function(result){
  219.                     window.location.href = href;
  220.                 });
  221.             });
  222.         });
  223.     </script>
  224. {% endblock %}