templates/includes/aside/textes/textes_menu_educ.html.twig line 1

Open in your IDE?
  1. {% if extra_url is not defined %}
  2.     {% set extra_url = '' %}
  3. {% endif %}
  4. {% if idcontentCurrent is not defined %}
  5.     {% set idcontentCurrent = '' %}
  6. {% endif  %}
  7. {% if aside_content.custom_articles is defined and aside_content.custom_articles is not empty %}
  8.     {% set articles = aside_content.custom_articles %}
  9. {% endif %}
  10. {% if articles is defined and articles is not empty %}
  11.     {% for key_content,contents in articles %}
  12.         {% if contents.multiples_menu is not defined or contents.multiples_menu == false %}
  13.             {% if morearticle is defined %}
  14.                 <span class="tc-text-label">{{ contents.term }}</span>
  15.             {% endif %}
  16.                 {% if morearticle is defined and morearticle is not empty%}
  17.                     {% if aside_content.border is defined %}
  18.                         <section class="tc-panel tc-border-{{ aside_content.color }}">
  19.                     {% else %}
  20.                         <section class="tc-panel tc-bgcolor-{{ aside_content.color }}">
  21.                     {% endif %}
  22.                     {% if aside_content.border is defined %}
  23.                     <div class="tc-panel-header tc-bg-extralight-gray">
  24.                     {% else %}
  25.                     <div class="tc-panel-header">
  26.                     {% endif %}
  27.                         <h2>
  28.                             {% if aside_content.title is defined and aside_content.title is not empty %}
  29.                                 {{ aside_content.title }}
  30.                             {% else %}
  31.                                 {{ contents.menu_title }}
  32.                             {% endif %}
  33.                         </h2>
  34.                         {% if aside_content.subtitle is defined and aside_content.subtitle is not empty %}
  35.                          <h7>
  36.                             {{ aside_content.subtitle }}
  37.                         </h7>
  38.                         {% endif %}
  39.                     </div>
  40.                     <div class="tc-panel-body">
  41.                         {% if morearticle %}
  42.                         <ul class="tc-list-voir" data-current="{{ idcontentCurrent }}" data-active="0"> <!-- {#{{ context.params.idcontent }}#} -->
  43.                             {% if contents.group %}
  44.                                 {% for group_articles in contents.group %}
  45.                                     {% if group_articles.classification is defined %}
  46.                                         <li class="tc-block">
  47.                                             <div class="tc-block-header" style="padding:0">
  48.                                                 <h3>
  49.                                                     {{ group_articles.classification }}
  50.                                                 </h3>
  51.                                             </div>
  52.                                             <ul class="">
  53.                                                 {% for idarticle,article in group_articles.content %}
  54.                                                     {% if article.title %}
  55.                                                     <li class="tc-list-voir tc-temp-{{ article.active }} menu-{{ article.idcontent }}">
  56.                                                         {% if article.first is defined %}
  57.                                                         <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/"
  58.                                                            class="{{ article.active }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  59.                                                         {% else %}
  60.                                                         <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/idcontent/{{ article.idcontent }}"
  61.                                                            class="{{ article.active }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  62.                                                         {% endif %}
  63.                                                     </li>
  64.                                                     {% endif %}
  65.                                                 {% endfor %}
  66.                                             </ul>
  67.                                         </li>
  68.                                     {% else %}
  69.                                         <div class="tc-block">
  70.                                             <div class="tc-block-body">
  71.                                                 {% for idarticle,article in group_articles.content %}
  72.                                                     {% if article.title is defined and article.title is not empty %}
  73.                                                     <li class="tc-list-voir tc-temp-{{ article.active }} menu-{{ article.idcontent }}">
  74.                                                         {% if article.first is defined %}
  75.                                                         <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/"
  76.                                                            class="{{ article.active }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  77.                                                         {% else %}
  78.                                                         <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/idcontent/{{ article.idcontent }}" i
  79.                                                            class="{{ article.active }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  80.                                                         {% endif %}
  81.                                                     </li>
  82.                                                     {% endif %}
  83.                                                 {% endfor %}
  84.                                             </div>
  85.                                         </div>
  86.                                     {% endif %}
  87.                                 {% endfor %}
  88.                             {% else %}
  89.                                 {% for idarticle,article in scontents.content %}
  90.                                     {% if article.title %}
  91.                                     <ul class="tc-block">
  92.                                         <li class="tc-block-body" class="tc-list-voir tc-temp-{{ article.active }} menu-{{ article.idcontent }}">
  93.                                             {% if article.first %}
  94.                                             <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/" class="{{ article.active }}{{ article.media }}"
  95.                                                title="{{ article.title }}">{{ article.titre_court }}</a>
  96.                                             {% else %}
  97.                                             <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/idcontent/{{ article.idcontent }}"
  98.                                                class="{{ article.active }}{{ article.media }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  99.                                             {% endif %}
  100.                                         </li>
  101.                                     </ul>
  102.                                     {% endif %}
  103.                                 {% endfor %}
  104.                             {% endif %}
  105.                         </ul>
  106.                         {% endif %}
  107.                         <script type="text/javascript">
  108.                             $(document).ready(function(){
  109.                                 if(current = $('.tc-list-voir').data('current')){
  110.                                     if('.menu-'+current){
  111.                                         $('.menu-'+current).addClass('tc-active');
  112.                                     }
  113.                                 }
  114.                                 else{
  115.                                     $('.tc-list-voir tc-list-voir').first().addClass('tc-active');
  116.                                 }
  117.                             })
  118.                         </script>
  119.                     </div>
  120.                     {% if aside_content.footer is defined %}
  121.                     <div class="tc-panel-footer">
  122.                         <a href="/spectacles/{{ url_clean }}/ensavoirplus" class="tc-more-link">Tous les articles ({{ aside_content.nb_presentation }})</a>
  123.                     </div>
  124.                     {% endif %}
  125.                 </section>
  126.                 {% endif %}
  127.         {% else %}
  128.             {% for language,articles in contents.articles_by_lng %}
  129.                 {% if morearticle %}
  130.                     <span class="tc-text-label">{{ articles.term }}</span>
  131.                 {% endif %}
  132.                 {% if morearticle %}
  133.                 <section class="tc-panel tc-bgcolor-{{ aside_content.color }}">
  134.                     <div class="tc-panel-header" >
  135.                         <h2>
  136.                             {% if contents.menu_custom is defined and contents.menu_custom %}
  137.                                 {{ contents.classification|trans }}
  138.                             {% else %}
  139.                                 {% if aside_content.title is defined and aside_content.title %}
  140.                                     {{ aside_content.title|trans }}
  141.                                 {% else %}
  142.                                     {{ articles.menu_title|trans }}
  143.                                 {% endif %}
  144.                             {% endif %}
  145.                         </h2>
  146.                     </div>
  147.                     <div class="tc-panel-body">
  148.                         {% if morearticle %}
  149.                         <ul class="tc-list-voir" data-current="{{ idcontentCurrent }}" data-active="0"> <!-- {#{{ context.params.idcontent }}#} -->
  150.                             {% if articles.group %}
  151.                                 {% for group_articles in articles.group %}
  152.                                     {% if group_articles.classification is defined %}
  153.                                     <li class="tc-block">
  154.                                         <div class="tc-block-header" style="padding:0">
  155.                                             <h3>
  156.                                                 {{ group_articles.classification }}
  157.                                             </h3>
  158.                                         </div>
  159.                                         <ul class="">
  160.                                             {% for idarticle,article in group_articles.content %}
  161.                                                 {% if article.title is defined %}
  162.                                                     {% set media = '' %}
  163.                                                     {% if article.media is defined %}
  164.                                                         {% set media = article.media %}
  165.                                                     {% endif %}
  166.                                                     <li class="tc-list-voir menu-{{ article.idcontent }}">
  167.                                                         {% if article.first is defined %}
  168.                                                         <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/"
  169.                                                            class="{{ article.active }}{{ media }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  170.                                                         {% else %}
  171.                                                         <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/idcontent/{{ article.idcontent }}"
  172.                                                            class="{{ article.active }}{{ media }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  173.                                                         {% endif %}
  174.                                                     </li>
  175.                                                 {% endif %}
  176.                                             {% endfor %}
  177.                                         </ul>
  178.                                     </li>
  179.                                     {% else %}
  180.                                     <div class="tc-block">
  181.                                         <div class="tc-block-body">
  182.                                             {% for idarticle,article in group_articles.content %}
  183.                                                 {% set media = '' %}
  184.                                                 {% if article.media is defined %}
  185.                                                     {% set media = article.media %}
  186.                                                 {% endif %}
  187.                                                 {% if article.title %}
  188.                                                 <li class="tc-list-voir tc-temp-{{ article.active }} menu-{{ article.idcontent }}">
  189.                                                     {% if article.first is defined %}
  190.                                                     <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/"
  191.                                                        class="{{ article.active }}{{ media }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  192.                                                     {% else %}
  193.                                                     <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/idcontent/{{ article.idcontent }}" i
  194.                                                        class="{{ article.active }}{{ media }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  195.                                                     {% endif %}
  196.                                                 </li>
  197.                                                 {% endif %}
  198.                                             {% endfor %}
  199.                                         </div>
  200.                                     </div>
  201.                                     {% endif %}
  202.                                 {% endfor %}
  203.                             {% else %}
  204.                                 {% for idarticle,article in articles.content %}
  205.                                     {% if article.title %}
  206.                                     <ul class="tc-block">
  207.                                         <li class="tc-block-body" class="tc-list-voir tc-temp-{{ article.active }} menu-{{ article.idcontent }}">
  208.                                             {% if article.first %}
  209.                                             <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/" class="{{ article.active }}{{ article.media }}"
  210.                                                title="{{ article.title }}">{{ article.titre_court }}</a>
  211.                                             {% else %}
  212.                                             <a href="{{ url_folder }}{{ extra_url }}/{{ type_class }}/idcontent/{{ article.idcontent }}"
  213.                                                class="{{ article.active }}{{ article.media }}" title="{{ article.title }}">{{ article.titre_court }}</a>
  214.                                             {% endif %}
  215.                                         </li>
  216.                                     </ul>
  217.                                     {% endif %}
  218.                                 {% endfor %}
  219.                             {% endif %}
  220.                         </ul>
  221.                         {% endif %}
  222.                         <script type="text/javascript">
  223.                             $(document).ready(function(){
  224.                                 if(current = $('.tc-list-voir').data('current')){
  225.                                     if('.menu-'+current){
  226.                                         $('.menu-'+current).addClass('tc-active');
  227.                                     }
  228.                                 }
  229.                                 else{
  230.                                     $('.tc-list-voir tc-list-voir').first().addClass('tc-active');
  231.                                 }
  232.                             })
  233.                         </script>
  234.                     </div>
  235.                 </section>
  236.                 {% endif %}
  237.             {% endfor %}
  238.         {% endif %}
  239.     {% endfor %}
  240. {% endif %}
  241. {% if detailarticle.files is defined and detailarticle.files != 0 %}
  242.     <section class="tc-panel tc-border-neutral">
  243.         <div class="tc-panel-body">
  244.             {% for key,value in detailarticle.files %}
  245.                 {% include 'includes/files.inc.html.twig' %}
  246.             {% endfor %}
  247.         </div>
  248.     </section>
  249. {% endif %}