<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* hospital/index.html_1.twig */
class __TwigTemplate_c986f9f8c774c6570ce412425413e5d1 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "hospital/index.html_1.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "hospital/index.html_1.twig"));
$this->parent = $this->load("base.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Hospital index", [], "messages");
yield " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 6
yield " <h1>";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Hospital index", [], "messages");
yield "</h1>
<div class=\x27table-scrollable\x27>
<table >
<thead>
<tr>
<th>";
// line 13
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Id", [], "messages");
yield "</th>
<th>";
// line 14
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Name", [], "messages");
yield "</th>
<th>";
// line 15
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Description", [], "messages");
yield "</th>
<th>";
// line 16
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("City", [], "messages");
yield "</th>
<th>";
// line 17
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Subdivision", [], "messages");
yield "</th>
<th>";
// line 18
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Category", [], "messages");
yield "</th>
<th>";
// line 19
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("actions", [], "messages");
yield "</th>
</tr>
</thead>
<tbody>
";
// line 23
$context['_parent'] = $context;
$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); })()));
$context['_iterated'] = false;
foreach ($context['_seq'] as $context["_key"] => $context["hospital"]) {
// line 24
yield " <tr>
<td>";
// line 25
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);
yield "</td>
<td>";
// line 26
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);
yield "</td>
<td>";
// line 27
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);
yield "</td>
<td>";
// line 28
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);
yield "</td>
<td>";
// line 29
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);
yield "</td>
<td>";
// line 30
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);
yield "</td>
<td>
<a href=\"";
// line 33
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);
yield "\" class=\" w3-btn w3-teal w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-eye\"></span>";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("show", [], "messages");
yield "</a>
";
// line 34
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_HABITECH")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 35
yield " <a href=\"";
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);
yield "\" class=\" w3-btn w3-green w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-edit\"></span>";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("edit", [], "messages");
yield "</a>
<a href=\"";
// line 36
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);
yield "\" class=\" w3-btn w3-blue w3-animate-fading w3-small w3-round-xlarge\"><span class=\"fa fa-child\"></span>";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("see children", [], "messages");
yield "</a>
";
}
// line 38
yield " </td>
</tr>
";
$context['_iterated'] = true;
}
// line 40
if (!$context['_iterated']) {
// line 41
yield " <tr>
<td colspan=\"5\">";
// line 42
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("no records found", [], "messages");
yield "</td>
</tr>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['hospital'], $context['_parent'], $context['_iterated']);
$context = array_intersect_key($context, $_parent);
$context += $_parent;
// line 45
yield " </tbody>
</table>
</div>
";
// line 48
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_HABITECH")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 49
yield " <a href=\"";
yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("hospital_new");
yield "\">";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Create new", [], "messages");
yield "</a>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "hospital/index.html_1.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \x27base.html.twig\x27 %}
{% block title %}{% trans %}Hospital index{%endtrans%} {% endblock %}
{% block body %}
<h1>{% trans %}Hospital index{% endtrans %}</h1>
<div class=\x27table-scrollable\x27>
<table >
<thead>
<tr>
<th>{% trans %}Id{% endtrans %}</th>
<th>{% trans %}Name{% endtrans %}</th>
<th>{% trans %}Description{% endtrans %}</th>
<th>{% trans %}City{% endtrans %}</th>
<th>{% trans %}Subdivision{% endtrans %}</th>
<th>{% trans %}Category{% endtrans %}</th>
<th>{% trans %}actions{% endtrans %}</th>
</tr>
</thead>
<tbody>
{% for hospital in hospitals %}
<tr>
<td>{{ hospital.id }}</td>
<td>{{ hospital.name }}</td>
<td>{{ hospital.description }}</td>
<td>{{ hospital.municipality.subdivision.city }}</td>
<td>{{ hospital.municipality }}</td>
<td>{{ hospital.hospitalCategory }}</td>
<td>
<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>
{% if (is_granted(\x27ROLE_HABITECH\x27)) %}
<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>
<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>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan=\"5\">{% trans %} no records found{% endtrans %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if is_granted(\x27ROLE_HABITECH\x27) %}
<a href=\"{{ path(\x27hospital_new\x27) }}\">{% trans %} Create new {% endtrans %}</a>
{% endif %}
{% endblock %}
", "hospital/index.html_1.twig", "/var/www/vhosts/habitechsolutions.cm/birth.habitechsolutions.cm/templates/hospital/index.html_1.twig");
}
}