<?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\Source;
use Twig\Template;
/* user_management/users/index.html.twig */
class __TwigTemplate_20f84ef2a382ad825d979c16e5d0402c extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'breadcrumb' => [$this, 'block_breadcrumb'],
'pagetitle' => [$this, 'block_pagetitle'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "base.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$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", "user_management/users/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "user_management/users/index.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "user_management/users/index.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
public function block_title($context, array $blocks = [])
{
$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 "User index
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 5
public function block_breadcrumb($context, array $blocks = [])
{
$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", "breadcrumb"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumb"));
// line 6
yield "\t<li class=\"breadcrumb-item\">
\t\t<a href=\"";
// line 7
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_index");
yield "\">";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("User", [], "messages");
// line 9
yield "</a>
\t</li>
\t<li class=\"breadcrumb-item active\">";
// line 11
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("List", [], "messages");
// line 13
yield "</li>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 15
public function block_pagetitle($context, array $blocks = [])
{
$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", "pagetitle"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "pagetitle"));
// line 16
yield "\t";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("User", [], "messages");
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
// line 19
public function block_body($context, array $blocks = [])
{
$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 20
yield "
";
// line 21
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("user_create")) {
// line 22
yield "<a href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_new");
yield "\" class=\"btn btn-sm btn-success\">
\t<span class=\"fa fa-plus\"></span>
\t";
// line 24
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Create new", [], "messages");
yield "</a>
";
}
// line 26
yield "<br>
\t<div class=\"card card-info mt-3 \">
\t\t<div class=\"card-header\">
\t\t\t<h5>";
// line 30
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Users List", [], "messages");
// line 32
yield "</h5>
\t\t</div>
\t\t<div class=\"card-body\">
\t\t\t<table class=\"table\">
\t\t\t\t<thead>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<th>#</th>
\t\t\t\t\t\t<th>";
// line 39
yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->sortable($this->env, (isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 39, $this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Name"), "u.full_name");
yield "</th>
\t\t\t\t\t\t<th>";
// line 40
yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->sortable($this->env, (isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 40, $this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Email"), "u.email");
yield "</th>
\t\t\t\t\t\t<th>";
// line 41
yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->sortable($this->env, (isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 41, $this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Unit"), "u.unit");
yield "</th>
\t\t\t\t\t\t<th>";
// line 42
yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->sortable($this->env, (isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 42, $this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Position"), "u.position");
yield "</th>
\t\t\t\t\t\t<th>";
// line 43
yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->sortable($this->env, (isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 43, $this->source); })()), $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Active"), "u.isActive");
yield "</th>
\t\t\t\t\t\t<th>";
// line 44
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Actions", [], "messages");
yield "</th>
\t\t\t\t\t</tr>
\t\t\t\t</thead>
\t\t\t\t<tbody>
\t\t\t\t\t";
// line 48
$context["i"] = 1;
// line 49
yield "\t\t\t\t\t";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 49, $this->source); })()));
$context['_iterated'] = false;
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["user"]) {
// line 50
yield "\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td>";
// line 51
yield Twig\Extension\EscaperExtension::escape($this->env, (isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 51, $this->source); })()), "html", null, true);
yield "
\t\t\t\t\t\t\t\t";
// line 52
$context["i"] = ((isset($context["i"]) || array_key_exists("i", $context) ? $context["i"] : (function () { throw new RuntimeError('Variable "i" does not exist.', 52, $this->source); })()) + 1);
// line 53
yield "\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t<td>";
// line 54
yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "fullName", [], "any", false, false, false, 54), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t<td>";
// line 55
yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "email", [], "any", false, false, false, 55), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t<td>";
// line 56
yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "unit", [], "any", false, false, false, 56), "name", [], "any", false, false, false, 56), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t<td>";
// line 57
yield Twig\Extension\EscaperExtension::escape($this->env, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "position", [], "any", false, false, false, 57), "html", null, true);
yield "</td>
\t\t\t\t\t\t\t<td>";
// line 58
yield ((CoreExtension::getAttribute($this->env, $this->source, $context["user"], "isActive", [], "any", false, false, false, 58)) ? ("Yes") : ("No"));
yield "</td>
\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t";
// line 60
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("user_show")) {
// line 61
yield "\t\t\t\t\t\t\t\t\t<a href=\"";
yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_show", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["user"], "id", [], "any", false, false, false, 61)]), "html", null, true);
yield "\" class=\"btn btn-xs btn-primary\"><span class=\"fa fa-eye\"></span>";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Show", [], "messages");
yield "</a>
\t\t\t\t\t\t\t\t";
}
// line 63
yield "\t\t\t\t\t\t\t\t";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("user_edit")) {
// line 64
yield "\t\t\t\t\t\t\t\t\t<a href=\"";
yield Twig\Extension\EscaperExtension::escape($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("user_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["user"], "id", [], "any", false, false, false, 64)]), "html", null, true);
yield "\" class=\"btn btn-xs btn-warning text-white\"><span class=\"fa fa-pen\"></span>
\t\t\t\t\t\t\t\t\t";
// line 65
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Edit", [], "messages");
// line 66
yield "\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t";
}
// line 68
yield "\t\t\t\t\t\t\t\t";
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("user_delete")) {
// line 69
yield "\t\t\t\t\t\t\t\t\t";
yield Twig\Extension\CoreExtension::include($this->env, $context, "user_management/users/_delete_form.html.twig");
yield "
\t\t\t\t\t\t\t\t";
}
// line 71
yield "\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t</tr>
\t\t\t\t\t";
$context['_iterated'] = true;
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
if (!$context['_iterated']) {
// line 74
yield "\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td colspan=\"7\">";
// line 75
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("no records found", [], "messages");
yield "</td>
\t\t\t\t\t\t</tr>
\t\t\t\t\t";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['user'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 78
yield "\t\t\t\t</tbody>
\t\t\t</table>
\t\t\t<div class=\"navigation\">";
// line 80
yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["users"]) || array_key_exists("users", $context) ? $context["users"] : (function () { throw new RuntimeError('Variable "users" does not exist.', 80, $this->source); })()));
yield "</div>
\t\t</div>
\t</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "user_management/users/index.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 328 => 80, 324 => 78, 315 => 75, 312 => 74, 297 => 71, 291 => 69, 288 => 68, 284 => 66, 282 => 65, 277 => 64, 274 => 63, 266 => 61, 264 => 60, 259 => 58, 255 => 57, 251 => 56, 247 => 55, 243 => 54, 240 => 53, 238 => 52, 234 => 51, 231 => 50, 212 => 49, 210 => 48, 203 => 44, 199 => 43, 195 => 42, 191 => 41, 187 => 40, 183 => 39, 174 => 32, 172 => 30, 166 => 26, 161 => 24, 155 => 22, 153 => 21, 150 => 20, 140 => 19, 128 => 16, 118 => 15, 106 => 13, 104 => 11, 100 => 9, 96 => 7, 93 => 6, 83 => 5, 62 => 3, 39 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}User index
{% endblock %}
{% block breadcrumb %}
\t<li class=\"breadcrumb-item\">
\t\t<a href=\"{{path('user_index')}}\">{% trans %}
\t\t\tUser
\t\t\t{% endtrans %}</a>
\t</li>
\t<li class=\"breadcrumb-item active\">{% trans %}
\t\tList
\t\t{% endtrans %}</li>
{% endblock %}
{% block pagetitle %}
\t{% trans %}
\tUser{% endtrans %}
{% endblock %}
{% block body %}
{% if is_granted(\"user_create\") %}
<a href=\"{{ path('user_new') }}\" class=\"btn btn-sm btn-success\">
\t<span class=\"fa fa-plus\"></span>
\t{% trans %}Create new{% endtrans %}</a>
{% endif %}
<br>
\t<div class=\"card card-info mt-3 \">
\t\t<div class=\"card-header\">
\t\t\t<h5>{% trans %}
\t\t\t\tUsers List
\t\t\t\t{% endtrans %}</h5>
\t\t</div>
\t\t<div class=\"card-body\">
\t\t\t<table class=\"table\">
\t\t\t\t<thead>
\t\t\t\t\t<tr>
\t\t\t\t\t\t<th>#</th>
\t\t\t\t\t\t<th>{{ knp_pagination_sortable(users, 'Name'|trans, 'u.full_name') }}</th>
\t\t\t\t\t\t<th>{{ knp_pagination_sortable(users, 'Email'|trans, 'u.email') }}</th>
\t\t\t\t\t\t<th>{{ knp_pagination_sortable(users, 'Unit'|trans, 'u.unit') }}</th>
\t\t\t\t\t\t<th>{{ knp_pagination_sortable(users, 'Position'|trans, 'u.position') }}</th>
\t\t\t\t\t\t<th>{{ knp_pagination_sortable(users, 'Active'|trans, 'u.isActive') }}</th>
\t\t\t\t\t\t<th>{% trans %}Actions{% endtrans %}</th>
\t\t\t\t\t</tr>
\t\t\t\t</thead>
\t\t\t\t<tbody>
\t\t\t\t\t{% set i = 1 %}
\t\t\t\t\t{% for user in users %}
\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td>{{ i }}
\t\t\t\t\t\t\t\t{% set i = i+1 %}
\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t\t<td>{{ user.fullName }}</td>
\t\t\t\t\t\t\t<td>{{ user.email }}</td>
\t\t\t\t\t\t\t<td>{{ user.unit.name }}</td>
\t\t\t\t\t\t\t<td>{{ user.position }}</td>
\t\t\t\t\t\t\t<td>{{ user.isActive ? 'Yes' : 'No' }}</td>
\t\t\t\t\t\t\t<td>
\t\t\t\t\t\t\t\t{% if is_granted(\"user_show\") %}
\t\t\t\t\t\t\t\t\t<a href=\"{{ path('user_show', {'id': user.id}) }}\" class=\"btn btn-xs btn-primary\"><span class=\"fa fa-eye\"></span>{% trans %}Show{% endtrans %}</a>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% if is_granted(\"user_edit\") %}
\t\t\t\t\t\t\t\t\t<a href=\"{{ path('user_edit', {'id': user.id}) }}\" class=\"btn btn-xs btn-warning text-white\"><span class=\"fa fa-pen\"></span>
\t\t\t\t\t\t\t\t\t{% trans %}Edit{% endtrans %}
\t\t\t\t\t\t\t\t\t</a>
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t\t{% if is_granted(\"user_delete\") %}
\t\t\t\t\t\t\t\t\t{{ include('user_management/users/_delete_form.html.twig') }}
\t\t\t\t\t\t\t\t{% endif %}
\t\t\t\t\t\t\t</td>
\t\t\t\t\t\t</tr>
\t\t\t\t\t{% else %}
\t\t\t\t\t\t<tr>
\t\t\t\t\t\t\t<td colspan=\"7\">{% trans %}no records found{% endtrans %}</td>
\t\t\t\t\t\t</tr>
\t\t\t\t\t{% endfor %}
\t\t\t\t</tbody>
\t\t\t</table>
\t\t\t<div class=\"navigation\">{{ knp_pagination_render(users) }}</div>
\t\t</div>
\t</div>
{% endblock %}
", "user_management/users/index.html.twig", "/var/www/project.digitalethiopia.gov.et/templates/user_management/users/index.html.twig");
}
}