var/cache/review/twig/dc/dc2db433b5f2c6ab9b22881243fcfaf3.php line 51

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* Recommendations/_profile_recommendations.partial.html.twig */
  14. class __TwigTemplate_ec5192f584dda508cc1283c953011a04 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'mainContainer' => [$this'block_mainContainer'],
  24.         ];
  25.     }
  26.     protected function doGetParent(array $context)
  27.     {
  28.         // line 1
  29.         return "grid.html.twig";
  30.     }
  31.     protected function doDisplay(array $context, array $blocks = [])
  32.     {
  33.         $macros $this->macros;
  34.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  35.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Recommendations/_profile_recommendations.partial.html.twig"));
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Recommendations/_profile_recommendations.partial.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""Recommendations/_profile_recommendations.partial.html.twig"));
  40.         $this->parent $this->loadTemplate("grid.html.twig""Recommendations/_profile_recommendations.partial.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  44.         
  45.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  46.         
  47.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  48.     }
  49.     // line 23
  50.     public function block_mainContainer($context, array $blocks = [])
  51.     {
  52.         $macros $this->macros;
  53.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  54.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  55.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  56.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  57.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  58.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""mainContainer"));
  59.         // line 24
  60.         echo "    <h4>Рекоммендуемые</h4>
  61.     <div id=\"profileRecommendationsContainer\"></div>
  62.     <ul>
  63.         ";
  64.         // line 27
  65.         $context['_parent'] = $context;
  66.         $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); })()));
  67.         foreach ($context['_seq'] as $context["_key"] => $context["profile"]) {
  68.             // line 28
  69.             echo "            <li>";
  70.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["profile"], "id", [], "any"falsefalsefalse28), "html"nulltrue);
  71.             echo " ";
  72.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["profile"], "name", [], "any"falsefalsefalse28), "html"nulltrue);
  73.             echo "</li>
  74.         ";
  75.         }
  76.         $_parent $context['_parent'];
  77.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['profile'], $context['_parent'], $context['loop']);
  78.         $context array_intersect_key($context$_parent) + $_parent;
  79.         // line 30
  80.         echo "    </ul>
  81.     ";
  82.         // line 35
  83.         echo "    <a href=\"javascript:void(0);\" id=\"profileRecommendationsShowMore\">Показать еще</a>
  84.     <script src=\"";
  85.         // line 36
  86.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("ajax.js""js_script"), "html"nulltrue);
  87.         echo "\"></script>
  88.     <script type=\"text/javascript\">
  89.         document.addEventListener('DOMContentLoaded', function() {
  90.             var showMorePressCount = 0;
  91.             var btnShowMore = document.querySelector('#profileRecommendationsShowMore');
  92.             btnShowMore.addEventListener('click', function() {
  93.                 if(showMorePressCount < 5)
  94.                     loadRecommendations();
  95.                 if(++showMorePressCount >= 5)
  96.                     btnShowMore.style.display = 'none';
  97.             });
  98.         });
  99.     </script>
  100. ";
  101.         
  102.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  103.         
  104.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  105.         
  106.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  107.     }
  108.     /**
  109.      * @codeCoverageIgnore
  110.      */
  111.     public function getTemplateName()
  112.     {
  113.         return "Recommendations/_profile_recommendations.partial.html.twig";
  114.     }
  115.     /**
  116.      * @codeCoverageIgnore
  117.      */
  118.     public function isTraitable()
  119.     {
  120.         return false;
  121.     }
  122.     /**
  123.      * @codeCoverageIgnore
  124.      */
  125.     public function getDebugInfo()
  126.     {
  127.         return array (  103 => 36,  100 => 35,  97 => 30,  86 => 28,  82 => 27,  77 => 24,  64 => 23,  35 => 1,);
  128.     }
  129.     public function getSourceContext()
  130.     {
  131.         return new Source("{% extends 'grid.html.twig' %}
  132. {#<div id=\"recommendationsDebug\">
  133. #}{#<div id=\"queryData\" style=\"display: none;\"></div><a href=\"javascript:void(0);\" id=\"showQueryBtn\">Показать запрос</a>#}{#
  134. <div id=\"profileViewsData\">
  135.     <h6 style=\"color: #1ea471\">Просмотры анкет на сайте</h6>
  136.     {% set profile_debug_data = profile_recommendations_debug_views() %}
  137.     {% include \"Recommendations/_profile_recommendations_debug_profile_data_table.html.twig\" %}
  138. </div>
  139. <div id=\"favouritesData\">
  140.     <h6 style=\"color: #0d5aa7\">Избранные</h6>
  141.     {% set profile_debug_data = profile_recommendations_debug_favourites() %}
  142.     {% include \"Recommendations/_profile_recommendations_debug_profile_data_table.html.twig\" %}
  143. </div>
  144. {% include \"Recommendations/_profile_recommendations_debug_coeffs_data_table.html.twig\" %}
  145. <h6 style=\"color: #bd2130\">Коэффициенты</h6>
  146. <div id=\"coeffsData\"></div>
  147. {% include \"Recommendations/_profile_recommendations_debug_viewed_profiles_data_table.html.twig\" %}
  148. <h6 style=\"color: #856404\">Просмотренные рекомендации</h6>
  149. <div id=\"viewedRecommendationsData\"></div>
  150. </div>#}
  151. {% block mainContainer %}
  152.     <h4>Рекоммендуемые</h4>
  153.     <div id=\"profileRecommendationsContainer\"></div>
  154.     <ul>
  155.         {% for profile in profiles %}
  156.             <li>{{ profile.id }} {{ profile.name }}</li>
  157.         {% endfor %}
  158.     </ul>
  159.     {#    <div id=\"profileRecommendationTemplate\" style=\"display: none;\">
  160.         <p><a href=\"\" class=\"name-link\"></a></p>
  161.         <img class=\"img\" src=\"\" width=\"100\"/>
  162.     </div>#}
  163.     <a href=\"javascript:void(0);\" id=\"profileRecommendationsShowMore\">Показать еще</a>
  164.     <script src=\"{{ asset('ajax.js', 'js_script') }}\"></script>
  165.     <script type=\"text/javascript\">
  166.         document.addEventListener('DOMContentLoaded', function() {
  167.             var showMorePressCount = 0;
  168.             var btnShowMore = document.querySelector('#profileRecommendationsShowMore');
  169.             btnShowMore.addEventListener('click', function() {
  170.                 if(showMorePressCount < 5)
  171.                     loadRecommendations();
  172.                 if(++showMorePressCount >= 5)
  173.                     btnShowMore.style.display = 'none';
  174.             });
  175.         });
  176.     </script>
  177. {% endblock mainContainer %}""Recommendations/_profile_recommendations.partial.html.twig""/app/templates/Recommendations/_profile_recommendations.partial.html.twig");
  178.     }
  179. }