<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* network/profile/widgets/profile_widget_downloads.html.twig */
class __TwigTemplate_2732a498c8f10caca961214b0f219be02b5cccafc467345cfd222f170b879331 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", "network/profile/widgets/profile_widget_downloads.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "network/profile/widgets/profile_widget_downloads.html.twig"));
// line 1
$context["downloads"] = twig_get_attribute($this->env, $this->source, (isset($context["profile"]) || array_key_exists("profile", $context) ? $context["profile"] : (function () { throw new RuntimeError('Variable "profile" does not exist.', 1, $this->source); })()), "downloads", [], "any", false, false, false, 1);
// line 2
if ((isset($context["downloads"]) || array_key_exists("downloads", $context) ? $context["downloads"] : (function () { throw new RuntimeError('Variable "downloads" does not exist.', 2, $this->source); })())) {
// line 3
echo " ";
$this->loadTemplate("network/profile/widgets/profile_widget_downloads.html.twig", "network/profile/widgets/profile_widget_downloads.html.twig", 3, "1219249931")->display($context);
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "network/profile/widgets/profile_widget_downloads.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% set downloads = profile.downloads %}
{% if downloads %}
{% embed 'network/widget/widget.html.twig' %}
{% block content %}
<div>
<h3 class=\"mb-5 text-lg font-medium uppercase font-headline text-neutral-600\">
{{ 'Downloads'|trans }}
</h3>
<ul class=\"grid gap-3\">
{% for download in downloads %}
<li class=\"flex gap-2\">
{% include 'icons/download.svg.twig' with { class: 'w-5 h-5 mt-px flex-shrink-0' } %}
<a href=\"{{ absolute_url(download.element.fullPath) }}\"
target=\"_blank\"
title=\"{{ download.data.title }}\"
class=\"grid\"
rel=\"noopener noreferrer\"
download>
<span class=\"truncate\">{{ download.data.title ?? download.element.key }}</span>
<span class=\"text-sm truncate text-neutral-500\">
{{ download.element.mimetype }} [{{ download.element.filesize(true) }}]
</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endblock %}
{% endembed %}
{% endif %}
", "network/profile/widgets/profile_widget_downloads.html.twig", "/var/www/vhosts/3forone.ch/httpdocs/abowire/templates/network/profile/widgets/profile_widget_downloads.html.twig");
}
}
/* network/profile/widgets/profile_widget_downloads.html.twig */
class __TwigTemplate_2732a498c8f10caca961214b0f219be02b5cccafc467345cfd222f170b879331___1219249931 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
return "network/widget/widget.html.twig";
}
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", "network/profile/widgets/profile_widget_downloads.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "network/profile/widgets/profile_widget_downloads.html.twig"));
$this->parent = $this->loadTemplate("network/widget/widget.html.twig", "network/profile/widgets/profile_widget_downloads.html.twig", 3);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 4
public function block_content($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(), "block", "content"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 5
echo " <div>
<h3 class=\"mb-5 text-lg font-medium uppercase font-headline text-neutral-600\">
";
// line 7
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("Downloads"), "html", null, true);
echo "
</h3>
<ul class=\"grid gap-3\">
";
// line 10
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["downloads"]) || array_key_exists("downloads", $context) ? $context["downloads"] : (function () { throw new RuntimeError('Variable "downloads" does not exist.', 10, $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["_key"] => $context["download"]) {
// line 11
echo " <li class=\"flex gap-2\">
";
// line 12
$this->loadTemplate("icons/download.svg.twig", "network/profile/widgets/profile_widget_downloads.html.twig", 12)->display(twig_array_merge($context, ["class" => "w-5 h-5 mt-px flex-shrink-0"]));
// line 13
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\HttpFoundationExtension']->generateAbsoluteUrl(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["download"], "element", [], "any", false, false, false, 13), "fullPath", [], "any", false, false, false, 13)), "html", null, true);
echo "\"
target=\"_blank\"
title=\"";
// line 15
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["download"], "data", [], "any", false, false, false, 15), "title", [], "any", false, false, false, 15), "html", null, true);
echo "\"
class=\"grid\"
rel=\"noopener noreferrer\"
download>
<span class=\"truncate\">";
// line 19
echo twig_escape_filter($this->env, (((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["download"], "data", [], "any", false, true, false, 19), "title", [], "any", true, true, false, 19) && !(null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["download"], "data", [], "any", false, true, false, 19), "title", [], "any", false, false, false, 19)))) ? (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["download"], "data", [], "any", false, true, false, 19), "title", [], "any", false, false, false, 19)) : (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["download"], "element", [], "any", false, false, false, 19), "key", [], "any", false, false, false, 19))), "html", null, true);
echo "</span>
<span class=\"text-sm truncate text-neutral-500\">
";
// line 21
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["download"], "element", [], "any", false, false, false, 21), "mimetype", [], "any", false, false, false, 21), "html", null, true);
echo " [";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["download"], "element", [], "any", false, false, false, 21), "filesize", [0 => true], "method", false, false, false, 21), "html", null, true);
echo "]
</span>
</a>
</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['_key'], $context['download'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo " </ul>
</div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "network/profile/widgets/profile_widget_downloads.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 233 => 26, 212 => 21, 207 => 19, 200 => 15, 194 => 13, 192 => 12, 189 => 11, 172 => 10, 166 => 7, 162 => 5, 152 => 4, 47 => 3, 45 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% set downloads = profile.downloads %}
{% if downloads %}
{% embed 'network/widget/widget.html.twig' %}
{% block content %}
<div>
<h3 class=\"mb-5 text-lg font-medium uppercase font-headline text-neutral-600\">
{{ 'Downloads'|trans }}
</h3>
<ul class=\"grid gap-3\">
{% for download in downloads %}
<li class=\"flex gap-2\">
{% include 'icons/download.svg.twig' with { class: 'w-5 h-5 mt-px flex-shrink-0' } %}
<a href=\"{{ absolute_url(download.element.fullPath) }}\"
target=\"_blank\"
title=\"{{ download.data.title }}\"
class=\"grid\"
rel=\"noopener noreferrer\"
download>
<span class=\"truncate\">{{ download.data.title ?? download.element.key }}</span>
<span class=\"text-sm truncate text-neutral-500\">
{{ download.element.mimetype }} [{{ download.element.filesize(true) }}]
</span>
</a>
</li>
{% endfor %}
</ul>
</div>
{% endblock %}
{% endembed %}
{% endif %}
", "network/profile/widgets/profile_widget_downloads.html.twig", "/var/www/vhosts/3forone.ch/httpdocs/abowire/templates/network/profile/widgets/profile_widget_downloads.html.twig");
}
}