var/cache/review/twig/6f/6fb5e01931ae05cf6ce9895e8dcf8d27.php line 33

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. /* _paid_placements_right.html.twig */
  14. class __TwigTemplate_49e4793ee8b776c8011e140fc99ff516 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->parent false;
  23.         $this->blocks = [
  24.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_b91a4435ea3baf1e2b6bfda56133dace $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
  30.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->enter($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""_paid_placements_right.html.twig"));
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""_paid_placements_right.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""_paid_placements_right.html.twig"));
  35.         // line 1
  36.         $context["topProfile"] = $this->extensions['App\Twig\PaidPlacementsExtension']->currentTopPlacement();
  37.         // line 2
  38.         echo "<div class=\"col-2\">
  39.     <div id=\"right_column_metric\">
  40.     <div class=\"card mb-1\">
  41.         <div class=\"card-header\">ТОП-Девушка</div>
  42.         ";
  43.         // line 6
  44.         if ((isset($context["topProfile"]) || array_key_exists("topProfile"$context) ? $context["topProfile"] : (function () { throw new RuntimeError('Variable "topProfile" does not exist.'6$this->source); })())) {
  45.             // line 7
  46.             echo "            ";
  47.             $context["photo"] = $this->extensions['App\Twig\ProfileAvatarExtension']->profileAvatar((isset($context["topProfile"]) || array_key_exists("topProfile"$context) ? $context["topProfile"] : (function () { throw new RuntimeError('Variable "topProfile" does not exist.'7$this->source); })()));
  48.             // line 8
  49.             echo "            ";
  50.             if ((isset($context["photo"]) || array_key_exists("photo"$context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.'8$this->source); })())) {
  51.                 // line 9
  52.                 echo "                <img class=\"card-img-top\" src=\"";
  53.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->source, (isset($context["photo"]) || array_key_exists("photo"$context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.'9$this->source); })()), "path", [], "any"falsefalsefalse9), (((twig_get_attribute($this->env$this->source, (isset($context["photo"]) || array_key_exists("photo"$context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.'9$this->source); })()), "type", [], "any"falsefalsefalse9) == "photo")) ? ("profile_media") : ("profile_media_avatar"))), "html"nulltrue);
  54.                 echo "\" alt=\"";
  55.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["topProfile"]) || array_key_exists("topProfile"$context) ? $context["topProfile"] : (function () { throw new RuntimeError('Variable "topProfile" does not exist.'9$this->source); })()), "name", [], "any"falsefalsefalse9), "html"nulltrue);
  56.                 echo "\">
  57.             ";
  58.             }
  59.             // line 11
  60.             echo "            <div class=\"card-body\">
  61.                 <a href=\"";
  62.             // line 12
  63.             echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_preview.page", ["city" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["topProfile"]) || array_key_exists("topProfile"$context) ? $context["topProfile"] : (function () { throw new RuntimeError('Variable "topProfile" does not exist.'12$this->source); })()), "city", [], "any"falsefalsefalse12), "uriIdentity", [], "any"falsefalsefalse12), "profile" => twig_get_attribute($this->env$this->source, (isset($context["topProfile"]) || array_key_exists("topProfile"$context) ? $context["topProfile"] : (function () { throw new RuntimeError('Variable "topProfile" does not exist.'12$this->source); })()), "uriIdentity", [], "any"falsefalsefalse12)]), "html"nulltrue);
  64.             echo "\">
  65.                     ";
  66.             // line 13
  67.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["topProfile"]) || array_key_exists("topProfile"$context) ? $context["topProfile"] : (function () { throw new RuntimeError('Variable "topProfile" does not exist.'13$this->source); })()), "name", [], "any"falsefalsefalse13), "html"nulltrue);
  68.             echo "
  69.                 </a>
  70.             </div>
  71.         ";
  72.         } else {
  73.             // line 17
  74.             echo "            <div class=\"card-body\">
  75.                 <h5 class=\"card-title\"><a href=\"";
  76.             // line 18
  77.             echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("account.profile.top_placement");
  78.             echo "\">Место свободно</a></h5>
  79.             </div>
  80.         ";
  81.         }
  82.         // line 21
  83.         echo "    </div>
  84.     ";
  85.         // line 49
  86.         echo "
  87.     <div id=\"first_ultra_vip_placement\"></div>
  88.     ";
  89.         // line 52
  90.         $context['_parent'] = $context;
  91.         $context['_seq'] = twig_ensure_traversable($this->extensions['App\Twig\PaidPlacementsExtension']->currentVipPlacements());
  92.         foreach ($context['_seq'] as $context["_key"] => $context["placement"]) {
  93.             // line 53
  94.             echo "        ";
  95.             $context["isProfile"] = twig_get_attribute($this->env$this->source$context["placement"], "profile", [], "any"truetruefalse53);
  96.             // line 54
  97.             echo "        ";
  98.             $context["entity"] = (((isset($context["isProfile"]) || array_key_exists("isProfile"$context) ? $context["isProfile"] : (function () { throw new RuntimeError('Variable "isProfile" does not exist.'54$this->source); })())) ? (twig_get_attribute($this->env$this->source$context["placement"], "profile", [], "any"falsefalsefalse54)) : (twig_get_attribute($this->env$this->source$context["placement"], "saloon", [], "any"falsefalsefalse54)));
  99.             // line 55
  100.             echo "        <div class=\"card mb-1\">
  101.             <div class=\"card-header sidebar-vip-metric\">VIP</div>
  102.             ";
  103.             // line 57
  104.             $context["photo"] = (((isset($context["isProfile"]) || array_key_exists("isProfile"$context) ? $context["isProfile"] : (function () { throw new RuntimeError('Variable "isProfile" does not exist.'57$this->source); })())) ? ($this->extensions['App\Twig\ProfileAvatarExtension']->profileAvatar((isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'57$this->source); })()))) : (twig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'57$this->source); })()), "thumbnail", [], "any"falsefalsefalse57)));
  105.             // line 58
  106.             echo "            ";
  107.             if ((isset($context["photo"]) || array_key_exists("photo"$context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.'58$this->source); })())) {
  108.                 // line 59
  109.                 echo "                ";
  110.                 if ((isset($context["isProfile"]) || array_key_exists("isProfile"$context) ? $context["isProfile"] : (function () { throw new RuntimeError('Variable "isProfile" does not exist.'59$this->source); })())) {
  111.                     // line 60
  112.                     echo "                    <img class=\"card-img-top\" src=\"";
  113.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->source, (isset($context["photo"]) || array_key_exists("photo"$context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.'60$this->source); })()), "path", [], "any"falsefalsefalse60), (((twig_get_attribute($this->env$this->source, (isset($context["photo"]) || array_key_exists("photo"$context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.'60$this->source); })()), "type", [], "any"falsefalsefalse60) == "photo")) ? ("profile_media") : ("profile_media_avatar"))), "html"nulltrue);
  114.                     echo "\" alt=\"";
  115.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'60$this->source); })()), "name", [], "any"falsefalsefalse60), "html"nulltrue);
  116.                     echo "\">
  117.                 ";
  118.                 } else {
  119.                     // line 62
  120.                     echo "                    <img class=\"card-img-top\" src=\"";
  121.                     echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(twig_get_attribute($this->env$this->source, (isset($context["photo"]) || array_key_exists("photo"$context) ? $context["photo"] : (function () { throw new RuntimeError('Variable "photo" does not exist.'62$this->source); })()), "path", [], "any"falsefalsefalse62), "saloon_media_thumb"), "html"nulltrue);
  122.                     echo "\" alt=\"";
  123.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'62$this->source); })()), "name", [], "any"falsefalsefalse62), "html"nulltrue);
  124.                     echo "\">
  125.                 ";
  126.                 }
  127.                 // line 64
  128.                 echo "            ";
  129.             }
  130.             // line 65
  131.             echo "            <div class=\"card-body\">
  132.                 ";
  133.             // line 66
  134.             if ((isset($context["isProfile"]) || array_key_exists("isProfile"$context) ? $context["isProfile"] : (function () { throw new RuntimeError('Variable "isProfile" does not exist.'66$this->source); })())) {
  135.                 // line 67
  136.                 echo "                    <a href=\"";
  137.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("profile_preview.page", ["city" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'67$this->source); })()), "city", [], "any"falsefalsefalse67), "uriIdentity", [], "any"falsefalsefalse67), "profile" => twig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'67$this->source); })()), "uriIdentity", [], "any"falsefalsefalse67)]), "html"nulltrue);
  138.                 echo "\">
  139.                         ";
  140.                 // line 68
  141.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'68$this->source); })()), "name", [], "any"falsefalsefalse68), "html"nulltrue);
  142.                 echo "
  143.                     </a>
  144.                 ";
  145.             } else {
  146.                 // line 71
  147.                 echo "                    <a href=\"";
  148.                 echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("saloon_preview.page", ["city" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'71$this->source); })()), "city", [], "any"falsefalsefalse71), "uriIdentity", [], "any"falsefalsefalse71), "saloon" => twig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'71$this->source); })()), "uriIdentity", [], "any"falsefalsefalse71)]), "html"nulltrue);
  149.                 echo "\">
  150.                         ";
  151.                 // line 72
  152.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["entity"]) || array_key_exists("entity"$context) ? $context["entity"] : (function () { throw new RuntimeError('Variable "entity" does not exist.'72$this->source); })()), "name", [], "any"falsefalsefalse72), "html"nulltrue);
  153.                 echo "
  154.                     </a>
  155.                 ";
  156.             }
  157.             // line 75
  158.             echo "            </div>
  159.         </div>
  160.     ";
  161.         }
  162.         $_parent $context['_parent'];
  163.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['placement'], $context['_parent'], $context['loop']);
  164.         $context array_intersect_key($context$_parent) + $_parent;
  165.         // line 78
  166.         echo "
  167.         <div id=\"rest_ultra_vip_placement\"></div>
  168.     </div>
  169. </div>
  170. <script src=\"";
  171.         // line 83
  172.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("ajax.js""js_script"), "html"nulltrue);
  173.         echo "\"></script>
  174. <script src=\"";
  175.         // line 84
  176.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("sidebar-extender.js""js_script"), "html"nulltrue);
  177.         echo "\"></script>
  178. <script>
  179.     ;(function () {
  180.         document.addEventListener('DOMContentLoaded', function(){
  181.             // enlargeSidebar() - считает разницу в высоте основного контенкта и правой колонки
  182.             // !!! контейнеры колонок внутри обернул в div, по которым и считаю размер, т.к. внешние могут быть вытянуты до одинаковой высоты.
  183.             // для лейаута в 3 колонки - left_column_metric, center_column_metric, right_column_metric
  184.             // для лейаута в 2 колонки - main_column_metric, right_column_metric
  185.             // где right_column_metric - в контейнере самого сайдбара
  186.             // по принимаем параметрам SidebarExtender см. sidebar-extender.js
  187.             var sidebarEnlarger = enlargeSidebar();
  188.             function enlargeSidebar() {
  189.                 var leftColumn = document.querySelector('#left_column_metric');
  190.                 var centerColumn = document.querySelector('#center_column_metric');
  191.                 var rightColumn = document.querySelector('#right_column_metric');
  192.                 var mainColumn = document.querySelector('#main_column_metric');
  193.                 var maxHeight;
  194.                 if(leftColumn && centerColumn) {
  195.                     maxHeight = Math.max(leftColumn.scrollHeight, centerColumn.scrollHeight);
  196.                 } else if(mainColumn) {
  197.                     maxHeight = mainColumn.scrollHeight;
  198.                 } else {
  199.                     console.log('Cannot detect content height for sidebar');
  200.                     return;
  201.                 }
  202.                 var heightDiff = maxHeight - rightColumn.scrollHeight;
  203.                 if(heightDiff <= 0)
  204.                     return;
  205.                 //подставить нужное
  206.                 var ultraVipContainerHeight = 315; //,document.querySelector('.sidebar-ultra-vip-metric').scrollHeight,
  207.                 var verticalPadding = 5; //подставить нужное
  208.                 var toAdd = 0;
  209.                 if (heightDiff >= verticalPadding + ultraVipContainerHeight)
  210.                     toAdd = Math.floor(heightDiff / (verticalPadding + ultraVipContainerHeight));
  211.                 var genders = [";
  212.         // line 124
  213.         echo twig_escape_filter($this->env$this->extensions['App\Twig\PersonParametersExtension']->genderFemale(), "html"nulltrue);
  214.         echo ", ";
  215.         echo twig_escape_filter($this->env$this->extensions['App\Twig\PersonParametersExtension']->genderMale(), "html"nulltrue);
  216.         echo ", ";
  217.         echo twig_escape_filter($this->env$this->extensions['App\Twig\PersonParametersExtension']->genderTrans(), "html"nulltrue);
  218.         echo "];
  219.                 let onlyProfile = null, onlyMasseur = null, onlySaloon = null;
  220.                 ";
  221.         // line 126
  222.         if (twig_in_filter("profile_list.list_by_gender"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'126$this->source); })()), "request", [], "any"falsefalsefalse126), "get", ["_route"], "method"falsefalsefalse126))) {
  223.             // line 127
  224.             echo "                    ";
  225.             if (($this->extensions['App\Twig\PersonParametersExtension']->genderValueByUri(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'127$this->source); })()), "request", [], "any"falsefalsefalse127), "get", ["gender"], "method"falsefalsefalse127)) == $this->extensions['App\Twig\PersonParametersExtension']->genderMale())) {
  226.                 // line 128
  227.                 echo "                        genders = [";
  228.                 echo twig_escape_filter($this->env$this->extensions['App\Twig\PersonParametersExtension']->genderMale(), "html"nulltrue);
  229.                 echo "];
  230.                         onlyProfile = true;
  231.                     ";
  232.             } elseif (($this->extensions['App\Twig\PersonParametersExtension']->genderValueByUri(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,             // line 130
  233. (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'130$this->source); })()), "request", [], "any"falsefalsefalse130), "get", ["gender"], "method"falsefalsefalse130)) == $this->extensions['App\Twig\PersonParametersExtension']->genderTrans())) {
  234.                 // line 131
  235.                 echo "                        genders = [";
  236.                 echo twig_escape_filter($this->env$this->extensions['App\Twig\PersonParametersExtension']->genderTrans(), "html"nulltrue);
  237.                 echo "];
  238.                         onlyProfile = true;
  239.                     ";
  240.             }
  241.             // line 134
  242.             echo "                ";
  243.         } elseif (twig_in_filter("masseur_list.page"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'134$this->source); })()), "request", [], "any"falsefalsefalse134), "get", ["_route"], "method"falsefalsefalse134))) {
  244.             // line 135
  245.             echo "                    onlyMasseur = true;
  246.                 ";
  247.         } elseif (twig_in_filter("saloon_list"twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source,         // line 136
  248. (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'136$this->source); })()), "request", [], "any"falsefalsefalse136), "get", ["_route"], "method"falsefalsefalse136))) {
  249.             // line 137
  250.             echo "                    onlySaloon = true;
  251.                 ";
  252.         }
  253.         // line 139
  254.         echo "
  255.                 if(toAdd < 1)
  256.                     toAdd = 1; //для Сани
  257.                 var sidebarEnlarger = new SidebarExtender({
  258.                     toAdd: toAdd,
  259.                     restPlacementsContainer: document.querySelector('#rest_ultra_vip_placement'),
  260.                     ";
  261.         // line 147
  262.         $context["current_city"] = twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'147$this->source); })()), "request", [], "any"falsefalsefalse147), "attributes", [], "any"falsefalsefalse147), "get", ["city"$this->extensions['App\Twig\DefaultCityExtension']->defaultCity()], "method"falsefalsefalse147);
  263.         // line 148
  264.         echo "                    ajaxUrl: '";
  265.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("api.sidebar.ultra_vip_list", ["city" => ((twig_get_attribute($this->env$this->source, ($context["current_city"] ?? null), "uriIdentity", [], "any"truetruefalse148)) ? (twig_get_attribute($this->env$this->source, (isset($context["current_city"]) || array_key_exists("current_city"$context) ? $context["current_city"] : (function () { throw new RuntimeError('Variable "current_city" does not exist.'148$this->source); })()), "uriIdentity", [], "any"falsefalsefalse148)) : ((isset($context["current_city"]) || array_key_exists("current_city"$context) ? $context["current_city"] : (function () { throw new RuntimeError('Variable "current_city" does not exist.'148$this->source); })()))), "imageSize" => "357x500"]), "html"nulltrue);
  266.         echo "',
  267.                     genders: genders,
  268.                     onlyProfile: onlyProfile,
  269.                     onlyMasseur: onlyMasseur,
  270.                     onlySaloon: onlySaloon,
  271.                     exclude: [], //Array.prototype.slice.apply(document.querySelectorAll('[data-ultravipid]')).map(function(el) {return el.dataset['ultravipid'];}),
  272.                     template:
  273.                         '<div class=\"card mb-1 sidebar-ultra-vip-metric\">\\n' +
  274.                         '  <div class=\"card-header\">Ultra VIP</div>\\n' +
  275.                         '  <img class=\"card-img-top\" src=\"%PHOTO%\" alt=\"%NAME%\">\\n' +
  276.                         '  <div class=\"card-body\">\\n' +
  277.                         '    <a href=\"%URL%\">\\n' +
  278.                         '      %NAME%\\n' +
  279.                         '    </a>\\n' +
  280.                         '    %PRICE%\\n' +
  281.                         '    %STATION%\\n' +
  282.                         '    <div class=\"approved%APPROVED%\">Verified</div>\\n' +
  283.                         '    %PHONE%\\n' +
  284.                         '  </div>\\n' +
  285.                         '</div>'
  286.                 });
  287.                 //enlarge your sidebar
  288.                 sidebarEnlarger.extend();
  289.                 return sidebarEnlarger;
  290.             }
  291.         });
  292.     })();
  293. </script>";
  294.         
  295.         $__internal_b91a4435ea3baf1e2b6bfda56133dace->leave($__internal_b91a4435ea3baf1e2b6bfda56133dace_prof);
  296.         
  297.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  298.         
  299.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  300.     }
  301.     /**
  302.      * @codeCoverageIgnore
  303.      */
  304.     public function getTemplateName()
  305.     {
  306.         return "_paid_placements_right.html.twig";
  307.     }
  308.     /**
  309.      * @codeCoverageIgnore
  310.      */
  311.     public function isTraitable()
  312.     {
  313.         return false;
  314.     }
  315.     /**
  316.      * @codeCoverageIgnore
  317.      */
  318.     public function getDebugInfo()
  319.     {
  320.         return array (  285 => 148,  283 => 147,  273 => 139,  269 => 137,  267 => 136,  264 => 135,  261 => 134,  254 => 131,  252 => 130,  246 => 128,  243 => 127,  241 => 126,  232 => 124,  189 => 84,  185 => 83,  178 => 78,  170 => 75,  164 => 72,  159 => 71,  153 => 68,  148 => 67,  146 => 66,  143 => 65,  140 => 64,  132 => 62,  124 => 60,  121 => 59,  118 => 58,  116 => 57,  112 => 55,  109 => 54,  106 => 53,  102 => 52,  97 => 49,  93 => 21,  87 => 18,  84 => 17,  77 => 13,  73 => 12,  70 => 11,  62 => 9,  59 => 8,  56 => 7,  54 => 6,  48 => 2,  46 => 1,);
  321.     }
  322.     public function getSourceContext()
  323.     {
  324.         return new Source("{% set topProfile = profile_top_placement() %}
  325. <div class=\"col-2\">
  326.     <div id=\"right_column_metric\">
  327.     <div class=\"card mb-1\">
  328.         <div class=\"card-header\">ТОП-Девушка</div>
  329.         {% if topProfile %}
  330.             {% set photo = topProfile|avatar %}
  331.             {% if photo %}
  332.                 <img class=\"card-img-top\" src=\"{{ asset(photo.path, photo.type == 'photo' ? 'profile_media' : 'profile_media_avatar') }}\" alt=\"{{ topProfile.name }}\">
  333.             {% endif %}
  334.             <div class=\"card-body\">
  335.                 <a href=\"{{ path('profile_preview.page', {'city': topProfile.city.uriIdentity, 'profile': topProfile.uriIdentity}) }}\">
  336.                     {{ topProfile.name }}
  337.                 </a>
  338.             </div>
  339.         {% else %}
  340.             <div class=\"card-body\">
  341.                 <h5 class=\"card-title\"><a href=\"{{ path('account.profile.top_placement') }}\">Место свободно</a></h5>
  342.             </div>
  343.         {% endif %}
  344.     </div>
  345.     {#    {% for placement in profile_ultra_vip_placements() %}
  346.         {% set isProfile = attribute(placement, 'profile') is defined %}
  347.         {% set entity = isProfile ? placement.profile : placement.saloon %}
  348.         <div class=\"card mb-1 sidebar-ultra-vip-metric\" data-ultravipid=\"{{ placement.id }}\">
  349.             <div class=\"card-header\">{{placement_name_ultra_vip()}}</div>
  350.             {% set photo = isProfile ? entity|avatar : entity.thumbnail %}
  351.             {% if photo %}
  352.                 {% if isProfile %}
  353.                     <img class=\"card-img-top\" src=\"{{ asset(photo.path, photo.type == 'photo' ? 'profile_media' : 'profile_media_avatar') }}\" alt=\"{{ entity.name }}\">
  354.                 {% else %}
  355.                     <img class=\"card-img-top\" src=\"{{ asset(photo.path, 'saloon_media_thumb') }}\" alt=\"{{ entity.name }}\">
  356.                 {% endif %}
  357.             {% endif %}
  358.             <div class=\"card-body\">
  359.                 {% if isProfile %}
  360.                     <a href=\"{{ path('profile_preview.page', {'city': entity.city.uriIdentity, 'profile': entity.uriIdentity}) }}\">
  361.                         {{ entity.name }}
  362.                     </a>
  363.                 {% else %}
  364.                     <a href=\"{{ path('saloon_preview.page', {'city': entity.city.uriIdentity, 'saloon': entity.uriIdentity}) }}\">
  365.                         {{ entity.name }}
  366.                     </a>
  367.                 {% endif %}
  368.             </div>
  369.         </div>
  370.     {% endfor %}#}
  371.     <div id=\"first_ultra_vip_placement\"></div>
  372.     {% for placement in profile_vip_placements() %}
  373.         {% set isProfile = attribute(placement, 'profile') is defined %}
  374.         {% set entity = isProfile ? placement.profile : placement.saloon %}
  375.         <div class=\"card mb-1\">
  376.             <div class=\"card-header sidebar-vip-metric\">VIP</div>
  377.             {% set photo = isProfile ? entity|avatar : entity.thumbnail %}
  378.             {% if photo %}
  379.                 {% if isProfile %}
  380.                     <img class=\"card-img-top\" src=\"{{ asset(photo.path, photo.type == 'photo' ? 'profile_media' : 'profile_media_avatar') }}\" alt=\"{{ entity.name }}\">
  381.                 {% else %}
  382.                     <img class=\"card-img-top\" src=\"{{ asset(photo.path, 'saloon_media_thumb') }}\" alt=\"{{ entity.name }}\">
  383.                 {% endif %}
  384.             {% endif %}
  385.             <div class=\"card-body\">
  386.                 {% if isProfile %}
  387.                     <a href=\"{{ path('profile_preview.page', {'city': entity.city.uriIdentity, 'profile': entity.uriIdentity}) }}\">
  388.                         {{ entity.name }}
  389.                     </a>
  390.                 {% else %}
  391.                     <a href=\"{{ path('saloon_preview.page', {'city': entity.city.uriIdentity, 'saloon': entity.uriIdentity}) }}\">
  392.                         {{ entity.name }}
  393.                     </a>
  394.                 {% endif %}
  395.             </div>
  396.         </div>
  397.     {% endfor %}
  398.         <div id=\"rest_ultra_vip_placement\"></div>
  399.     </div>
  400. </div>
  401. <script src=\"{{ asset('ajax.js', 'js_script') }}\"></script>
  402. <script src=\"{{ asset('sidebar-extender.js', 'js_script') }}\"></script>
  403. <script>
  404.     ;(function () {
  405.         document.addEventListener('DOMContentLoaded', function(){
  406.             // enlargeSidebar() - считает разницу в высоте основного контенкта и правой колонки
  407.             // !!! контейнеры колонок внутри обернул в div, по которым и считаю размер, т.к. внешние могут быть вытянуты до одинаковой высоты.
  408.             // для лейаута в 3 колонки - left_column_metric, center_column_metric, right_column_metric
  409.             // для лейаута в 2 колонки - main_column_metric, right_column_metric
  410.             // где right_column_metric - в контейнере самого сайдбара
  411.             // по принимаем параметрам SidebarExtender см. sidebar-extender.js
  412.             var sidebarEnlarger = enlargeSidebar();
  413.             function enlargeSidebar() {
  414.                 var leftColumn = document.querySelector('#left_column_metric');
  415.                 var centerColumn = document.querySelector('#center_column_metric');
  416.                 var rightColumn = document.querySelector('#right_column_metric');
  417.                 var mainColumn = document.querySelector('#main_column_metric');
  418.                 var maxHeight;
  419.                 if(leftColumn && centerColumn) {
  420.                     maxHeight = Math.max(leftColumn.scrollHeight, centerColumn.scrollHeight);
  421.                 } else if(mainColumn) {
  422.                     maxHeight = mainColumn.scrollHeight;
  423.                 } else {
  424.                     console.log('Cannot detect content height for sidebar');
  425.                     return;
  426.                 }
  427.                 var heightDiff = maxHeight - rightColumn.scrollHeight;
  428.                 if(heightDiff <= 0)
  429.                     return;
  430.                 //подставить нужное
  431.                 var ultraVipContainerHeight = 315; //,document.querySelector('.sidebar-ultra-vip-metric').scrollHeight,
  432.                 var verticalPadding = 5; //подставить нужное
  433.                 var toAdd = 0;
  434.                 if (heightDiff >= verticalPadding + ultraVipContainerHeight)
  435.                     toAdd = Math.floor(heightDiff / (verticalPadding + ultraVipContainerHeight));
  436.                 var genders = [{{ gender_female() }}, {{ gender_male() }}, {{ gender_trans() }}];
  437.                 let onlyProfile = null, onlyMasseur = null, onlySaloon = null;
  438.                 {% if 'profile_list.list_by_gender' in app.request.get('_route') %}
  439.                     {% if app.request.get('gender')|gender_value_by_uri == gender_male() %}
  440.                         genders = [{{ gender_male() }}];
  441.                         onlyProfile = true;
  442.                     {% elseif app.request.get('gender')|gender_value_by_uri == gender_trans() %}
  443.                         genders = [{{ gender_trans() }}];
  444.                         onlyProfile = true;
  445.                     {% endif %}
  446.                 {% elseif 'masseur_list.page' in app.request.get('_route') %}
  447.                     onlyMasseur = true;
  448.                 {% elseif 'saloon_list' in app.request.get('_route') %}
  449.                     onlySaloon = true;
  450.                 {% endif %}
  451.                 if(toAdd < 1)
  452.                     toAdd = 1; //для Сани
  453.                 var sidebarEnlarger = new SidebarExtender({
  454.                     toAdd: toAdd,
  455.                     restPlacementsContainer: document.querySelector('#rest_ultra_vip_placement'),
  456.                     {% set current_city = app.request.attributes.get('city', default_city()) %}
  457.                     ajaxUrl: '{{ path('api.sidebar.ultra_vip_list', {city:current_city.uriIdentity is defined ? current_city.uriIdentity : current_city, imageSize: '357x500'}) }}',
  458.                     genders: genders,
  459.                     onlyProfile: onlyProfile,
  460.                     onlyMasseur: onlyMasseur,
  461.                     onlySaloon: onlySaloon,
  462.                     exclude: [], //Array.prototype.slice.apply(document.querySelectorAll('[data-ultravipid]')).map(function(el) {return el.dataset['ultravipid'];}),
  463.                     template:
  464.                         '<div class=\"card mb-1 sidebar-ultra-vip-metric\">\\n' +
  465.                         '  <div class=\"card-header\">Ultra VIP</div>\\n' +
  466.                         '  <img class=\"card-img-top\" src=\"%PHOTO%\" alt=\"%NAME%\">\\n' +
  467.                         '  <div class=\"card-body\">\\n' +
  468.                         '    <a href=\"%URL%\">\\n' +
  469.                         '      %NAME%\\n' +
  470.                         '    </a>\\n' +
  471.                         '    %PRICE%\\n' +
  472.                         '    %STATION%\\n' +
  473.                         '    <div class=\"approved%APPROVED%\">Verified</div>\\n' +
  474.                         '    %PHONE%\\n' +
  475.                         '  </div>\\n' +
  476.                         '</div>'
  477.                 });
  478.                 //enlarge your sidebar
  479.                 sidebarEnlarger.extend();
  480.                 return sidebarEnlarger;
  481.             }
  482.         });
  483.     })();
  484. </script>""_paid_placements_right.html.twig""/app/templates/_paid_placements_right.html.twig");
  485.     }
  486. }