var/cache/dev/twig/78/78aa573feb0df2d8ddf2a4d05d46752e.php line 55

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Sandbox\SecurityNotAllowedTestError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. use Twig\TemplateWrapper;
  16. /* subdivision/index.html.twig */
  17. class __TwigTemplate_d5c80f9a22112f3c440d3ecadf3e9466 extends Template
  18. {
  19. private Source $source;
  20. /**
  21. * @var array<string, Template>
  22. */
  23. private array $macros = [];
  24. public function __construct(Environment $env)
  25. {
  26. parent::__construct($env);
  27. $this->source = $this->getSourceContext();
  28. $this->blocks = [
  29. 'title' => [$this, 'block_title'],
  30. 'body' => [$this, 'block_body'],
  31. ];
  32. }
  33. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  34. {
  35. // line 1
  36. return "base.html.twig";
  37. }
  38. protected function doDisplay(array $context, array $blocks = []): iterable
  39. {
  40. $macros = $this->macros;
  41. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  42. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "subdivision/index.html.twig"));
  43. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  44. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "subdivision/index.html.twig"));
  45. $this->parent = $this->load("base.html.twig", 1);
  46. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  47. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  48. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  49. }
  50. // line 3
  51. /**
  52. * @return iterable<null|scalar|\Stringable>
  53. */
  54. public function block_title(array $context, array $blocks = []): iterable
  55. {
  56. $macros = $this->macros;
  57. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  58. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  59. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  60. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  61. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Subdivision", [], "messages");
  62. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  63. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  64. yield from [];
  65. }
  66. // line 5
  67. /**
  68. * @return iterable<null|scalar|\Stringable>
  69. */
  70. public function block_body(array $context, array $blocks = []): iterable
  71. {
  72. $macros = $this->macros;
  73. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  74. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  75. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  76. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  77. // line 6
  78. yield " <h1>";
  79. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Subdivision index", [], "messages");
  80. yield "</h1>
  81. <div class=\x27table-scrollable\x27>
  82. <table class=\"display \" >
  83. <thead>
  84. <tr>
  85. <th>";
  86. // line 13
  87. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Id", [], "messages");
  88. yield "</th>
  89. <th>";
  90. // line 14
  91. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Name", [], "messages");
  92. yield "</th>
  93. <th>";
  94. // line 15
  95. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Description", [], "messages");
  96. yield "</th>
  97. <th>";
  98. // line 16
  99. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("UpdateAt", [], "messages");
  100. yield "</th>
  101. <th>";
  102. // line 17
  103. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("actions", [], "messages");
  104. yield "</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. ";
  109. // line 21
  110. $context['_parent'] = $context;
  111. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["subdivisions"]) || array_key_exists("subdivisions", $context) ? $context["subdivisions"] : (function () { throw new RuntimeError('Variable "subdivisions" does not exist.', 21, $this->source); })()));
  112. $context['_iterated'] = false;
  113. foreach ($context['_seq'] as $context["_key"] => $context["subdivision"]) {
  114. // line 22
  115. yield " <tr>
  116. <td>";
  117. // line 23
  118. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["subdivision"], "id", [], "any", false, false, false, 23), "html", null, true);
  119. yield "</td>
  120. <td>";
  121. // line 24
  122. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["subdivision"], "name", [], "any", false, false, false, 24), "html", null, true);
  123. yield "</td>
  124. <td>";
  125. // line 25
  126. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["subdivision"], "description", [], "any", false, false, false, 25), "html", null, true);
  127. yield "</td>
  128. <td>";
  129. // line 26
  130. yield (string) (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["subdivision"], "updateAt", [], "any", false, false, false, 26)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["subdivision"], "updateAt", [], "any", false, false, false, 26), "Y-m-d H:i:s"), "html", null, true)) : (""));
  131. yield "</td>
  132. <td>
  133. <a href=\"";
  134. // line 28
  135. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("subdivision_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["subdivision"], "id", [], "any", false, false, false, 28)]), "html", null, true);
  136. yield "\">";
  137. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("show", [], "messages");
  138. yield "</a>
  139. ";
  140. // line 29
  141. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_HABITECH")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  142. // line 30
  143. yield " <a href=\"";
  144. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("subdivision_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["subdivision"], "id", [], "any", false, false, false, 30)]), "html", null, true);
  145. yield "\">";
  146. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("edit", [], "messages");
  147. yield "</a>
  148. ";
  149. }
  150. // line 32
  151. yield " </td>
  152. </tr>
  153. ";
  154. $context['_iterated'] = true;
  155. }
  156. // line 34
  157. if (!$context['_iterated']) {
  158. // line 35
  159. yield " <tr>
  160. <td colspan=\"5\">";
  161. // line 36
  162. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("no records found", [], "messages");
  163. yield "</td>
  164. </tr>
  165. ";
  166. }
  167. $_parent = $context['_parent'];
  168. unset($context['_seq'], $context['_key'], $context['subdivision'], $context['_parent'], $context['_iterated']);
  169. $context = array_intersect_key($context, $_parent);
  170. $context += $_parent;
  171. // line 39
  172. yield " </tbody>
  173. </table>
  174. </div>
  175. ";
  176. // line 42
  177. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_HABITECH")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  178. // line 43
  179. yield "
  180. <a href=\"";
  181. // line 44
  182. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("subdivision_new");
  183. yield "\">";
  184. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Create new", [], "messages");
  185. yield "</a>
  186. ";
  187. }
  188. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  189. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  190. yield from [];
  191. }
  192. /**
  193. * @codeCoverageIgnore
  194. */
  195. public function getTemplateName(): string
  196. {
  197. return "subdivision/index.html.twig";
  198. }
  199. /**
  200. * @codeCoverageIgnore
  201. */
  202. public function isTraitable(): bool
  203. {
  204. return false;
  205. }
  206. /**
  207. * @codeCoverageIgnore
  208. */
  209. public function getDebugInfo(): array
  210. {
  211. return array ( 207 => 44, 204 => 43, 202 => 42, 197 => 39, 187 => 36, 184 => 35, 182 => 34, 176 => 32, 168 => 30, 166 => 29, 160 => 28, 155 => 26, 151 => 25, 147 => 24, 143 => 23, 140 => 22, 135 => 21, 128 => 17, 124 => 16, 120 => 15, 116 => 14, 112 => 13, 101 => 6, 88 => 5, 65 => 3, 42 => 1,);
  212. }
  213. public function getSourceContext(): Source
  214. {
  215. return new Source("{% extends \x27base.html.twig\x27 %}
  216. {% block title %}{% trans%}Subdivision {% endtrans %}{% endblock %}
  217. {% block body %}
  218. <h1>{% trans %}Subdivision index{% endtrans %}</h1>
  219. <div class=\x27table-scrollable\x27>
  220. <table class=\"display \" >
  221. <thead>
  222. <tr>
  223. <th>{% trans %}Id{% endtrans %}</th>
  224. <th>{% trans %}Name{% endtrans %}</th>
  225. <th>{% trans %}Description{% endtrans %}</th>
  226. <th>{% trans %}UpdateAt{% endtrans %}</th>
  227. <th>{% trans %}actions{% endtrans %}</th>
  228. </tr>
  229. </thead>
  230. <tbody>
  231. {% for subdivision in subdivisions %}
  232. <tr>
  233. <td>{{ subdivision.id }}</td>
  234. <td>{{ subdivision.name }}</td>
  235. <td>{{ subdivision.description }}</td>
  236. <td>{{ subdivision.updateAt ? subdivision.updateAt|date(\x27Y-m-d H:i:s\x27) : \x27\x27 }}</td>
  237. <td>
  238. <a href=\"{{ path(\x27subdivision_show\x27, {\x27id\x27: subdivision.id}) }}\">{% trans %}show{% endtrans %}</a>
  239. {% if is_granted(\x27ROLE_HABITECH\x27) %}
  240. <a href=\"{{ path(\x27subdivision_edit\x27, {\x27id\x27: subdivision.id}) }}\">{% trans %}edit{% endtrans %}</a>
  241. {% endif %}
  242. </td>
  243. </tr>
  244. {% else %}
  245. <tr>
  246. <td colspan=\"5\">{% trans %} no records found{% endtrans %}</td>
  247. </tr>
  248. {% endfor %}
  249. </tbody>
  250. </table>
  251. </div>
  252. {% if is_granted(\x27ROLE_HABITECH\x27) %}
  253. <a href=\"{{ path(\x27subdivision_new\x27) }}\">{% trans %} Create new {% endtrans %}</a>
  254. {% endif %}
  255. {% endblock %}
  256. ", "subdivision/index.html.twig", "/var/www/vhosts/habitechsolutions.cm/birth.habitechsolutions.cm/templates/subdivision/index.html.twig");
  257. }
  258. }