<?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;
/* document/areabricks/current-achievements-brick/view.html.twig */
class __TwigTemplate_62f7f69dae4a3d9df3814e2f9e3603d3bc2534c8222e949834de5509a47e58aa 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", "document/areabricks/current-achievements-brick/view.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "document/areabricks/current-achievements-brick/view.html.twig"));
// line 27
echo "<div id=\"";
echo twig_escape_filter($this->env, ("areabrick_achievements_list" . (isset($context["brickId"]) || array_key_exists("brickId", $context) ? $context["brickId"] : (function () { throw new RuntimeError('Variable "brickId" does not exist.', 27, $this->source); })())), "html", null, true);
echo "\"
class=\"max-w-[90vw] overflow-x-scroll lg:overflow-auto\">
<div class=\"grid w-full grid-cols-12 gap-2 px-5 py-2 text-sm font-bold text-white uppercase bg-primary-500\"
style=\"min-width: 1024px\">
<div>
";
// line 32
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("profile.achievements.date"), "html", null, true);
echo "
</div>
<div class=\"flex col-span-2\">
";
// line 35
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("profile.achievements.horse"), "html", null, true);
echo "
</div>
<div class=\"col-span-2\">
";
// line 38
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("profile.achievements.racingtrack"), "html", null, true);
echo "
</div>
<div class=\"col-span-5\">
";
// line 42
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("profile.achievements.description"), "html", null, true);
echo "
</div>
<div class=\"col-span-2\">
";
// line 45
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("profile.achievements.participants"), "html", null, true);
echo "
</div>
</div>
";
// line 48
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["achievements"]) || array_key_exists("achievements", $context) ? $context["achievements"] : (function () { throw new RuntimeError('Variable "achievements" does not exist.', 48, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["achievement"]) {
// line 49
echo " <div class=\"grid items-center w-full grid-cols-12 gap-2 px-5 py-2 text-sm even:bg-white odd:bg-neutral-50\"
style=\"min-width: 1024px\">
<div>
";
// line 52
if (twig_get_attribute($this->env, $this->source, $context["achievement"], "date", [], "any", false, false, false, 52)) {
// line 53
echo " ";
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["achievement"], "date", [], "any", false, false, false, 53), "d.m.Y"), "html", null, true);
echo "
";
} else {
// line 55
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("achievement.item.no.date"), "html", null, true);
echo "
";
}
// line 57
echo " </div>
<div class=\"col-span-2 font-headline\">
";
// line 59
if (twig_get_attribute($this->env, $this->source, $context["achievement"], "horse", [], "any", false, false, false, 59)) {
// line 60
echo " <a class=\"font-medium hover:opacity-70\"
href=\"";
// line 61
echo twig_escape_filter($this->env, $this->env->getFunction('pimcore_url')->getCallable()(["object" => twig_get_attribute($this->env, $this->source, $context["achievement"], "horse", [], "any", false, false, false, 61)]), "html", null, true);
echo "\">
";
// line 62
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "horse", [], "any", false, false, false, 62), "displayName", [], "any", false, false, false, 62), "html", null, true);
echo "
</a>
";
// line 65
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "horse", [], "any", false, false, false, 65), "father", [], "any", false, false, false, 65)) {
// line 66
echo " <br>
<p>";
// line 67
echo twig_escape_filter($this->env, ("v. " . twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "horse", [], "any", false, false, false, 67), "father", [], "any", false, false, false, 67)), "html", null, true);
echo "</span>
";
}
// line 69
echo " ";
}
// line 70
echo " </div>
<div class=\"col-span-2\">
";
// line 72
if (twig_get_attribute($this->env, $this->source, $context["achievement"], "racingtrack", [], "any", false, false, false, 72)) {
// line 73
echo " <a class=\"flex items-center gap-1 hover:opacity-70\"
href=\"";
// line 74
echo twig_escape_filter($this->env, $this->env->getFunction('pimcore_url')->getCallable()(["object" => twig_get_attribute($this->env, $this->source, $context["achievement"], "racingtrack", [], "any", false, false, false, 74)]), "html", null, true);
echo "\">
";
// line 75
if (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "racingtrack", [], "any", false, false, false, 75), "country", [], "any", false, false, false, 75)) {
// line 76
echo " <img class=\"object-contain w-6 h-6\"
loading=\"lazy\"
src=\"https://flagcdn.com/w320/";
// line 78
echo twig_escape_filter($this->env, twig_lower_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "racingtrack", [], "any", false, false, false, 78), "country", [], "any", false, false, false, 78)), "html", null, true);
echo ".png\"
alt=\"";
// line 79
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "racingtrack", [], "any", false, false, false, 79), "country", [], "any", false, false, false, 79), "html", null, true);
echo "\" />
";
}
// line 81
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "racingtrack", [], "any", false, false, false, 81), "name", [], "any", false, false, false, 81), "html", null, true);
echo "
</a>
";
} else {
// line 84
echo " ";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("achievement.item.no.racingtrack"), "html", null, true);
echo "
";
}
// line 86
echo " </div>
<div class=\"col-span-5\">
<span class=\"font-semibold\">";
// line 89
echo twig_escape_filter($this->env, (("(" . $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans(twig_get_attribute($this->env, $this->source, $context["achievement"], "category", [], "any", false, false, false, 89))) . ")"), "html", null, true);
echo "</span>
</br>
";
// line 91
echo twig_get_attribute($this->env, $this->source, $context["achievement"], "description", [], "any", false, false, false, 91);
echo "
</div>
<div class=\"flex flex-wrap col-span-2 gap-2\">
";
// line 103
echo " ";
if (twig_get_attribute($this->env, $this->source, $context["achievement"], "profile", [], "any", false, false, false, 103)) {
// line 104
echo " <a title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "profile", [], "any", false, false, false, 104), "name", [], "any", false, false, false, 104), "html", null, true);
echo "\"
class=\"\"
href=\"";
// line 106
echo twig_escape_filter($this->env, $this->env->getFunction('pimcore_url')->getCallable()(["object" => twig_get_attribute($this->env, $this->source, $context["achievement"], "profile", [], "any", false, false, false, 106)]), "html", null, true);
echo "\">
";
// line 107
$this->loadTemplate("component/avatar.html.twig", "document/areabricks/current-achievements-brick/view.html.twig", 107)->display(twig_to_array(["avatar" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 108
$context["achievement"], "profile", [], "any", false, false, false, 108), "avatar", [], "any", false, false, false, 108), "initials" => $this->extensions['App\Core\Twig\Extension\InitialsExtension']->generateInitials(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, // line 109
$context["achievement"], "profile", [], "any", false, false, false, 109), "name", [], "any", false, false, false, 109)), "size" => "tiny"]));
// line 112
echo " </a>
";
}
// line 114
echo "
";
// line 115
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["achievement"], "profiles", [], "any", false, false, false, 115));
foreach ($context['_seq'] as $context["_key"] => $context["profile"]) {
// line 116
echo " ";
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["achievement"], "profile", [], "any", false, false, false, 116), "id", [], "any", false, false, false, 116) != twig_get_attribute($this->env, $this->source, $context["profile"], "id", [], "any", false, false, false, 116))) {
// line 117
echo " <a title=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["profile"], "name", [], "any", false, false, false, 117), "html", null, true);
echo "\" class=\"\" href=\"";
echo twig_escape_filter($this->env, $this->env->getFunction('pimcore_url')->getCallable()(["object" => $context["profile"]]), "html", null, true);
echo "\">
";
// line 118
$this->loadTemplate("component/avatar.html.twig", "document/areabricks/current-achievements-brick/view.html.twig", 118)->display(twig_to_array(["avatar" => twig_get_attribute($this->env, $this->source, // line 119
$context["profile"], "avatar", [], "any", false, false, false, 119), "initials" => $this->extensions['App\Core\Twig\Extension\InitialsExtension']->generateInitials(twig_get_attribute($this->env, $this->source, // line 120
$context["profile"], "name", [], "any", false, false, false, 120)), "size" => "tiny"]));
// line 123
echo " </a>
";
}
// line 125
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['profile'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 126
echo " </div>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['achievement'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 129
echo "</div>
";
// line 130
if ((twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 130, $this->source); })()), "offset", [], "any", false, false, false, 130), "vars", [], "any", false, false, false, 130), "value", [], "any", false, false, false, 130) < (isset($context["totalCount"]) || array_key_exists("totalCount", $context) ? $context["totalCount"] : (function () { throw new RuntimeError('Variable "totalCount" does not exist.', 130, $this->source); })()))) {
// line 131
echo " <div class=\"flex justify-center w-full\" id=\"";
echo twig_escape_filter($this->env, ("areabrick_load_button" . (isset($context["brickId"]) || array_key_exists("brickId", $context) ? $context["brickId"] : (function () { throw new RuntimeError('Variable "brickId" does not exist.', 131, $this->source); })())), "html", null, true);
echo "\">
";
// line 132
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 132, $this->source); })()), 'form_start');
echo "
";
// line 133
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 133, $this->source); })()), "offset", [], "any", false, false, false, 133), 'widget', ["value" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 133, $this->source); })()), "offset", [], "any", false, false, false, 133), "vars", [], "any", false, false, false, 133), "value", [], "any", false, false, false, 133)]);
echo "
";
// line 135
echo " ";
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(twig_get_attribute($this->env, $this->source, (isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 135, $this->source); })()), "submit", [], "any", false, false, false, 135), 'widget', ["attr" => ["class" => "btn btn-sm btn-neutral my-4 mx-auto"]]);
echo "
";
// line 137
echo $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->renderBlock((isset($context["form"]) || array_key_exists("form", $context) ? $context["form"] : (function () { throw new RuntimeError('Variable "form" does not exist.', 137, $this->source); })()), 'form_end');
echo "
</div>
";
}
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "document/areabricks/current-achievements-brick/view.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 279 => 137, 273 => 135, 269 => 133, 265 => 132, 260 => 131, 258 => 130, 255 => 129, 247 => 126, 241 => 125, 237 => 123, 235 => 120, 234 => 119, 233 => 118, 226 => 117, 223 => 116, 219 => 115, 216 => 114, 212 => 112, 210 => 109, 209 => 108, 208 => 107, 204 => 106, 198 => 104, 195 => 103, 189 => 91, 184 => 89, 179 => 86, 173 => 84, 166 => 81, 161 => 79, 157 => 78, 153 => 76, 151 => 75, 147 => 74, 144 => 73, 142 => 72, 138 => 70, 135 => 69, 130 => 67, 127 => 66, 125 => 65, 119 => 62, 115 => 61, 112 => 60, 110 => 59, 106 => 57, 100 => 55, 94 => 53, 92 => 52, 87 => 49, 83 => 48, 77 => 45, 71 => 42, 64 => 38, 58 => 35, 52 => 32, 43 => 27,);
}
public function getSourceContext()
{
return new Source("{# {% set viewAll = pimcore_input('view-all', { placeholder: 'Linktext' }) %}
<div>
<div class=\"grid gap-4\">
{% for raceday in racedays %}
{% include 'document/areabricks/current-races-brick/race-tile.html.twig' with {
raceday: raceday.day,
races: raceday.races
} %}
{% else %}
{% include 'document/areabricks/current-races-brick/empty-tile.html.twig' %}
{% endfor %}
</div>
{% if editmode or pimcore_link('view-full') is not empty %}
<div class=\"mt-12\">
{% set link = pimcore_link('view-full', { placeholder: 'Link' }) %}
{% include 'component/button.html.twig' with {
text: editmode ? link : link.text,
type: 'primary',
icon_after: 'arrow-right-tail',
attr: { href: link.href, class: 'w-full' }
} only %}
</div>
{% endif %}
</div> #}
<div id=\"{{ 'areabrick_achievements_list' ~ brickId }}\"
class=\"max-w-[90vw] overflow-x-scroll lg:overflow-auto\">
<div class=\"grid w-full grid-cols-12 gap-2 px-5 py-2 text-sm font-bold text-white uppercase bg-primary-500\"
style=\"min-width: 1024px\">
<div>
{{ 'profile.achievements.date'|trans }}
</div>
<div class=\"flex col-span-2\">
{{ 'profile.achievements.horse'|trans }}
</div>
<div class=\"col-span-2\">
{{ 'profile.achievements.racingtrack'|trans }}
</div>
<div class=\"col-span-5\">
{{ 'profile.achievements.description'|trans }}
</div>
<div class=\"col-span-2\">
{{ 'profile.achievements.participants'|trans }}
</div>
</div>
{% for achievement in achievements %}
<div class=\"grid items-center w-full grid-cols-12 gap-2 px-5 py-2 text-sm even:bg-white odd:bg-neutral-50\"
style=\"min-width: 1024px\">
<div>
{% if achievement.date %}
{{ achievement.date|date('d.m.Y') }}
{% else %}
{{ 'achievement.item.no.date'|trans }}
{% endif %}
</div>
<div class=\"col-span-2 font-headline\">
{% if achievement.horse %}
<a class=\"font-medium hover:opacity-70\"
href=\"{{ pimcore_url({ object: achievement.horse }) }}\">
{{ achievement.horse.displayName }}
</a>
{% if achievement.horse.father %}
<br>
<p>{{'v. ' ~ achievement.horse.father}}</span>
{% endif %}
{% endif %}
</div>
<div class=\"col-span-2\">
{% if achievement.racingtrack %}
<a class=\"flex items-center gap-1 hover:opacity-70\"
href=\"{{ pimcore_url({ object: achievement.racingtrack }) }}\">
{% if achievement.racingtrack.country %}
<img class=\"object-contain w-6 h-6\"
loading=\"lazy\"
src=\"https://flagcdn.com/w320/{{ achievement.racingtrack.country|lower }}.png\"
alt=\"{{ achievement.racingtrack.country }}\" />
{% endif %}
{{ achievement.racingtrack.name }}
</a>
{% else %}
{{ 'achievement.item.no.racingtrack'|trans }}
{% endif %}
</div>
<div class=\"col-span-5\">
<span class=\"font-semibold\">{{ '(' ~ (achievement.category|trans) ~ ')' }}</span>
</br>
{{ achievement.description|raw }}
</div>
<div class=\"flex flex-wrap col-span-2 gap-2\">
{# {% for profile in achievement.profiles %}
<a title=\"{{ profile.name }}\" class=\"\" href=\"{{ pimcore_url({ object: profile }) }}\">
{% include 'component/avatar.html.twig' with {
avatar: profile.avatar,
initials: profile.name|initials,
size: 'tiny'
} only %}
</a>
{% endfor %} #}
{% if achievement.profile %}
<a title=\"{{ achievement.profile.name }}\"
class=\"\"
href=\"{{ pimcore_url({ object: achievement.profile }) }}\">
{% include 'component/avatar.html.twig' with {
avatar: achievement.profile.avatar,
initials: achievement.profile.name|initials,
size: 'tiny'
} only %}
</a>
{% endif %}
{% for profile in achievement.profiles %}
{% if achievement.profile.id != profile.id %}
<a title=\"{{ profile.name }}\" class=\"\" href=\"{{ pimcore_url({ object: profile }) }}\">
{% include 'component/avatar.html.twig' with {
avatar: profile.avatar,
initials: profile.name|initials,
size: 'tiny'
} only %}
</a>
{% endif %}
{% endfor %}
</div>
</div>
{% endfor %}
</div>
{% if form.offset.vars.value < totalCount %}
<div class=\"flex justify-center w-full\" id=\"{{ 'areabrick_load_button' ~ brickId }}\">
{{ form_start(form) }}
{{ form_widget(form.offset, { value: form.offset.vars.value }) }}
{# {{ button.submit('show-more'|trans, 'neutral', { size: 'sm' }) }} #}
{{ form_widget(form.submit, { attr: { class: 'btn btn-sm btn-neutral my-4 mx-auto' } }) }}
{{ form_end(form) }}
</div>
{% endif %}
", "document/areabricks/current-achievements-brick/view.html.twig", "/var/www/vhosts/3forone.ch/httpdocs/abowire/templates/document/areabricks/current-achievements-brick/view.html.twig");
}
}