var/cache/dev/twig/42/4295239d04f4137c671a71e6bd1d1fe1.php line 45

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. /* hospital/index.html_1.twig */
  17. class __TwigTemplate_c986f9f8c774c6570ce412425413e5d1 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", "hospital/index.html_1.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", "hospital/index.html_1.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("Hospital index", [], "messages");
  62. yield " ";
  63. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  64. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  65. yield from [];
  66. }
  67. // line 5
  68. /**
  69. * @return iterable<null|scalar|\Stringable>
  70. */
  71. public function block_body(array $context, array $blocks = []): iterable
  72. {
  73. $macros = $this->macros;
  74. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  75. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  76. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  77. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  78. // line 6
  79. yield " <h1>";
  80. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Hospital index", [], "messages");
  81. yield "</h1>
  82. <div class=\x27table-scrollable\x27>
  83. <table >
  84. <thead>
  85. <tr>
  86. <th>";
  87. // line 13
  88. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Id", [], "messages");
  89. yield "</th>
  90. <th>";
  91. // line 14
  92. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Name", [], "messages");
  93. yield "</th>
  94. <th>";
  95. // line 15
  96. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Description", [], "messages");
  97. yield "</th>
  98. <th>";
  99. // line 16
  100. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("City", [], "messages");
  101. yield "</th>
  102. <th>";
  103. // line 17
  104. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Subdivision", [], "messages");
  105. yield "</th>
  106. <th>";
  107. // line 18
  108. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Category", [], "messages");
  109. yield "</th>
  110. <th>";
  111. // line 19
  112. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("actions", [], "messages");
  113. yield "</th>
  114. </tr>
  115. </thead>
  116. <tbody>
  117. ";
  118. // line 23
  119. $context['_parent'] = $context;
  120. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["hospitals"]) || array_key_exists("hospitals", $context) ? $context["hospitals"] : (function () { throw new RuntimeError('Variable "hospitals" does not exist.', 23, $this->source); })()));
  121. $context['_iterated'] = false;
  122. foreach ($context['_seq'] as $context["_key"] => $context["hospital"]) {
  123. // line 24
  124. yield " <tr>
  125. <td>";
  126. // line 25
  127. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "id", [], "any", false, false, false, 25), "html", null, true);
  128. yield "</td>
  129. <td>";
  130. // line 26
  131. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "name", [], "any", false, false, false, 26), "html", null, true);
  132. yield "</td>
  133. <td>";
  134. // line 27
  135. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "description", [], "any", false, false, false, 27), "html", null, true);
  136. yield "</td>
  137. <td>";
  138. // line 28
  139. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "municipality", [], "any", false, false, false, 28), "subdivision", [], "any", false, false, false, 28), "city", [], "any", false, false, false, 28), "html", null, true);
  140. yield "</td>
  141. <td>";
  142. // line 29
  143. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "municipality", [], "any", false, false, false, 29), "html", null, true);
  144. yield "</td>
  145. <td>";
  146. // line 30
  147. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "hospitalCategory", [], "any", false, false, false, 30), "html", null, true);
  148. yield "</td>
  149. <td>
  150. <a href=\"";
  151. // line 33
  152. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("hospital_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "id", [], "any", false, false, false, 33)]), "html", null, true);
  153. yield "\" class=\" w3-btn w3-teal w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-eye\"></span>";
  154. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("show", [], "messages");
  155. yield "</a>
  156. ";
  157. // line 34
  158. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_HABITECH")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  159. // line 35
  160. yield " <a href=\"";
  161. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("hospital_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "id", [], "any", false, false, false, 35)]), "html", null, true);
  162. yield "\" class=\" w3-btn w3-green w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-edit\"></span>";
  163. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("edit", [], "messages");
  164. yield "</a>
  165. <a href=\"";
  166. // line 36
  167. yield (string) $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("child_hospital_index", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["hospital"], "id", [], "any", false, false, false, 36)]), "html", null, true);
  168. yield "\" class=\" w3-btn w3-blue w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-child\"></span>";
  169. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("see children", [], "messages");
  170. yield "</a>
  171. ";
  172. }
  173. // line 38
  174. yield " </td>
  175. </tr>
  176. ";
  177. $context['_iterated'] = true;
  178. }
  179. // line 40
  180. if (!$context['_iterated']) {
  181. // line 41
  182. yield " <tr>
  183. <td colspan=\"5\">";
  184. // line 42
  185. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("no records found", [], "messages");
  186. yield "</td>
  187. </tr>
  188. ";
  189. }
  190. $_parent = $context['_parent'];
  191. unset($context['_seq'], $context['_key'], $context['hospital'], $context['_parent'], $context['_iterated']);
  192. $context = array_intersect_key($context, $_parent);
  193. $context += $_parent;
  194. // line 45
  195. yield " </tbody>
  196. </table>
  197. </div>
  198. ";
  199. // line 48
  200. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_HABITECH")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  201. // line 49
  202. yield " <a href=\"";
  203. yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("hospital_new");
  204. yield "\">";
  205. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Create new", [], "messages");
  206. yield "</a>
  207. ";
  208. }
  209. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  210. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  211. yield from [];
  212. }
  213. /**
  214. * @codeCoverageIgnore
  215. */
  216. public function getTemplateName(): string
  217. {
  218. return "hospital/index.html_1.twig";
  219. }
  220. /**
  221. * @codeCoverageIgnore
  222. */
  223. public function isTraitable(): bool
  224. {
  225. return false;
  226. }
  227. /**
  228. * @codeCoverageIgnore
  229. */
  230. public function getDebugInfo(): array
  231. {
  232. return array ( 228 => 49, 226 => 48, 221 => 45, 211 => 42, 208 => 41, 206 => 40, 200 => 38, 193 => 36, 186 => 35, 184 => 34, 178 => 33, 172 => 30, 168 => 29, 164 => 28, 160 => 27, 156 => 26, 152 => 25, 149 => 24, 144 => 23, 137 => 19, 133 => 18, 129 => 17, 125 => 16, 121 => 15, 117 => 14, 113 => 13, 102 => 6, 89 => 5, 65 => 3, 42 => 1,);
  233. }
  234. public function getSourceContext(): Source
  235. {
  236. return new Source("{% extends \x27base.html.twig\x27 %}
  237. {% block title %}{% trans %}Hospital index{%endtrans%} {% endblock %}
  238. {% block body %}
  239. <h1>{% trans %}Hospital index{% endtrans %}</h1>
  240. <div class=\x27table-scrollable\x27>
  241. <table >
  242. <thead>
  243. <tr>
  244. <th>{% trans %}Id{% endtrans %}</th>
  245. <th>{% trans %}Name{% endtrans %}</th>
  246. <th>{% trans %}Description{% endtrans %}</th>
  247. <th>{% trans %}City{% endtrans %}</th>
  248. <th>{% trans %}Subdivision{% endtrans %}</th>
  249. <th>{% trans %}Category{% endtrans %}</th>
  250. <th>{% trans %}actions{% endtrans %}</th>
  251. </tr>
  252. </thead>
  253. <tbody>
  254. {% for hospital in hospitals %}
  255. <tr>
  256. <td>{{ hospital.id }}</td>
  257. <td>{{ hospital.name }}</td>
  258. <td>{{ hospital.description }}</td>
  259. <td>{{ hospital.municipality.subdivision.city }}</td>
  260. <td>{{ hospital.municipality }}</td>
  261. <td>{{ hospital.hospitalCategory }}</td>
  262. <td>
  263. <a href=\"{{ path(\x27hospital_show\x27, {\x27id\x27: hospital.id}) }}\" class=\" w3-btn w3-teal w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-eye\"></span>{% trans %}show{% endtrans %}</a>
  264. {% if (is_granted(\x27ROLE_HABITECH\x27)) %}
  265. <a href=\"{{ path(\x27hospital_edit\x27, {\x27id\x27: hospital.id}) }}\" class=\" w3-btn w3-green w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-edit\"></span>{% trans %}edit{% endtrans %}</a>
  266. <a href=\"{{ path(\x27child_hospital_index\x27, {\x27id\x27: hospital.id}) }}\" class=\" w3-btn w3-blue w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-child\"></span>{% trans %}see children{% endtrans %}</a>
  267. {% endif %}
  268. </td>
  269. </tr>
  270. {% else %}
  271. <tr>
  272. <td colspan=\"5\">{% trans %} no records found{% endtrans %}</td>
  273. </tr>
  274. {% endfor %}
  275. </tbody>
  276. </table>
  277. </div>
  278. {% if is_granted(\x27ROLE_HABITECH\x27) %}
  279. <a href=\"{{ path(\x27hospital_new\x27) }}\">{% trans %} Create new {% endtrans %}</a>
  280. {% endif %}
  281. {% endblock %}
  282. ", "hospital/index.html_1.twig", "/var/www/vhosts/habitechsolutions.cm/birth.habitechsolutions.cm/templates/hospital/index.html_1.twig");
  283. }
  284. }