var/cache/dev/twig/2d/2db05b9729396f0014b1351710b7b099.php line 540

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* @Admin/admin/standard_layout.html.twig */
  16. class __TwigTemplate_8067a34927e3df0369cfc9d1fb166562 extends Template
  17. {
  18.     private Source $source;
  19.     /**
  20.      * @var array<string, Template>
  21.      */
  22.     private array $macros = [];
  23.     public function __construct(Environment $env)
  24.     {
  25.         parent::__construct($env);
  26.         $this->source $this->getSourceContext();
  27.         $this->blocks = [
  28.             'stylesheets' => [$this'block_stylesheets'],
  29.             'javascripts' => [$this'block_javascripts'],
  30.             'sonata_javascript_config' => [$this'block_sonata_javascript_config'],
  31.             'sonata_javascript_pool' => [$this'block_sonata_javascript_pool'],
  32.             'sonata_top_nav_menu' => [$this'block_sonata_top_nav_menu'],
  33.             'sonata_top_nav_menu_add_block' => [$this'block_sonata_top_nav_menu_add_block'],
  34.             'sonata_top_nav_menu_user_block' => [$this'block_sonata_top_nav_menu_user_block'],
  35.             'logo' => [$this'block_logo'],
  36.             'sonata_wrapper' => [$this'block_sonata_wrapper'],
  37.         ];
  38.     }
  39.     protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  40.     {
  41.         // line 1
  42.         return "@SonataAdmin/standard_layout.html.twig";
  43.     }
  44.     protected function doDisplay(array $context, array $blocks = []): iterable
  45.     {
  46.         $macros $this->macros;
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Admin/admin/standard_layout.html.twig"));
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Admin/admin/standard_layout.html.twig"));
  51.         $this->parent $this->load("@SonataAdmin/standard_layout.html.twig"1);
  52.         yield from $this->parent->unwrap()->yield($contextarray_merge($this->blocks$blocks));
  53.         
  54.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  55.         
  56.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  57.     }
  58.     // line 3
  59.     /**
  60.      * @return iterable<null|scalar|\Stringable>
  61.      */
  62.     public function block_stylesheets(array $context, array $blocks = []): iterable
  63.     {
  64.         $macros $this->macros;
  65.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  66.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  67.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  68.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  69.         // line 4
  70.         yield "    ";
  71.         yield from $this->yieldParentBlock("stylesheets"$context$blocks);
  72.         yield "
  73.     <link rel=\"icon\" href=\"";
  74.         // line 5
  75.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/core/img/favicon.png"), "html"nulltrue);
  76.         yield "\" type=\"image/x-icon\" />
  77. ";
  78.         
  79.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  80.         
  81.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  82.         yield from [];
  83.     }
  84.     // line 8
  85.     /**
  86.      * @return iterable<null|scalar|\Stringable>
  87.      */
  88.     public function block_javascripts(array $context, array $blocks = []): iterable
  89.     {
  90.         $macros $this->macros;
  91.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  92.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  93.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  94.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  95.         // line 9
  96.         yield "    ";
  97.         yield from $this->unwrap()->yieldBlock('sonata_javascript_config'$context$blocks);
  98.         // line 11
  99.         yield "
  100.     ";
  101.         // line 12
  102.         yield from $this->unwrap()->yieldBlock('sonata_javascript_pool'$context$blocks);
  103.         // line 17
  104.         yield "
  105.     ";
  106.         // line 19
  107.         yield "    ";
  108.         $context["localeForMoment"] = $this->env->getRuntime('Sonata\AdminBundle\Twig\CanonicalizeRuntime')->getCanonicalizedLocaleForMoment();
  109.         // line 20
  110.         yield "    ";
  111.         if (((isset($context["localeForMoment"]) || array_key_exists("localeForMoment"$context) ? $context["localeForMoment"] : (function () { throw new RuntimeError('Variable "localeForMoment" does not exist.'20$this->source); })()) == "ua")) {
  112.             // line 21
  113.             yield "        <script src=\"";
  114.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/sonatacore/vendor/moment/locale/uk.js"), "html"nulltrue);
  115.             // line 23
  116.             yield "\"></script>
  117.     ";
  118.         } elseif ((($tmp =         // line 24
  119. (isset($context["localeForMoment"]) || array_key_exists("localeForMoment"$context) ? $context["localeForMoment"] : (function () { throw new RuntimeError('Variable "localeForMoment" does not exist.'24$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  120.             // line 25
  121.             yield "        <script src=\"";
  122.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((("bundles/sonatacore/vendor/moment/locale/" .             // line 27
  123. (isset($context["localeForMoment"]) || array_key_exists("localeForMoment"$context) ? $context["localeForMoment"] : (function () { throw new RuntimeError('Variable "localeForMoment" does not exist.'27$this->source); })())) . ".js")), "html"nulltrue);
  124.             // line 29
  125.             yield "\"></script>
  126.     ";
  127.         }
  128.         // line 31
  129.         yield "
  130.     ";
  131.         // line 33
  132.         yield "    ";
  133.         if ((($tmp CoreExtension::getAttribute($this->env$this->source, (isset($context["sonata_config"]) || array_key_exists("sonata_config"$context) ? $context["sonata_config"] : (function () { throw new RuntimeError('Variable "sonata_config" does not exist.'33$this->source); })()), "getOption", ["use_select2"], "method"falsefalsefalse33)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  134.             // line 34
  135.             yield "        ";
  136.             $context["localeForSelect2"] = $this->env->getRuntime('Sonata\AdminBundle\Twig\CanonicalizeRuntime')->getCanonicalizedLocaleForSelect2();
  137.             // line 35
  138.             yield "        ";
  139.             if (((isset($context["localeForSelect2"]) || array_key_exists("localeForSelect2"$context) ? $context["localeForSelect2"] : (function () { throw new RuntimeError('Variable "localeForSelect2" does not exist.'35$this->source); })()) == "ua")) {
  140.                 // line 36
  141.                 yield "            <script src=\"";
  142.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/sonatacore/vendor/select2/select2_locale_uk.js"), "html"nulltrue);
  143.                 yield "\"></script>
  144.         ";
  145.             } elseif ((($tmp =             // line 37
  146. (isset($context["localeForSelect2"]) || array_key_exists("localeForSelect2"$context) ? $context["localeForSelect2"] : (function () { throw new RuntimeError('Variable "localeForSelect2" does not exist.'37$this->source); })())) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  147.                 // line 38
  148.                 yield "            <script src=\"";
  149.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((("bundles/sonatacore/vendor/select2/select2_locale_" . (isset($context["localeForSelect2"]) || array_key_exists("localeForSelect2"$context) ? $context["localeForSelect2"] : (function () { throw new RuntimeError('Variable "localeForSelect2" does not exist.'38$this->source); })())) . ".js")), "html"nulltrue);
  150.                 yield "\"></script>
  151.         ";
  152.             }
  153.             // line 40
  154.             yield "    ";
  155.         }
  156.         
  157.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  158.         
  159.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  160.         yield from [];
  161.     }
  162.     // line 9
  163.     /**
  164.      * @return iterable<null|scalar|\Stringable>
  165.      */
  166.     public function block_sonata_javascript_config(array $context, array $blocks = []): iterable
  167.     {
  168.         $macros $this->macros;
  169.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  170.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_javascript_config"));
  171.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  172.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_javascript_config"));
  173.         // line 10
  174.         yield "    ";
  175.         
  176.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  177.         
  178.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  179.         yield from [];
  180.     }
  181.     // line 12
  182.     /**
  183.      * @return iterable<null|scalar|\Stringable>
  184.      */
  185.     public function block_sonata_javascript_pool(array $context, array $blocks = []): iterable
  186.     {
  187.         $macros $this->macros;
  188.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  189.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_javascript_pool"));
  190.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  191.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_javascript_pool"));
  192.         // line 13
  193.         yield "        ";
  194.         $context['_parent'] = $context;
  195.         $context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env$this->source, (isset($context["sonata_config"]) || array_key_exists("sonata_config"$context) ? $context["sonata_config"] : (function () { throw new RuntimeError('Variable "sonata_config" does not exist.'13$this->source); })()), "getOption", ["javascripts", []], "method"falsefalsefalse13));
  196.         foreach ($context['_seq'] as $context["_key"] => $context["javascript"]) {
  197.             // line 14
  198.             yield "            <script src=\"";
  199.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["javascript"]), "html"nulltrue);
  200.             yield "\"></script>
  201.         ";
  202.         }
  203.         $_parent $context['_parent'];
  204.         unset($context['_seq'], $context['_key'], $context['javascript'], $context['_parent']);
  205.         $context array_intersect_key($context$_parent) + $_parent;
  206.         // line 16
  207.         yield "    ";
  208.         
  209.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  210.         
  211.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  212.         yield from [];
  213.     }
  214.     // line 44
  215.     /**
  216.      * @return iterable<null|scalar|\Stringable>
  217.      */
  218.     public function block_sonata_top_nav_menu(array $context, array $blocks = []): iterable
  219.     {
  220.         $macros $this->macros;
  221.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  222.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_top_nav_menu"));
  223.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  224.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_top_nav_menu"));
  225.         // line 45
  226.         yield "    ";
  227.         if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'45$this->source); })()), "user", [], "any"falsefalsefalse45) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN"))) {
  228.             // line 46
  229.             yield "        <div class=\"navbar-custom-menu\">
  230.             <ul class=\"nav navbar-nav\">
  231.                 ";
  232.             // line 48
  233.             yield from $this->unwrap()->yieldBlock('sonata_top_nav_menu_add_block'$context$blocks);
  234.             // line 53
  235.             yield "                ";
  236.             if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsetruefalse53), "dealer", [], "any"truetruefalse53) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'53$this->source); })()), "user", [], "any"falsefalsefalse53), "dealer", [], "any"falsefalsefalse53))) {
  237.                 // line 54
  238.                 yield "                    <li class=\"dropdown\">
  239.                         <div style=\"padding-top: 5px; padding-right: 15px\">
  240.                             Дилер: <b>";
  241.                 // line 56
  242.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'56$this->source); })()), "user", [], "any"falsefalsefalse56), "dealer", [], "any"falsefalsefalse56), "name", [], "any"falsefalsefalse56), "html"nulltrue);
  243.                 yield "</b><br>
  244.                             ";
  245.                 // line 57
  246.                 if ((($tmp CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'57$this->source); })()), "user", [], "any"falsefalsefalse57), "subDealer", [], "any"falsefalsefalse57)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  247.                     // line 58
  248.                     yield "                                Суб дилер: <b>";
  249.                     yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'58$this->source); })()), "user", [], "any"falsefalsefalse58), "subDealer", [], "any"falsefalsefalse58), "name", [], "any"falsefalsefalse58), "html"nulltrue);
  250.                     yield "</b><br>
  251.                             ";
  252.                 }
  253.                 // line 60
  254.                 yield "                            <a style=\"cursor: pointer\" class=\"jsEditDealerRate\">
  255.                                 Текущий курс <b>";
  256.                 // line 61
  257.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'61$this->source); })()), "user", [], "any"falsefalsefalse61), "dealer", [], "any"falsefalsefalse61), "rate", [], "any"falsefalsefalse61), "html"nulltrue);
  258.                 yield "</b> / Курс в поставке <b>";
  259.                 yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'61$this->source); })()), "user", [], "any"falsefalsefalse61), "dealer", [], "any"falsefalsefalse61), "rateInDelivery", [], "any"falsefalsefalse61), "html"nulltrue);
  260.                 yield "</b>
  261.                             </a>
  262.                         </div>
  263.                     </li>
  264.                 ";
  265.             }
  266.             // line 66
  267.             yield "                ";
  268.             yield from $this->unwrap()->yieldBlock('sonata_top_nav_menu_user_block'$context$blocks);
  269.             // line 98
  270.             yield "            </ul>
  271.         </div>
  272.     ";
  273.         }
  274.         
  275.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  276.         
  277.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  278.         yield from [];
  279.     }
  280.     // line 48
  281.     /**
  282.      * @return iterable<null|scalar|\Stringable>
  283.      */
  284.     public function block_sonata_top_nav_menu_add_block(array $context, array $blocks = []): iterable
  285.     {
  286.         $macros $this->macros;
  287.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  288.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_top_nav_menu_add_block"));
  289.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  290.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_top_nav_menu_add_block"));
  291.         // line 49
  292.         yield "                     <li class=\"dropdown\">
  293.                      </li>
  294.                 ";
  295.         
  296.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  297.         
  298.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  299.         yield from [];
  300.     }
  301.     // line 66
  302.     /**
  303.      * @return iterable<null|scalar|\Stringable>
  304.      */
  305.     public function block_sonata_top_nav_menu_user_block(array $context, array $blocks = []): iterable
  306.     {
  307.         $macros $this->macros;
  308.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  309.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_top_nav_menu_user_block"));
  310.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  311.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_top_nav_menu_user_block"));
  312.         // line 67
  313.         yield "                    <li class=\"dropdown user-menu\">
  314.                         <a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">
  315.                             <i class=\"fa fa-user fa-fw\" aria-hidden=\"true\"></i>
  316.                                 ";
  317.         // line 70
  318.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'70$this->source); })()), "user", [], "any"falsefalsefalse70), "fullname", [], "any"falsefalsefalse70), "html"nulltrue);
  319.         yield "
  320.                             <i class=\"fa fa-caret-down\" aria-hidden=\"true\"></i>
  321.                         </a>
  322.                         <ul class=\"dropdown-menu dropdown-user\">
  323.                                 <li>Дилер:
  324.                                     <select id=\"user-dealer\" name=\"user_dealer\"></select>
  325.                                 </li>
  326.                                 <li>Суб Дилер:
  327.                                     <select id=\"user-sub-dealer\" name=\"user_sub_dealer\"></select>
  328.                                 </li>
  329.                             ";
  330.         // line 81
  331.         if ((($tmp CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'81$this->source); })()), "user", [], "any"falsefalsefalse81), "hasRole", ["ROLE_SUPER_ADMIN"], "method"falsefalsefalse81)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  332.             // line 82
  333.             yield "                                <li>
  334.                                     <a href=\"";
  335.             // line 83
  336.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_change_password_page");
  337.             yield "\"><i class=\"fa fa-key\"></i> Изменить пароль</a>
  338.                                 </li>
  339.                                 ";
  340.             // line 85
  341.             if ((CoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'85$this->source); })()), "environment", [], "any"falsefalsefalse85) == "dev")) {
  342.                 // line 86
  343.                 yield "                                    <li>
  344.                                         <a href=\"";
  345.                 // line 87
  346.                 yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_run_migration");
  347.                 yield "\"><i class=\"fa fa-exclamation-triangle\"></i> Run migration</a>
  348.                                     </li>
  349.                                 ";
  350.             }
  351.             // line 90
  352.             yield "                            ";
  353.         }
  354.         // line 91
  355.         yield "                            <li>
  356.                                 <a href=\"";
  357.         // line 92
  358.         yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_logout");
  359.         yield "\"><i class=\"fa fa-sign-out\"></i> Выйти</a>
  360.                             </li>
  361.                         </ul>
  362.                     </li>
  363.                 ";
  364.         
  365.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  366.         
  367.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  368.         yield from [];
  369.     }
  370.     // line 104
  371.     /**
  372.      * @return iterable<null|scalar|\Stringable>
  373.      */
  374.     public function block_logo(array $context, array $blocks = []): iterable
  375.     {
  376.         $macros $this->macros;
  377.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  378.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""logo"));
  379.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  380.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""logo"));
  381.         // line 105
  382.         yield "    ";
  383.         $_v0 = ('' === $tmp \Twig\Extension\CoreExtension::captureOutput((function () use (&$context$macros$blocks) {
  384.             // line 106
  385.             yield "        <a class=\"logo\" style=\"text-align: left; padding-left: 5px; font-size: 18px;\" href=\"";
  386.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sonata_admin_dashboard");
  387.             yield "\">
  388.             <img src=\"";
  389.             // line 107
  390.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/core/img/favicon.png"), "html"nulltrue);
  391.             yield "\" alt=\"ViDi Автодинастия\">
  392.             ViDi Автодинастия
  393.         </a>
  394.     ";
  395.             yield from [];
  396.         })())) ? '' : new Markup($tmp$this->env->getCharset());
  397.         // line 105
  398.         yield Twig\Extension\CoreExtension::spaceless($_v0);
  399.         
  400.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  401.         
  402.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  403.         yield from [];
  404.     }
  405.     // line 114
  406.     /**
  407.      * @return iterable<null|scalar|\Stringable>
  408.      */
  409.     public function block_sonata_wrapper(array $context, array $blocks = []): iterable
  410.     {
  411.         $macros $this->macros;
  412.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  413.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_wrapper"));
  414.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  415.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""sonata_wrapper"));
  416.         // line 115
  417.         yield "    ";
  418.         yield from $this->yieldParentBlock("sonata_wrapper"$context$blocks);
  419.         yield "
  420.     <script src=\"";
  421.         // line 116
  422.         yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/admin/js/custom.js"), "html"nulltrue);
  423.         yield "\"></script>
  424.     ";
  425.         // line 117
  426.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsetruefalse117), "dealer", [], "any"truetruefalse117) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'117$this->source); })()), "user", [], "any"falsefalsefalse117), "dealer", [], "any"falsefalsefalse117))) {
  427.             // line 118
  428.             yield "        <div class=\"modal fade\" id=\"dealerRateHeaderModal\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">
  429.             <div class=\"modal-dialog\" role=\"document\">
  430.                 <div class=\"modal-content\">
  431.                     <div class=\"modal-header\">
  432.                         <h4 class=\"modal-title\">Изменить курс</h4>
  433.                         <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  434.                             <span aria-hidden=\"true\">&times;</span>
  435.                         </button>
  436.                     </div>
  437.                     <div class=\"modal-body\">
  438.                         <form>
  439.                             <div class=\"form-group\">
  440.                                 <label for=\"dealer_rate_input\">Курс</label>
  441.                                 <input id=\"dealer_rate_input\" class=\"form-control\" name=\"rate\" type=\"text\" value=\"";
  442.             // line 131
  443.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'131$this->source); })()), "user", [], "any"falsefalsefalse131), "dealer", [], "any"falsefalsefalse131), "rate", [], "any"falsefalsefalse131), "html"nulltrue);
  444.             yield "\">
  445.                                 <input type=\"hidden\" name=\"dealer\" value=\"";
  446.             // line 132
  447.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'132$this->source); })()), "user", [], "any"falsefalsefalse132), "dealer", [], "any"falsefalsefalse132), "id", [], "any"falsefalsefalse132), "html"nulltrue);
  448.             yield "\">
  449.                             </div>
  450.                             <div class=\"form-group\">
  451.                                 <label for=\"dealer_rate_input\">Курс в поставке</label>
  452.                                 <input id=\"dealer_rate_input\" class=\"form-control\" name=\"rate_in_delivery\" type=\"text\" value=\"";
  453.             // line 136
  454.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'136$this->source); })()), "user", [], "any"falsefalsefalse136), "dealer", [], "any"falsefalsefalse136), "rateInDelivery", [], "any"falsefalsefalse136), "html"nulltrue);
  455.             yield "\">
  456.                             </div>
  457.                         </form>
  458.                     </div>
  459.                     <div class=\"modal-footer\">
  460.                         <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Отмена</button>
  461.                         <button data-href=\"";
  462.             // line 142
  463.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("dc.deaker.rate.save");
  464.             yield "\" type=\"button\" class=\"btn btn-primary jsSaveRateBtn\">Сохранить</button>
  465.                     </div>
  466.                 </div>
  467.             </div>
  468.         </div>
  469.     ";
  470.         }
  471.         // line 148
  472.         yield "
  473.     <script>
  474.         \$(\".js-date-picker\").datepicker({
  475.             language : 'ru',
  476.             format : 'yyyy-mm-dd'
  477.         });
  478.         \$(document).ready(function () {
  479.             var select = \$(\"#user-dealer\");
  480.             var selectSubDealer = \$(\"#user-sub-dealer\");
  481.             var changeDealerList = ";
  482.         // line 157
  483.         yield json_encode(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'157$this->source); })()), "user", [], "any"falsefalsefalse157), "changeDealerList", [], "any"falsefalsefalse157));
  484.         yield ";
  485.             ";
  486.         // line 159
  487.         if ((CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, ($context["app"] ?? null), "user", [], "any"falsetruefalse159), "dealer", [], "any"truetruefalse159) && CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'159$this->source); })()), "user", [], "any"falsefalsefalse159), "dealer", [], "any"falsefalsefalse159))) {
  488.             // line 160
  489.             yield "                \$.ajax({
  490.                     url: '";
  491.             // line 161
  492.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("core.user_get_dealers");
  493.             yield "',
  494.                     dataType: 'json',
  495.                     method: 'POST',
  496.                     success: function (response) {
  497.                         if (response) {
  498.                             if (response.dealers) {
  499.                                 \$.each(response.dealers, function () {
  500.                                     ";
  501.             // line 168
  502.             if ((($tmp CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'168$this->source); })()), "user", [], "any"falsefalsefalse168), "hasRole", ["ROLE_SUPER_ADMIN"], "method"falsefalsefalse168)) && $tmp instanceof Markup ? (string) $tmp $tmp)) {
  503.                 // line 169
  504.                 yield "                                    console.log('ROLE_SUPER_ADMIN');
  505.                                         select.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
  506.                                     ";
  507.             } else {
  508.                 // line 172
  509.                 yield "                                        if (changeDealerList.includes(this.id)) {
  510.                                             select.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
  511.                                         }
  512.                                     console.log('NO ROLE_SUPER_ADMIN');
  513.                                     ";
  514.             }
  515.             // line 177
  516.             yield "                                });
  517.                                 select.val('";
  518.             // line 179
  519.             yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'179$this->source); })()), "user", [], "any"falsefalsefalse179), "dealer", [], "any"falsefalsefalse179), "id", [], "any"falsefalsefalse179), "html"nulltrue);
  520.             yield "').change();
  521.                                 select.on('change', function () {
  522.                                     \$.ajax({
  523.                                         url: '";
  524.             // line 182
  525.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("core.user_set_dealer");
  526.             yield "',
  527.                                         data: { user_dealer: select.val() },
  528.                                         dataType: 'json',
  529.                                         method: 'POST',
  530.                                         success: function (response) {
  531.                                             if (response.success) {
  532.                                                 location.reload();
  533.                                             } else {
  534.                                                 console.log('error');
  535.                                             }
  536.                                         },
  537.                                     });
  538.                                 });
  539.                             }
  540.                             if (response.subDealers) {
  541.                                 \$.each(response.subDealers, function () {
  542.                                     selectSubDealer.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
  543.                                 });
  544.                                 selectSubDealer.val('";
  545.             // line 200
  546.             yield (((($tmp CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'200$this->source); })()), "user", [], "any"falsefalsefalse200), "subDealer", [], "any"falsefalsefalse200)) && $tmp instanceof Markup ? (string) $tmp $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->sourceCoreExtension::getAttribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'200$this->source); })()), "user", [], "any"falsefalsefalse200), "subDealer", [], "any"falsefalsefalse200), "id", [], "any"falsefalsefalse200), "html"nulltrue)) : (0));
  547.             yield "').change();
  548.                                 selectSubDealer.on('change', function () {
  549.                                     \$.ajax({
  550.                                         url: '";
  551.             // line 203
  552.             yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("core.user_set_dealer");
  553.             yield "',
  554.                                         data: { user_sub_dealer: selectSubDealer.val() },
  555.                                         dataType: 'json',
  556.                                         method: 'POST',
  557.                                         success: function (response) {
  558.                                             if (response.success) {
  559.                                                 location.reload();
  560.                                             } else {
  561.                                                 console.log('error');
  562.                                             }
  563.                                         },
  564.                                     });
  565.                                 });
  566.                             }
  567.                         }
  568.                     }
  569.                 });
  570.             ";
  571.         }
  572.         // line 222
  573.         yield "        });
  574.     </script>
  575. ";
  576.         
  577.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  578.         
  579.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  580.         yield from [];
  581.     }
  582.     /**
  583.      * @codeCoverageIgnore
  584.      */
  585.     public function getTemplateName(): string
  586.     {
  587.         return "@Admin/admin/standard_layout.html.twig";
  588.     }
  589.     /**
  590.      * @codeCoverageIgnore
  591.      */
  592.     public function isTraitable(): bool
  593.     {
  594.         return false;
  595.     }
  596.     /**
  597.      * @codeCoverageIgnore
  598.      */
  599.     public function getDebugInfo(): array
  600.     {
  601.         return array (  633 => 222,  611 => 203,  605 => 200,  584 => 182,  578 => 179,  574 => 177,  567 => 172,  562 => 169,  560 => 168,  550 => 161,  547 => 160,  545 => 159,  540 => 157,  529 => 148,  520 => 142,  511 => 136,  504 => 132,  500 => 131,  485 => 118,  483 => 117,  479 => 116,  474 => 115,  461 => 114,  450 => 105,  442 => 107,  437 => 106,  434 => 105,  421 => 104,  404 => 92,  401 => 91,  398 => 90,  392 => 87,  389 => 86,  387 => 85,  382 => 83,  379 => 82,  377 => 81,  363 => 70,  358 => 67,  345 => 66,  331 => 49,  318 => 48,  304 => 98,  301 => 66,  291 => 61,  288 => 60,  282 => 58,  280 => 57,  276 => 56,  272 => 54,  269 => 53,  267 => 48,  263 => 46,  260 => 45,  247 => 44,  236 => 16,  227 => 14,  222 => 13,  209 => 12,  198 => 10,  185 => 9,  173 => 40,  167 => 38,  165 => 37,  160 => 36,  157 => 35,  154 => 34,  151 => 33,  148 => 31,  144 => 29,  142 => 27,  140 => 25,  138 => 24,  135 => 23,  132 => 21,  129 => 20,  126 => 19,  123 => 17,  121 => 12,  118 => 11,  115 => 9,  102 => 8,  89 => 5,  84 => 4,  71 => 3,  48 => 1,);
  602.     }
  603.     public function getSourceContext(): Source
  604.     {
  605.         return new Source("{% extends '@SonataAdmin/standard_layout.html.twig' %}
  606. {% block stylesheets %}
  607.     {{ parent() }}
  608.     <link rel=\"icon\" href=\"{{ asset('bundles/core/img/favicon.png') }}\" type=\"image/x-icon\" />
  609. {% endblock %}
  610. {% block javascripts %}
  611.     {% block sonata_javascript_config %}
  612.     {% endblock %}
  613.     {% block sonata_javascript_pool %}
  614.         {% for javascript in sonata_config.getOption('javascripts', []) %}
  615.             <script src=\"{{ asset(javascript) }}\"></script>
  616.         {% endfor %}
  617.     {% endblock %}
  618.     {# localize moment #}
  619.     {% set localeForMoment = canonicalize_locale_for_moment() %}
  620.     {% if localeForMoment == 'ua'%}
  621.         <script src=\"{{ asset(
  622.             'bundles/sonatacore/vendor/moment/locale/uk.js'
  623.         ) }}\"></script>
  624.     {% elseif localeForMoment %}
  625.         <script src=\"{{ asset(
  626.             'bundles/sonatacore/vendor/moment/locale/' ~
  627.             localeForMoment ~
  628.             '.js'
  629.         ) }}\"></script>
  630.     {% endif %}
  631.     {# localize select2 #}
  632.     {% if sonata_config.getOption('use_select2') %}
  633.         {% set localeForSelect2 = canonicalize_locale_for_select2() %}
  634.         {% if localeForSelect2 == 'ua' %}
  635.             <script src=\"{{ asset('bundles/sonatacore/vendor/select2/select2_locale_uk.js') }}\"></script>
  636.         {% elseif localeForSelect2 %}
  637.             <script src=\"{{ asset('bundles/sonatacore/vendor/select2/select2_locale_' ~ localeForSelect2 ~ '.js') }}\"></script>
  638.         {% endif %}
  639.     {% endif %}
  640. {% endblock %}
  641. {% block sonata_top_nav_menu %}
  642.     {% if app.user and is_granted('ROLE_ADMIN') %}
  643.         <div class=\"navbar-custom-menu\">
  644.             <ul class=\"nav navbar-nav\">
  645.                 {% block sonata_top_nav_menu_add_block %}
  646.                      <li class=\"dropdown\">
  647.                      </li>
  648.                 {% endblock %}
  649.                 {% if app.user.dealer is defined and app.user.dealer %}
  650.                     <li class=\"dropdown\">
  651.                         <div style=\"padding-top: 5px; padding-right: 15px\">
  652.                             Дилер: <b>{{ app.user.dealer.name }}</b><br>
  653.                             {% if app.user.subDealer %}
  654.                                 Суб дилер: <b>{{ app.user.subDealer.name }}</b><br>
  655.                             {% endif %}
  656.                             <a style=\"cursor: pointer\" class=\"jsEditDealerRate\">
  657.                                 Текущий курс <b>{{ app.user.dealer.rate }}</b> / Курс в поставке <b>{{ app.user.dealer.rateInDelivery }}</b>
  658.                             </a>
  659.                         </div>
  660.                     </li>
  661.                 {% endif %}
  662.                 {% block sonata_top_nav_menu_user_block %}
  663.                     <li class=\"dropdown user-menu\">
  664.                         <a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">
  665.                             <i class=\"fa fa-user fa-fw\" aria-hidden=\"true\"></i>
  666.                                 {{ app.user.fullname }}
  667.                             <i class=\"fa fa-caret-down\" aria-hidden=\"true\"></i>
  668.                         </a>
  669.                         <ul class=\"dropdown-menu dropdown-user\">
  670.                                 <li>Дилер:
  671.                                     <select id=\"user-dealer\" name=\"user_dealer\"></select>
  672.                                 </li>
  673.                                 <li>Суб Дилер:
  674.                                     <select id=\"user-sub-dealer\" name=\"user_sub_dealer\"></select>
  675.                                 </li>
  676.                             {% if app.user.hasRole('ROLE_SUPER_ADMIN') %}
  677.                                 <li>
  678.                                     <a href=\"{{ path('admin_change_password_page') }}\"><i class=\"fa fa-key\"></i> Изменить пароль</a>
  679.                                 </li>
  680.                                 {% if app.environment == 'dev' %}
  681.                                     <li>
  682.                                         <a href=\"{{ path('admin_run_migration') }}\"><i class=\"fa fa-exclamation-triangle\"></i> Run migration</a>
  683.                                     </li>
  684.                                 {% endif %}
  685.                             {% endif %}
  686.                             <li>
  687.                                 <a href=\"{{ path('admin_logout') }}\"><i class=\"fa fa-sign-out\"></i> Выйти</a>
  688.                             </li>
  689.                         </ul>
  690.                     </li>
  691.                 {% endblock %}
  692.             </ul>
  693.         </div>
  694.     {% endif %}
  695. {% endblock %}
  696. {% block logo %}
  697.     {% apply spaceless %}
  698.         <a class=\"logo\" style=\"text-align: left; padding-left: 5px; font-size: 18px;\" href=\"{{ path('sonata_admin_dashboard') }}\">
  699.             <img src=\"{{ asset('bundles/core/img/favicon.png') }}\" alt=\"ViDi Автодинастия\">
  700.             ViDi Автодинастия
  701.         </a>
  702.     {% endapply %}
  703. {% endblock %}
  704. {% block sonata_wrapper %}
  705.     {{ parent() }}
  706.     <script src=\"{{ asset('bundles/admin/js/custom.js') }}\"></script>
  707.     {% if app.user.dealer is defined and app.user.dealer %}
  708.         <div class=\"modal fade\" id=\"dealerRateHeaderModal\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">
  709.             <div class=\"modal-dialog\" role=\"document\">
  710.                 <div class=\"modal-content\">
  711.                     <div class=\"modal-header\">
  712.                         <h4 class=\"modal-title\">Изменить курс</h4>
  713.                         <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
  714.                             <span aria-hidden=\"true\">&times;</span>
  715.                         </button>
  716.                     </div>
  717.                     <div class=\"modal-body\">
  718.                         <form>
  719.                             <div class=\"form-group\">
  720.                                 <label for=\"dealer_rate_input\">Курс</label>
  721.                                 <input id=\"dealer_rate_input\" class=\"form-control\" name=\"rate\" type=\"text\" value=\"{{ app.user.dealer.rate }}\">
  722.                                 <input type=\"hidden\" name=\"dealer\" value=\"{{ app.user.dealer.id }}\">
  723.                             </div>
  724.                             <div class=\"form-group\">
  725.                                 <label for=\"dealer_rate_input\">Курс в поставке</label>
  726.                                 <input id=\"dealer_rate_input\" class=\"form-control\" name=\"rate_in_delivery\" type=\"text\" value=\"{{ app.user.dealer.rateInDelivery }}\">
  727.                             </div>
  728.                         </form>
  729.                     </div>
  730.                     <div class=\"modal-footer\">
  731.                         <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Отмена</button>
  732.                         <button data-href=\"{{ path('dc.deaker.rate.save') }}\" type=\"button\" class=\"btn btn-primary jsSaveRateBtn\">Сохранить</button>
  733.                     </div>
  734.                 </div>
  735.             </div>
  736.         </div>
  737.     {% endif %}
  738.     <script>
  739.         \$(\".js-date-picker\").datepicker({
  740.             language : 'ru',
  741.             format : 'yyyy-mm-dd'
  742.         });
  743.         \$(document).ready(function () {
  744.             var select = \$(\"#user-dealer\");
  745.             var selectSubDealer = \$(\"#user-sub-dealer\");
  746.             var changeDealerList = {{ app.user.changeDealerList|json_encode|raw }};
  747.             {% if app.user.dealer is defined and app.user.dealer %}
  748.                 \$.ajax({
  749.                     url: '{{ path('core.user_get_dealers') }}',
  750.                     dataType: 'json',
  751.                     method: 'POST',
  752.                     success: function (response) {
  753.                         if (response) {
  754.                             if (response.dealers) {
  755.                                 \$.each(response.dealers, function () {
  756.                                     {% if app.user.hasRole('ROLE_SUPER_ADMIN') %}
  757.                                     console.log('ROLE_SUPER_ADMIN');
  758.                                         select.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
  759.                                     {% else %}
  760.                                         if (changeDealerList.includes(this.id)) {
  761.                                             select.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
  762.                                         }
  763.                                     console.log('NO ROLE_SUPER_ADMIN');
  764.                                     {% endif %}
  765.                                 });
  766.                                 select.val('{{ app.user.dealer.id  }}').change();
  767.                                 select.on('change', function () {
  768.                                     \$.ajax({
  769.                                         url: '{{ path('core.user_set_dealer') }}',
  770.                                         data: { user_dealer: select.val() },
  771.                                         dataType: 'json',
  772.                                         method: 'POST',
  773.                                         success: function (response) {
  774.                                             if (response.success) {
  775.                                                 location.reload();
  776.                                             } else {
  777.                                                 console.log('error');
  778.                                             }
  779.                                         },
  780.                                     });
  781.                                 });
  782.                             }
  783.                             if (response.subDealers) {
  784.                                 \$.each(response.subDealers, function () {
  785.                                     selectSubDealer.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
  786.                                 });
  787.                                 selectSubDealer.val('{{ app.user.subDealer ? app.user.subDealer.id : 0 }}').change();
  788.                                 selectSubDealer.on('change', function () {
  789.                                     \$.ajax({
  790.                                         url: '{{ path('core.user_set_dealer') }}',
  791.                                         data: { user_sub_dealer: selectSubDealer.val() },
  792.                                         dataType: 'json',
  793.                                         method: 'POST',
  794.                                         success: function (response) {
  795.                                             if (response.success) {
  796.                                                 location.reload();
  797.                                             } else {
  798.                                                 console.log('error');
  799.                                             }
  800.                                         },
  801.                                     });
  802.                                 });
  803.                             }
  804.                         }
  805.                     }
  806.                 });
  807.             {% endif %}
  808.         });
  809.     </script>
  810. {% endblock sonata_wrapper %}
  811. ""@Admin/admin/standard_layout.html.twig""/var/www/vidi.ua/releases/251023-65bd7d10/src/AdminBundle/Resources/views/admin/standard_layout.html.twig");
  812.     }
  813. }