templates/Lenord/Main/document.html.twig line 1

Open in your IDE?
  1. {% extends 'Lenord/base.html.twig' %}
  2. {% block header_epingles %}
  3.   {{ include('Lenord/Main/parts/epingles.html.twig') }}
  4. {% endblock %}
  5. {% block header_breadcrumb %}
  6.   {% include 'Nordinfo/Main/parts/breadcrumb.html.twig' with {'variation':'le-nord'} %}
  7. {% endblock %}
  8. {% block header_breadcrumb_pdf %}
  9.   {% include 'Nordinfo/Main/parts/breadcrumb.html.twig' with {'variation':'le-nord'} %}
  10. {% endblock %}
  11. {% block body %}
  12.   <main role="main" id="mainContent" tabindex="-1">
  13.     {% include 'Nordinfo/Main/parts/back_btn.html.twig' with {'back_btn_class':'--leNord --postDetails'} %}
  14.     <article>
  15.       <div class="containerSm containerPostDetails --nordServices mBLg">
  16.         <h1 class="__headingMain mTMd--imp mB--imp">{{ document.titre }}</h1>
  17.         <div class="containerContent --nordServices">
  18.           <div class="__infoDoc">
  19.             <p class="__date">{{ document.datePublication|date('d')~' '~trans_month_hash[document.datePublication|date('F')]~' '~document.datePublication|date('Y') }}</p>
  20.             {% if document.fichierName2 is null %}<span class="__separator">|</span>
  21.               <p class="__size">{{ document.formatFile|upper }}
  22.                 {% if document.poids is not null %}
  23.                   {% set poids_arr = document.poids|split(' ') %}
  24.                   {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %}
  25.               </p>
  26.             {% endif %}
  27.             <span class="__separator">|</span>
  28.             {% if document.types|length > 0 %}
  29.               <p class="__type">
  30.                 {% for type in document.types %}
  31.                   {% if loop.first %}{% else %}, {% endif %}
  32.                   <a href="{{ path('espacedoc') }}?types[]={{ type.id }}">{{ type.titre }}</a>
  33.                 {% endfor %}
  34.               </p>
  35.             {% endif %}
  36.           </div>
  37.           <p class="__intro">{{ document.description|raw }}</p>
  38.           {% if document.descriptionAccessibilite is not null %}
  39.             {% if document.description|length > 0 %}
  40.               <br>
  41.             {% endif %}
  42.             <b>Accessibilité : </b>{{ document.descriptionAccessibilite|replace({'<div>': '', '</div>': ''})|raw }}
  43.           {% endif %}
  44.           {% if document.import == 1 %}
  45.             <a href="{{ document.urlFichierExt }}"
  46.                class="linkBlock linkBlock--download" target="_blank">
  47.               <div class="linkBlock__inner">
  48.                 <div><span class="linkBlock__icon"><svg aria-hidden="true" id="f3ce6478-5c65-4999-af52-59a99b9cbf14" data-name="Layer 1"
  49.                                                         xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
  50.                         d="M481.79,453.6H309.33L463.76,275.91a24.2,24.2,0,1,0-36.54-31.74L312.42,376.25V34.2a24.21,24.21,0,0,0-48.41,0V376.78L148.75,244.15a24.2,24.2,0,1,0-36.53,31.74L266.66,453.6H94.21a24.2,24.2,0,1,0,0,48.4H481.79a24.2,24.2,0,0,0,0-48.4Z"/></svg></span>
  51.                 </div>
  52.                 <div>
  53.                 <span>
  54.                   {% if document.libelleFichier1 is not null %}
  55.                     {{ document.libelleFichier1 }}
  56.                   {% else %}
  57.                     {{ document.fichierName }}
  58.                   {% endif %}
  59.               ({{ document.formatFile|upper }}
  60.                   {% if document.poids is not null %}
  61.                   {% set poids_arr = document.poids|split(' ') %}
  62.               - {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %})
  63.                 </span>
  64.                 </div>
  65.               </div>
  66.             </a>
  67.             {% if document.annexeUrl is not null and document.fichierName2 is not null %}
  68.               <a href="{{ document.annexeUrl }}"
  69.                  class="linkBlock linkBlock--download" target="_blank">
  70.                 <div class="linkBlock__inner">
  71.                   <div><span class="linkBlock__icon"><svg aria-hidden="true" id="f3ce6478-5c65-4999-af52-59a99b9cbf14" data-name="Layer 1"
  72.                                                           xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
  73.                           d="M481.79,453.6H309.33L463.76,275.91a24.2,24.2,0,1,0-36.54-31.74L312.42,376.25V34.2a24.21,24.21,0,0,0-48.41,0V376.78L148.75,244.15a24.2,24.2,0,1,0-36.53,31.74L266.66,453.6H94.21a24.2,24.2,0,1,0,0,48.4H481.79a24.2,24.2,0,0,0,0-48.4Z"/></svg></span>
  74.                   </div>
  75.                   <div>
  76.                 <span>
  77.                   {% if document.libelleFichier2 is not null %}
  78.                     {{ document.libelleFichier2 }}
  79.                   {% else %}
  80.                     {{ document.fichierName2 }}
  81.                   {% endif %}
  82.               ({{ document.formatFile2|upper }}
  83.                   {% if document.poids2 is not null %}
  84.                   {% set poids_arr = document.poids2|split(' ') %}
  85.               - {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %})
  86.                 </span>
  87.                   </div>
  88.                 </div>
  89.               </a>
  90.             {% endif %}
  91.           {% else %}
  92.             {% if document.fichierName is not null %}
  93.               <a href="{{ asset('upload/lenorddocuments/'~document.fichierName) }}"
  94.                  class="linkBlock linkBlock--download" target="_blank">
  95.                 <div class="linkBlock__inner">
  96.                   <div><span class="linkBlock__icon"><svg aria-hidden="true" id="f3ce6478-5c65-4999-af52-59a99b9cbf14" data-name="Layer 1"
  97.                                                           xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
  98.                           d="M481.79,453.6H309.33L463.76,275.91a24.2,24.2,0,1,0-36.54-31.74L312.42,376.25V34.2a24.21,24.21,0,0,0-48.41,0V376.78L148.75,244.15a24.2,24.2,0,1,0-36.53,31.74L266.66,453.6H94.21a24.2,24.2,0,1,0,0,48.4H481.79a24.2,24.2,0,0,0,0-48.4Z"/></svg></span>
  99.                   </div>
  100.                   <div>
  101.                 <span>
  102.                   {% if document.libelleFichier1 is not null %}
  103.                     {{ document.libelleFichier1 }}
  104.                   {% else %}
  105.                     {{ document.fichierName }}
  106.                   {% endif %}
  107.             ({{ document.formatFile|upper }}
  108.                   {% if document.poids is not null %}
  109.                   {% set poids_arr = document.poids|split(' ') %}
  110.             - {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %})
  111.                 </span>
  112.                   </div>
  113.                 </div>
  114.               </a>
  115.             {% endif %}
  116.             {% if document.fichierName2 is not null %}
  117.               <a href="{{ asset('upload/lenorddocuments/'~document.fichierName2) }}"
  118.                  class="linkBlock linkBlock--download" target="_blank">
  119.                 <div class="linkBlock__inner">
  120.                   <div><span class="linkBlock__icon"><svg aria-hidden="true" id="f3ce6478-5c65-4999-af52-59a99b9cbf14" data-name="Layer 1"
  121.                                                           xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
  122.                           d="M481.79,453.6H309.33L463.76,275.91a24.2,24.2,0,1,0-36.54-31.74L312.42,376.25V34.2a24.21,24.21,0,0,0-48.41,0V376.78L148.75,244.15a24.2,24.2,0,1,0-36.53,31.74L266.66,453.6H94.21a24.2,24.2,0,1,0,0,48.4H481.79a24.2,24.2,0,0,0,0-48.4Z"/></svg></span>
  123.                   </div>
  124.                   <div>
  125.                 <span>
  126.                   {% if document.libelleFichier2 is not null %}
  127.                     {{ document.libelleFichier2 }}
  128.                   {% else %}
  129.                     {{ document.fichierName2 }}
  130.                   {% endif %}
  131.               ({{ document.formatFile2|upper }}
  132.                   {% if document.poids2 is not null %}
  133.                   {% set poids_arr = document.poids2|split(' ') %}
  134.               - {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %})
  135.                 </span>
  136.                   </div>
  137.                 </div>
  138.               </a>
  139.             {% endif %}
  140.             {% if document.fichierName3 is not null %}
  141.               <a href="{{ asset('upload/lenorddocuments/'~document.fichierName3) }}"
  142.                  class="linkBlock linkBlock--download" target="_blank">
  143.                 <div class="linkBlock__inner">
  144.                   <div><span class="linkBlock__icon"><svg aria-hidden="true" id="f3ce6478-5c65-4999-af52-59a99b9cbf14" data-name="Layer 1"
  145.                                                           xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
  146.                           d="M481.79,453.6H309.33L463.76,275.91a24.2,24.2,0,1,0-36.54-31.74L312.42,376.25V34.2a24.21,24.21,0,0,0-48.41,0V376.78L148.75,244.15a24.2,24.2,0,1,0-36.53,31.74L266.66,453.6H94.21a24.2,24.2,0,1,0,0,48.4H481.79a24.2,24.2,0,0,0,0-48.4Z"/></svg></span>
  147.                   </div>
  148.                   <div>
  149.                 <span>
  150.                   {% if document.libelleFichier3 is not null %}
  151.                     {{ document.libelleFichier3 }}
  152.                   {% else %}
  153.                     {{ document.fichierName3 }}
  154.                   {% endif %}
  155.               ({{ document.formatFile3|upper }}
  156.                   {% if document.poids3 is not null %}
  157.                   {% set poids_arr = document.poids3|split(' ') %}
  158.               - {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %})
  159.                 </span>
  160.                   </div>
  161.                 </div>
  162.               </a>
  163.             {% endif %}
  164.             {% if document.fichierName4 is not null %}
  165.               <a href="{{ asset('upload/lenorddocuments/'~document.fichierName4) }}"
  166.                  class="linkBlock linkBlock--download" target="_blank">
  167.                 <div class="linkBlock__inner">
  168.                   <div><span class="linkBlock__icon"><svg aria-hidden="true" id="f3ce6478-5c65-4999-af52-59a99b9cbf14" data-name="Layer 1"
  169.                                                           xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
  170.                           d="M481.79,453.6H309.33L463.76,275.91a24.2,24.2,0,1,0-36.54-31.74L312.42,376.25V34.2a24.21,24.21,0,0,0-48.41,0V376.78L148.75,244.15a24.2,24.2,0,1,0-36.53,31.74L266.66,453.6H94.21a24.2,24.2,0,1,0,0,48.4H481.79a24.2,24.2,0,0,0,0-48.4Z"/></svg></span>
  171.                   </div>
  172.                   <div>
  173.                 <span>
  174.                   {% if document.libelle_fichier4|default %}
  175.                     {{ document.libelleFichier4 }}
  176.                   {% else %}
  177.                     {{ document.fichierName4 }}
  178.                   {% endif %}
  179.               ({{ document.formatFile4|upper }}
  180.                   {% if document.poids4 is not null %}
  181.                   {% set poids_arr = document.poids4|split(' ') %}
  182.               - {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %})
  183.                 </span>
  184.                   </div>
  185.                 </div>
  186.               </a>
  187.             {% endif %}
  188.             {% if document.fichierName5 is not null %}
  189.               <a href="{{ asset('upload/lenorddocuments/'~document.fichierName5) }}"
  190.                  class="linkBlock linkBlock--download" target="_blank">
  191.                 <div class="linkBlock__inner">
  192.                   <div><span class="linkBlock__icon"><svg aria-hidden="true" id="f3ce6478-5c65-4999-af52-59a99b9cbf14" data-name="Layer 1"
  193.                                                           xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
  194.                           d="M481.79,453.6H309.33L463.76,275.91a24.2,24.2,0,1,0-36.54-31.74L312.42,376.25V34.2a24.21,24.21,0,0,0-48.41,0V376.78L148.75,244.15a24.2,24.2,0,1,0-36.53,31.74L266.66,453.6H94.21a24.2,24.2,0,1,0,0,48.4H481.79a24.2,24.2,0,0,0,0-48.4Z"/></svg></span>
  195.                   </div>
  196.                   <div>
  197.                 <span>
  198.                   {% if document.libelle_fichier5 is not null %}
  199.                     {{ document.libelleFichier5 }}
  200.                   {% else %}
  201.                     {{ document.fichierName5 }}
  202.                   {% endif %}
  203.               ({{ document.formatFile5|upper }}
  204.                   {% if document.poids5 is not null %}
  205.                   {% set poids_arr = document.poids5|split(' ') %}
  206.               - {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %})
  207.                 </span>
  208.                   </div>
  209.                 </div>
  210.               </a>
  211.             {% endif %}
  212.             {% if document.fichierName6 is not null %}
  213.               <a href="{{ asset('upload/lenorddocuments/'~document.fichierName6) }}"
  214.                  class="linkBlock linkBlock--download" target="_blank">
  215.                 <div class="linkBlock__inner">
  216.                   <div><span class="linkBlock__icon"><svg aria-hidden="true" id="f3ce6478-5c65-4999-af52-59a99b9cbf14" data-name="Layer 1"
  217.                                                           xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path
  218.                           d="M481.79,453.6H309.33L463.76,275.91a24.2,24.2,0,1,0-36.54-31.74L312.42,376.25V34.2a24.21,24.21,0,0,0-48.41,0V376.78L148.75,244.15a24.2,24.2,0,1,0-36.53,31.74L266.66,453.6H94.21a24.2,24.2,0,1,0,0,48.4H481.79a24.2,24.2,0,0,0,0-48.4Z"/></svg></span>
  219.                   </div>
  220.                   <div>
  221.                 <span>
  222.                   {% if document.libelle_fichier6 is not null %}
  223.                     {{ document.libelleFichier6 }}
  224.                   {% else %}
  225.                     {{ document.fichierName6 }}
  226.                   {% endif %}
  227.               ({{ document.formatFile6|upper }}
  228.                   {% if document.poids6 is not null %}
  229.                   {% set poids_arr = document.poids6|split(' ') %}
  230.               - {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>{% endif %})
  231.                 </span>
  232.                   </div>
  233.                 </div>
  234.               </a>
  235.             {% endif %}
  236.           {% endif %}
  237.           {{ content_post|raw }}
  238.         </div>
  239.       </div>
  240.     </article>
  241.     {% if document.documentsLies is not empty or documents_lies is not empty %}
  242.       <div class="bgColorGrey">
  243.         <div class="container pBMd pTMd">
  244.           <h2 class="headingSection mBMd--imp">Documents liés</h2>
  245.           <div class="gridResultsSearchDocs --docDetailsPage">
  246.             {% for doc in document.documentsLies %}
  247.               <div class="__col">
  248.                 <a href="{{ path('document', {'slug':doc.aliasUrl}) }}" class="__item">
  249.                   <div class="__inner">
  250.                     <div class="__icon">
  251.                       {{ source('svg/icons/icon-file.svg') }}
  252.                     </div>
  253.                     <div class="__details">
  254.                       <p class="__title">{{ doc.titre }}</p>
  255.                       {% if doc.formatFile|length > 0 %}
  256.                         {% if doc.fichierName2 is null %}
  257.                           <p class="__type">
  258.                             {{ doc.formatFile|upper }}&nbsp;
  259.                             {% if doc.poids is not null %}
  260.                               {% set poids_arr = doc.poids|split(' ') %}
  261.                               {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>
  262.                             {% endif %}
  263.                           </p>
  264.                         {% endif %}
  265.                       {% endif %}
  266.                       <p class="__date">{{ doc.datePublication|date('d')~' '~trans_month_hash[doc.datePublication|date('F')]~' '~doc.datePublication|date('Y') }}</p>
  267.                     </div>
  268.                   </div>
  269.                 </a>
  270.               </div>
  271.             {% endfor %}
  272.             {% if documents_lies is not empty %}
  273.               {% for doc in documents_lies %}
  274.                 <div class="__col">
  275.                   <a href="{{ path('document', {'slug':doc.aliasUrl}) }}" class="__item">
  276.                     <div class="__inner">
  277.                       <div class="__icon">
  278.                         {{ source('svg/icons/icon-file.svg') }}
  279.                       </div>
  280.                       <div class="__details">
  281.                         <p class="__title">{{ doc.titre }}</p>
  282.                         {% if doc.formatFile|length > 0 %}
  283.                           {% if doc.fichierName2 is null %}
  284.                             <p class="__type">
  285.                               {{ doc.formatFile|upper }}&nbsp;
  286.                               {% if doc.poids is not null %}
  287.                                 {% set poids_arr = doc.poids|split(' ') %}
  288.                                 {{ poids_arr[0] }} <abbr title="mégaoctet">{{ poids_arr[1] }}</abbr>
  289.                               {% endif %}
  290.                             </p>
  291.                           {% endif %}
  292.                         {% endif %}
  293.                         <p class="__date">{{ doc.datePublication|date('d')~' '~trans_month_hash[doc.datePublication|date('F')]~' '~doc.datePublication|date('Y') }}</p>
  294.                       </div>
  295.                     </div>
  296.                   </a>
  297.                 </div>
  298.               {% endfor %}
  299.             {% endif %}
  300.           </div>
  301.         </div>
  302.       </div>
  303.     {% endif %}
  304.   </main>
  305. {% endblock %}
  306. {% block footer_top %}
  307.   {% if is_preview != 1 %}
  308.     <div class="container pB pT">
  309.       {% include 'Nordinfo/Main/parts/article-actions.html.twig' with {'post_title':'test', 'post_id':'test', 'is_nord_services':true} %}
  310.     </div>
  311.   {% endif %}
  312. {% endblock %}