templates/lettre/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body %}
  3. <table class="table table-striped table-bordered">
  4.     <thead>
  5.       <tr class="bg-info">
  6.         <th scope="col">Destinataires</th>
  7.         <th scope="col">Date</th>
  8.         <th scope="col">Sujet</th>
  9.         <th scope="col">Nombre</th>
  10.         <th scope="col">Texte</th>
  11.         <th scope="col">Action</th>
  12.     </thead>
  13.       </tr>
  14. {% for lis in lettres %}
  15. <tr>
  16. <td style="font-size:80%;width:200px">
  17. {% if lis.CVO is defined and lis.date |date('Y-m-d') > "2021-04-13" %}
  18.   {% if lis.CVO == true %}
  19.     <div style="color:red">CVO moulin rouges <b>incluses</b></div>
  20.   {% else %}
  21.     CVO moulin rouges exclues
  22.   {% endif %}
  23. {% endif %}
  24. {% if lis.CVOC is defined and lis.date |date('Y-m-d') > "2021-04-13" %}
  25.   {% if lis.CVOC == true %}
  26.     <div style="color:red">CVO confiserie rouges <b>incluses</b></div>
  27.   {% else %}
  28.     CVO confiserie rouges exclues
  29.   {% endif %}
  30. {% endif %}
  31. {% if lis.moulin %}
  32. <p>- moulins</p>
  33. {% endif %}
  34. {% if lis.confiseur %}
  35. <p>- confiseurs</p>
  36. {% endif %}
  37. {% if lis.domaine %}
  38. <p>- domaines</p>
  39. {% endif %}
  40. {% if lis.syndicat %}
  41. <p>- syndicats</p>
  42. {% endif %}
  43. {% if lis.salaries %}
  44. <p>- salariĆ©s</p>
  45. {% endif %}
  46. {% if lis.administrateur %}
  47. <p>- administrateurs</p>
  48. {% endif %}
  49. {% if lis.syndiclocal %}
  50. <p>- syndicats locaux</p>
  51. {% endif %}
  52. {% if lis.association %}
  53. <p>- associations</p>
  54. {% endif %}
  55. {% if lis.membre %}
  56. <p>- membres de l'AG AFIDOL</p>
  57. {% endif %}
  58. {% if lis.piegeur %}
  59. <p>- piĆ©geurs</p>
  60. {% endif %}
  61. {% if lis.mailzones|length == 0  %}
  62.     {% else %}
  63.     <p><u>Zones</u> :</p>
  64.     
  65.     {% for mz in lis.mailzones %}
  66.     <p>- {{  mz.name }}</p>
  67.     {% endfor %}
  68. {% endif %}
  69. </td>
  70. <td  class="text-center small">
  71. {{ lis.date|date("d/m/Y H:i") }}
  72. </td>
  73. <td style="font-size:80%">
  74. {{ lis.titre|UTF8Decode|HtmlEntityDecode }}
  75. </td>
  76. <td class="text-center small">
  77. {{ lis.nombre }}
  78. </td>
  79. <td   style="max-width: 500px; font-size:80%">
  80. {% set tex = lis.texte|slice(0,300)|UTF8Decode  %}
  81. {% set tex = tex|striptags|HtmlEntityDecode  %}
  82. {{ tex }}
  83. ...
  84. </td>
  85. <td>
  86. <a href="{{path('view',{'id':lis.id})}}"><button class="btn-sm btn-primary">Voir</button></a>
  87. </td>
  88. </tr>
  89. {%  endfor %}
  90. </table>
  91. {% endblock body %}