<?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;
/* users/userList.html.twig */
class __TwigTemplate_4c60d30b787d2b429b058ca3db10b70ff927df8f2935d23fc6912aa25c7511d5 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "users/userList.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "users/userList.html.twig"));
// line 1
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["request"]) || array_key_exists("request", $context) ? $context["request"] : (function () { throw new RuntimeError('Variable "request" does not exist.', 1, $this->source); })()));
$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["i"] => $context["user"]) {
// line 2
yield "\t";
$context["avatar"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, false, false, 2), "avatar", [], "any", false, false, false, 2);
// line 3
yield "\t";
$context["fullname"] = CoreExtension::getAttribute($this->env, $this->source, $context["user"], "fullName", [], "any", false, false, false, 3);
// line 4
yield "\t";
$context["firstname"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, false, false, 4), "firstName", [], "any", false, false, false, 4);
// line 5
yield "\t";
$context["lastname"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, false, false, 5), "lastName", [], "any", false, false, false, 5);
// line 6
yield "\t";
$context["departement"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, false, false, 6), "departement", [], "any", false, false, false, 6);
// line 7
yield "\t";
$context["categories"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, false, false, 7), "categories", [], "any", false, false, false, 7);
// line 8
yield "\t";
$context["type_acteur"] = CoreExtension::getAttribute($this->env, $this->source, $context["user"], "typologieActeurValue", [], "any", false, false, false, 8);
// line 9
yield "\t";
$context["territoire"] = "";
// line 10
yield "\t";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, true, false, 10), "territoireInterv", [], "any", true, true, false, 10) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, false, false, 10), "territoireInterv", [], "any", false, false, false, 10)))) {
// line 11
yield "\t\t";
$context["territoire"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, false, false, 11), "territoireInterv", [], "any", false, false, false, 11), "translations", [], "any", false, false, false, 11), 0, [], "array", false, false, false, 11), "translation", [], "any", false, false, false, 11);
// line 12
yield "\t";
}
// line 13
yield "\t<li class=\"userListRow\" data-id=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($context["i"], "html", null, true);
yield "\">
\t\t<div class=\"name\">
\t\t\t";
// line 15
if ((array_key_exists("avatar", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["avatar"]) || array_key_exists("avatar", $context) ? $context["avatar"] : (function () { throw new RuntimeError('Variable "avatar" does not exist.', 15, $this->source); })())))) {
// line 16
yield "\t\t\t\t";
$context["newAvatar"] = $this->extensions['Sulu\Bundle\MediaBundle\Twig\MediaTwigExtension']->resolveMediaFunction(CoreExtension::getAttribute($this->env, $this->source, (isset($context["avatar"]) || array_key_exists("avatar", $context) ? $context["avatar"] : (function () { throw new RuntimeError('Variable "avatar" does not exist.', 16, $this->source); })()), "id", [], "any", false, false, false, 16), "fr");
// line 17
yield "\t\t\t\t";
$context["avatarUrl"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["newAvatar"]) || array_key_exists("newAvatar", $context) ? $context["newAvatar"] : (function () { throw new RuntimeError('Variable "newAvatar" does not exist.', 17, $this->source); })()), "formats", [], "any", false, false, false, 17), "sulu-170x170.webp", [], "array", false, false, false, 17);
// line 18
yield "\t\t\t\t<img alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["fullname"]) || array_key_exists("fullname", $context) ? $context["fullname"] : (function () { throw new RuntimeError('Variable "fullname" does not exist.', 18, $this->source); })()), "html", null, true);
yield "\" src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["avatarUrl"]) || array_key_exists("avatarUrl", $context) ? $context["avatarUrl"] : (function () { throw new RuntimeError('Variable "avatarUrl" does not exist.', 18, $this->source); })()), "html", null, true);
yield "\" class=\"annuaire-avatar mr-1em\" width=\"";
yield $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, (isset($context["newAvatar"]) || array_key_exists("newAvatar", $context) ? $context["newAvatar"] : (function () { throw new RuntimeError('Variable "newAvatar" does not exist.', 18, $this->source); })()), "fileVersion", [], "any", false, false, false, 18), "properties", [], "any", false, false, false, 18), "width", [], "any", false, false, false, 18), "html", null, true);
yield "\" height=\"";
yield $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, (isset($context["newAvatar"]) || array_key_exists("newAvatar", $context) ? $context["newAvatar"] : (function () { throw new RuntimeError('Variable "newAvatar" does not exist.', 18, $this->source); })()), "fileVersion", [], "any", false, false, false, 18), "properties", [], "any", false, false, false, 18), "height", [], "any", false, false, false, 18), "html", null, true);
yield "\" loading=\"lazy\">
\t\t\t";
}
// line 20
yield "\t\t\t<a href=\"/user/";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["user"], "contact", [], "any", false, false, false, 20), "id", [], "any", false, false, false, 20), "html", null, true);
yield "\" class=\"nodeco cblue\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["firstname"]) || array_key_exists("firstname", $context) ? $context["firstname"] : (function () { throw new RuntimeError('Variable "firstname" does not exist.', 20, $this->source); })()), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), (isset($context["lastname"]) || array_key_exists("lastname", $context) ? $context["lastname"] : (function () { throw new RuntimeError('Variable "lastname" does not exist.', 20, $this->source); })())), "html", null, true);
yield "</a>
\t\t</div>
\t\t<div class=\"territoire\">
\t\t\t";
// line 23
if ((array_key_exists("territoire", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["territoire"]) || array_key_exists("territoire", $context) ? $context["territoire"] : (function () { throw new RuntimeError('Variable "territoire" does not exist.', 23, $this->source); })())))) {
// line 24
yield "\t\t\t\t";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["territoire"]) || array_key_exists("territoire", $context) ? $context["territoire"] : (function () { throw new RuntimeError('Variable "territoire" does not exist.', 24, $this->source); })()), "html", null, true);
yield "
\t\t\t";
}
// line 26
yield "\t\t</div>
\t\t<div class=\"dep\">
\t\t\t";
// line 28
if ((array_key_exists("departement", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["departement"]) || array_key_exists("departement", $context) ? $context["departement"] : (function () { throw new RuntimeError('Variable "departement" does not exist.', 28, $this->source); })())))) {
// line 29
yield "\t\t\t\t<div class=\"department-userlist cwhite fs10\">
\t\t\t\t\t<span class=\"dpt\">";
// line 30
yield $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, (isset($context["departement"]) || array_key_exists("departement", $context) ? $context["departement"] : (function () { throw new RuntimeError('Variable "departement" does not exist.', 30, $this->source); })()), "translations", [], "any", false, false, false, 30), 0, [], "array", false, false, false, 30), "translation", [], "any", false, false, false, 30), "html", null, true);
yield "</span>
\t\t\t\t</div>
\t\t\t";
}
// line 33
yield "\t\t</div>
\t\t<div class=\"thematiques\">
\t\t\t<div class=\"thematique-container dflex fwwrap\">
\t\t\t\t";
// line 36
yield from $this->loadTemplate("articles-blocks/thematiques-from-contact.html.twig", "users/userList.html.twig", 36)->unwrap()->yield($context);
// line 37
yield "\t\t\t</div>
\t\t</div>
\t\t<div class=\"typeActeur\">
\t\t\t";
// line 40
if ((array_key_exists("type_acteur", $context) && !Twig\Extension\CoreExtension::testEmpty((isset($context["type_acteur"]) || array_key_exists("type_acteur", $context) ? $context["type_acteur"] : (function () { throw new RuntimeError('Variable "type_acteur" does not exist.', 40, $this->source); })())))) {
// line 41
yield "\t\t\t\t";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["type_acteur"]) || array_key_exists("type_acteur", $context) ? $context["type_acteur"] : (function () { throw new RuntimeError('Variable "type_acteur" does not exist.', 41, $this->source); })()), "html", null, true);
yield "
\t\t\t";
}
// line 43
yield "\t\t</div>
\t</li>
";
++$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'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['i'], $context['user'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 46
yield "<li>
\t";
// line 47
yield from $this->loadTemplate("blocks/sub-blocks/pagination.html.twig", "users/userList.html.twig", 47)->unwrap()->yield($context);
// line 48
yield "</li>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "users/userList.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 195 => 48, 193 => 47, 190 => 46, 174 => 43, 168 => 41, 166 => 40, 161 => 37, 159 => 36, 154 => 33, 148 => 30, 145 => 29, 143 => 28, 139 => 26, 133 => 24, 131 => 23, 120 => 20, 108 => 18, 105 => 17, 102 => 16, 100 => 15, 94 => 13, 91 => 12, 88 => 11, 85 => 10, 82 => 9, 79 => 8, 76 => 7, 73 => 6, 70 => 5, 67 => 4, 64 => 3, 61 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% for i, user in request %}
\t{% set avatar = user.contact.avatar %}
\t{% set fullname = user.fullName %}
\t{% set firstname = user.contact.firstName %}
\t{% set lastname = user.contact.lastName %}
\t{% set departement = user.contact.departement %}
\t{% set categories = user.contact.categories %}
\t{% set type_acteur = user.typologieActeurValue %}
\t{% set territoire = \"\" %}
\t{% if user.contact.territoireInterv is defined and user.contact.territoireInterv is not empty %}
\t\t{% set territoire = user.contact.territoireInterv.translations[0].translation %}
\t{% endif %}
\t<li class=\"userListRow\" data-id=\"{{i}}\">
\t\t<div class=\"name\">
\t\t\t{% if avatar is defined and avatar is not empty %}
\t\t\t\t{% set newAvatar = sulu_resolve_media(avatar.id, 'fr') %}
\t\t\t\t{% set avatarUrl = newAvatar.formats['sulu-170x170.webp'] %}
\t\t\t\t<img alt=\"{{fullname}}\" src=\"{{avatarUrl}}\" class=\"annuaire-avatar mr-1em\" width=\"{{ newAvatar.fileVersion.properties.width }}\" height=\"{{ newAvatar.fileVersion.properties.height }}\" loading=\"lazy\">
\t\t\t{% endif %}
\t\t\t<a href=\"/user/{{user.contact.id}}\" class=\"nodeco cblue\">{{ firstname }} {{ lastname|upper }}</a>
\t\t</div>
\t\t<div class=\"territoire\">
\t\t\t{% if territoire is defined and territoire is not empty %}
\t\t\t\t{{ territoire }}
\t\t\t{% endif %}
\t\t</div>
\t\t<div class=\"dep\">
\t\t\t{% if departement is defined and departement is not empty %}
\t\t\t\t<div class=\"department-userlist cwhite fs10\">
\t\t\t\t\t<span class=\"dpt\">{{ departement.translations[0].translation }}</span>
\t\t\t\t</div>
\t\t\t{% endif %}
\t\t</div>
\t\t<div class=\"thematiques\">
\t\t\t<div class=\"thematique-container dflex fwwrap\">
\t\t\t\t{% include \"articles-blocks/thematiques-from-contact.html.twig\" %}
\t\t\t</div>
\t\t</div>
\t\t<div class=\"typeActeur\">
\t\t\t{% if type_acteur is defined and type_acteur is not empty %}
\t\t\t\t{{type_acteur}}
\t\t\t{% endif %}
\t\t</div>
\t</li>
{% endfor %}
<li>
\t{% include \"blocks/sub-blocks/pagination.html.twig\" %}
</li>
", "users/userList.html.twig", "/var/www/html/templates/users/userList.html.twig");
}
}