<?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;
/* Recommendations/_profile_recommendations.partial.html.twig */
class __TwigTemplate_ec5192f584dda508cc1283c953011a04 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'mainContainer' => [$this, 'block_mainContainer'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "grid.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Recommendations/_profile_recommendations.partial.html.twig"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Recommendations/_profile_recommendations.partial.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "Recommendations/_profile_recommendations.partial.html.twig"));
$this->parent = $this->loadTemplate("grid.html.twig", "Recommendations/_profile_recommendations.partial.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 23
public function block_mainContainer($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_b91a4435ea3baf1e2b6bfda56133dace = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "mainContainer"));
// line 24
echo " <h4>Рекоммендуемые</h4>
<div id=\"profileRecommendationsContainer\"></div>
<ul>
";
// line 27
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["profiles"]) || array_key_exists("profiles", $context) ? $context["profiles"] : (function () { throw new RuntimeError('Variable "profiles" does not exist.', 27, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["profile"]) {
// line 28
echo " <li>";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["profile"], "id", [], "any", false, false, false, 28), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["profile"], "name", [], "any", false, false, false, 28), "html", null, true);
echo "</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['profile'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 30
echo " </ul>
";
// line 35
echo " <a href=\"javascript:void(0);\" id=\"profileRecommendationsShowMore\">Показать еще</a>
<script src=\"";
// line 36
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("ajax.js", "js_script"), "html", null, true);
echo "\"></script>
<script type=\"text/javascript\">
document.addEventListener('DOMContentLoaded', function() {
var showMorePressCount = 0;
var btnShowMore = document.querySelector('#profileRecommendationsShowMore');
btnShowMore.addEventListener('click', function() {
if(showMorePressCount < 5)
loadRecommendations();
if(++showMorePressCount >= 5)
btnShowMore.style.display = 'none';
});
});
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "Recommendations/_profile_recommendations.partial.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 103 => 36, 100 => 35, 97 => 30, 86 => 28, 82 => 27, 77 => 24, 64 => 23, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'grid.html.twig' %}
{#<div id=\"recommendationsDebug\">
#}{#<div id=\"queryData\" style=\"display: none;\"></div><a href=\"javascript:void(0);\" id=\"showQueryBtn\">Показать запрос</a>#}{#
<div id=\"profileViewsData\">
<h6 style=\"color: #1ea471\">Просмотры анкет на сайте</h6>
{% set profile_debug_data = profile_recommendations_debug_views() %}
{% include \"Recommendations/_profile_recommendations_debug_profile_data_table.html.twig\" %}
</div>
<div id=\"favouritesData\">
<h6 style=\"color: #0d5aa7\">Избранные</h6>
{% set profile_debug_data = profile_recommendations_debug_favourites() %}
{% include \"Recommendations/_profile_recommendations_debug_profile_data_table.html.twig\" %}
</div>
{% include \"Recommendations/_profile_recommendations_debug_coeffs_data_table.html.twig\" %}
<h6 style=\"color: #bd2130\">Коэффициенты</h6>
<div id=\"coeffsData\"></div>
{% include \"Recommendations/_profile_recommendations_debug_viewed_profiles_data_table.html.twig\" %}
<h6 style=\"color: #856404\">Просмотренные рекомендации</h6>
<div id=\"viewedRecommendationsData\"></div>
</div>#}
{% block mainContainer %}
<h4>Рекоммендуемые</h4>
<div id=\"profileRecommendationsContainer\"></div>
<ul>
{% for profile in profiles %}
<li>{{ profile.id }} {{ profile.name }}</li>
{% endfor %}
</ul>
{# <div id=\"profileRecommendationTemplate\" style=\"display: none;\">
<p><a href=\"\" class=\"name-link\"></a></p>
<img class=\"img\" src=\"\" width=\"100\"/>
</div>#}
<a href=\"javascript:void(0);\" id=\"profileRecommendationsShowMore\">Показать еще</a>
<script src=\"{{ asset('ajax.js', 'js_script') }}\"></script>
<script type=\"text/javascript\">
document.addEventListener('DOMContentLoaded', function() {
var showMorePressCount = 0;
var btnShowMore = document.querySelector('#profileRecommendationsShowMore');
btnShowMore.addEventListener('click', function() {
if(showMorePressCount < 5)
loadRecommendations();
if(++showMorePressCount >= 5)
btnShowMore.style.display = 'none';
});
});
</script>
{% endblock mainContainer %}", "Recommendations/_profile_recommendations.partial.html.twig", "/app/templates/Recommendations/_profile_recommendations.partial.html.twig");
}
}