templates/content/structure/tableauResult.html.twig line 1

Open in your IDE?
  1. {# si l'utilisateur est loggué #}
  2. {% if app.user is not null %}
  3.   {% set monR = 0 %}
  4.   {# recupere ses ROLES #}
  5.   {% for role in app.user.roles  %}
  6.     {% if role == "ROLE_ADMIN" %}
  7.       {% set monR = monR + 3 %}
  8.     {% else %}
  9.       {% set monR = monR + 1 %}
  10.     {% endif %}
  11.   {% endfor %}
  12. {# sinon c'est un simple visiteur #}
  13. {% else %}
  14.   {% set monR = 0 %}
  15. {% endif %}
  16. <div class="col-12">
  17.   <table class="table events-table tabStructure">
  18.     <thead class="menuTop">
  19.       <tr>
  20.         {% if app.user is not null %}
  21.           {% for role in app.user.roles  %}
  22.             {% if role == "ROLE_ADMIN" %}
  23.               <th class="event-Id">Id</th>
  24.             {% endif %}
  25.           {% endfor %}
  26.         {% else %}
  27.         {% endif %}
  28.         <th class="event-Catégories/séquences">Catégories/séquences</th>
  29.         <th class="event-Cards">Cards</th>
  30.         <th class="event-Texte/Commentaires">
  31.           Texte{% if app.user is not null %}/Commentaires{% endif %}
  32.         </th>
  33.         {% if monR > 0 %}
  34.           <th class="event-Films">Films</th>
  35.           <th class="event-Transition">Transition</th>
  36.           <th class="event-Navigation">Navigation</th>
  37.           <th class="event-Zones">Zones</th>
  38.           <th class="event-Timer">Timer</th>
  39.         {% endif %}
  40.       </tr>
  41.     </thead>
  42.     <tbody>
  43.       {% if stacks|length > 0  %}
  44.         {% for stack in stacks %}
  45.           <tr id="ligne_{{ stack.id }}">
  46.             {# TD ID #}
  47.             {% if app.user is not null %}
  48.               {% for role in app.user.roles  %}
  49.                 {% if role == "ROLE_ADMIN" %}
  50.                   {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="Id"'} %}
  51.                   {{ stack.id }}
  52.                   {% if app.user is not null %}
  53.                     {% for role in app.user.roles  %}
  54.                       {% if role == "ROLE_ADMIN" %}
  55.                         <hr>
  56.                         <div class="mObile">
  57.                           <button id="btnStatus{{ stack.id }}" class="btn btn-sm btnImmemoryShowAdmin" type="button" name="button">
  58.                             État d'avancée
  59.                           </button>
  60.                           {% include "content/admin/stacks/verifRadio.html.twig" %}
  61.                         </div>
  62.                       {% else %}
  63.                       {% endif %}
  64.                     {% endfor %}
  65.                   {% else %}
  66.                   {% endif %}
  67.                   </td>
  68.                 {% endif %}
  69.               {% endfor %}
  70.             {% else %}
  71.             {% endif %}
  72.             {# TD Catégories/séquences #}
  73.             {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="Catégorie/Séquence"'} %}
  74.               <h3 class="catTableau">{{ stack.Scategorie.nom }} </h3>
  75.               <h2 class="seqTableau">{{ stack.Ssequence.nom }}</h2>
  76.             </td>
  77.             {# TD Cards #}
  78.             {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="Cards"'} %}
  79.               {{ stack.nom }} <br>
  80.               <div class="row">
  81.                 <div class="col-5 imgTableau">
  82.                   {% set image640 = stack.urlImage %}
  83.                   <!-- 
  84.                   <img class="centrerIMG2" src="{{ pathLocal }}/{{ image640|replace({'/900/': '/640/', '.jpg': ".png"}) }}" alt="{{ stack.nom }}" style="width:100%;">
  85.                   -->
  86.                   <img class="centrerIMG2" src="{{ pathLocal }}/{{ stack.urlImage0 }}" alt="{{ stack.nom }}" style="width:100%;">
  87.                   <br>
  88.                   <small>Natif : 640X480</small>
  89.                 </div>
  90.                 <div class="col-7 imgTableau">
  91.                   <img class="centrerIMG2" src="{{ pathLocal }}/{{ stack.urlImage }}" alt="{{ stack.nom }}" style="width:100%;">
  92.                   <br>
  93.                   <small>Upscalé : 900X675</small>
  94.                 </div>
  95.               </div>
  96.               <hr>
  97.               <a class="btn btnImmemory" href="{{ path('front_cdrom_900_ciblebif', {'id': stack.id}) }}" target="_blank">
  98.                 CDRom
  99.               </a>
  100.               {% if app.user is not null %}
  101.                 {% if search is defined and search is not null %}
  102.                   <a class="btn btnImmemory" href="{{ path('webSite_stacks_show', {'id': stack.id, 'recherche': search }) }}">
  103.                 {% else %}
  104.                   <a class="btn btnImmemory" href="{{ path('webSite_stacks_show', {'id': stack.id, 'recherche': recherche }) }}">
  105.                 {% endif %}
  106.               {% else %}
  107.                 <a class="btn btnImmemory" href="{{ path('visiteur_stacks_show', {'id': stack.id, 'recherche': recherche }) }}">
  108.               {% endif %}
  109.                   Détails
  110.                 </a>
  111.               {% if app.user is not null %}
  112.                 {% for role in app.user.roles  %}
  113.                   {% if role == "ROLE_ADMIN" %}
  114.                     <a class="btn btnImmemory mObile" href="{{ path('admin_stacks_edit', {'id': stack.id}) }}">
  115.                       Modification
  116.                     </a>
  117.                     <a class="btn btnImmemory mObile" href="{{ path('admin_stacks_duplicate', {'id': stack.id}) }}">
  118.                       Dupliquer
  119.                     </a>
  120.                   {% else %}
  121.                   {% endif %}
  122.                 {% endfor %}
  123.               {% else %}
  124.               {% endif %}
  125.             </td>
  126.             {# TD Texte/Commentaires #}
  127.             {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="Textes/Commentaires"'} %}
  128.             <div class="commTableau">
  129.                   {% if stack.texte is empty %}
  130.                 Pas de texte
  131.               {% else %}
  132.                 {% set monTexte = stack.texte|striptags|slice(0, 125) ~ '...' %}
  133.                 {{ monTexte|raw }}
  134.                 {# stack.texte|striptags|slice(0, 125) ~ '...' #}
  135.               {% endif %}
  136.                    </div>
  137.               {% if app.user is not null %}
  138.                 <div class="commTableau">
  139.                   {% include "content/structure/commentaires/caseCommentaires.html.twig" %}
  140.                 </div>
  141.               {% else %}
  142.               {% endif %}
  143.             </td>
  144.             {% if monR > 0 %}
  145.               {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="Film"'} %}
  146.                 {% if stack.film is empty %}
  147.                 {% elseif stack.film.id == 1 %}
  148.                 {% else %}
  149.                   {{ stack.film.nom }}
  150.                 {% endif %}
  151.               </td>
  152.               {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="tansitions"'} %}
  153.                 {% if stack.transitIn.nom is defined and stack.transitIn.nom is not empty %}
  154.                   {{ stack.transitIn.nom }}
  155.                 {% else %}
  156.                   -
  157.                 {% endif %}
  158.               </td>
  159.               {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="Navigation"'} %}
  160.                 <table class="navCDRom">
  161.                   <tr>
  162.                     <td colspan="4">
  163.                       {% if stack.navH is defined and stack.navH is not empty %}
  164.                       {{ stack.navH }}
  165.                       {% else %}
  166.                       -
  167.                       {% endif %}
  168.                     </td>
  169.                   </tr>
  170.                   <tr>
  171.                     <td>
  172.                       {% if stack.navG is defined and stack.navG is not empty %}
  173.                       {{ stack.navG }}
  174.                       {% else %}
  175.                       -
  176.                       {% endif %}
  177.                     </td>
  178.                     <td colspan="2" class="milieuCadre"></td>
  179.                     <td>
  180.                       {% if stack.navD is defined and stack.navD is not empty %}
  181.                       {{ stack.navD }}
  182.                       {% else %}
  183.                       -
  184.                       {% endif %}
  185.                     </td>
  186.                   </tr>
  187.                   <tr>
  188.                     <td colspan="2">
  189.                       {% if stack.navBG is defined and stack.navBG is not empty %}
  190.                       {{ stack.navBG }}
  191.                       {% else %}
  192.                       -
  193.                       {% endif %}
  194.                     </td>
  195.                     <td colspan="2">
  196.                       {% if stack.navBD is defined and stack.navBD is not empty %}
  197.                       {{ stack.navBD }}
  198.                       {% else %}
  199.                       -
  200.                       {% endif %}
  201.                     </td>
  202.                   </tr>
  203.                 </table>
  204.               </td>
  205.               {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="Zones"'} %}
  206.                 <ul>
  207.                   {% for zone in stack.zones %}
  208.                     <li>{{ zone.nom }} - {{ zone.destination }}</li>
  209.                   {% endfor %}
  210.                 </ul>
  211.               </td>
  212.               {% include 'content/structure/tableauTd.html.twig' with {'foo': 'data-label="timer"'} %}
  213.                 <ul>
  214.                   {% for timer in stack.timers %}
  215.                     <li>{{ timer.nom }} ({{ timer.duree }}) </li>
  216.                   {% endfor %}
  217.                 </ul>
  218.               </td>
  219.             {% endif %}
  220.           </tr>
  221.         {% endfor %}
  222.       {% else %}
  223.         <tr>
  224.           <td colspan="9">Pas de Card.</td>
  225.         </tr>
  226.       {% endif %}
  227.     </tbody>
  228.   </table>
  229. </div>
  230. <div class="row">
  231. </div>