<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* @Admin/admin/standard_layout.html.twig */
class __TwigTemplate_8067a34927e3df0369cfc9d1fb166562 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'javascripts' => [$this, 'block_javascripts'],
'sonata_javascript_config' => [$this, 'block_sonata_javascript_config'],
'sonata_javascript_pool' => [$this, 'block_sonata_javascript_pool'],
'sonata_top_nav_menu' => [$this, 'block_sonata_top_nav_menu'],
'sonata_top_nav_menu_add_block' => [$this, 'block_sonata_top_nav_menu_add_block'],
'sonata_top_nav_menu_user_block' => [$this, 'block_sonata_top_nav_menu_user_block'],
'logo' => [$this, 'block_logo'],
'sonata_wrapper' => [$this, 'block_sonata_wrapper'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "@SonataAdmin/standard_layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Admin/admin/standard_layout.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Admin/admin/standard_layout.html.twig"));
$this->parent = $this->load("@SonataAdmin/standard_layout.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_stylesheets(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 4
yield " ";
yield from $this->yieldParentBlock("stylesheets", $context, $blocks);
yield "
<link rel=\"icon\" href=\"";
// line 5
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/core/img/favicon.png"), "html", null, true);
yield "\" type=\"image/x-icon\" />
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 8
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 9
yield " ";
yield from $this->unwrap()->yieldBlock('sonata_javascript_config', $context, $blocks);
// line 11
yield "
";
// line 12
yield from $this->unwrap()->yieldBlock('sonata_javascript_pool', $context, $blocks);
// line 17
yield "
";
// line 19
yield " ";
$context["localeForMoment"] = $this->env->getRuntime('Sonata\AdminBundle\Twig\CanonicalizeRuntime')->getCanonicalizedLocaleForMoment();
// line 20
yield " ";
if (((isset($context["localeForMoment"]) || array_key_exists("localeForMoment", $context) ? $context["localeForMoment"] : (function () { throw new RuntimeError('Variable "localeForMoment" does not exist.', 20, $this->source); })()) == "ua")) {
// line 21
yield " <script src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/sonatacore/vendor/moment/locale/uk.js"), "html", null, true);
// line 23
yield "\"></script>
";
} elseif ((($tmp = // line 24
(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)) {
// line 25
yield " <script src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl((("bundles/sonatacore/vendor/moment/locale/" . // line 27
(isset($context["localeForMoment"]) || array_key_exists("localeForMoment", $context) ? $context["localeForMoment"] : (function () { throw new RuntimeError('Variable "localeForMoment" does not exist.', 27, $this->source); })())) . ".js")), "html", null, true);
// line 29
yield "\"></script>
";
}
// line 31
yield "
";
// line 33
yield " ";
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", false, false, false, 33)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 34
yield " ";
$context["localeForSelect2"] = $this->env->getRuntime('Sonata\AdminBundle\Twig\CanonicalizeRuntime')->getCanonicalizedLocaleForSelect2();
// line 35
yield " ";
if (((isset($context["localeForSelect2"]) || array_key_exists("localeForSelect2", $context) ? $context["localeForSelect2"] : (function () { throw new RuntimeError('Variable "localeForSelect2" does not exist.', 35, $this->source); })()) == "ua")) {
// line 36
yield " <script src=\"";
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", null, true);
yield "\"></script>
";
} elseif ((($tmp = // line 37
(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)) {
// line 38
yield " <script src=\"";
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", null, true);
yield "\"></script>
";
}
// line 40
yield " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 9
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_sonata_javascript_config(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_javascript_config"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_javascript_config"));
// line 10
yield " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 12
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_sonata_javascript_pool(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_javascript_pool"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_javascript_pool"));
// line 13
yield " ";
$context['_parent'] = $context;
$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", false, false, false, 13));
foreach ($context['_seq'] as $context["_key"] => $context["javascript"]) {
// line 14
yield " <script src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl($context["javascript"]), "html", null, true);
yield "\"></script>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['javascript'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
yield " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 44
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_sonata_top_nav_menu(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_top_nav_menu"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_top_nav_menu"));
// line 45
yield " ";
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", false, false, false, 45) && $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN"))) {
// line 46
yield " <div class=\"navbar-custom-menu\">
<ul class=\"nav navbar-nav\">
";
// line 48
yield from $this->unwrap()->yieldBlock('sonata_top_nav_menu_add_block', $context, $blocks);
// line 53
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, true, false, 53), "dealer", [], "any", true, true, false, 53) && CoreExtension::getAttribute($this->env, $this->source, 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.', 53, $this->source); })()), "user", [], "any", false, false, false, 53), "dealer", [], "any", false, false, false, 53))) {
// line 54
yield " <li class=\"dropdown\">
<div style=\"padding-top: 5px; padding-right: 15px\">
Дилер: <b>";
// line 56
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 56, $this->source); })()), "user", [], "any", false, false, false, 56), "dealer", [], "any", false, false, false, 56), "name", [], "any", false, false, false, 56), "html", null, true);
yield "</b><br>
";
// line 57
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, 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.', 57, $this->source); })()), "user", [], "any", false, false, false, 57), "subDealer", [], "any", false, false, false, 57)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 58
yield " Суб дилер: <b>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 58, $this->source); })()), "user", [], "any", false, false, false, 58), "subDealer", [], "any", false, false, false, 58), "name", [], "any", false, false, false, 58), "html", null, true);
yield "</b><br>
";
}
// line 60
yield " <a style=\"cursor: pointer\" class=\"jsEditDealerRate\">
Текущий курс <b>";
// line 61
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 61, $this->source); })()), "user", [], "any", false, false, false, 61), "dealer", [], "any", false, false, false, 61), "rate", [], "any", false, false, false, 61), "html", null, true);
yield "</b> / Курс в поставке <b>";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 61, $this->source); })()), "user", [], "any", false, false, false, 61), "dealer", [], "any", false, false, false, 61), "rateInDelivery", [], "any", false, false, false, 61), "html", null, true);
yield "</b>
</a>
</div>
</li>
";
}
// line 66
yield " ";
yield from $this->unwrap()->yieldBlock('sonata_top_nav_menu_user_block', $context, $blocks);
// line 98
yield " </ul>
</div>
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 48
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_sonata_top_nav_menu_add_block(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_top_nav_menu_add_block"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_top_nav_menu_add_block"));
// line 49
yield " <li class=\"dropdown\">
</li>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 66
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_sonata_top_nav_menu_user_block(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_top_nav_menu_user_block"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_top_nav_menu_user_block"));
// line 67
yield " <li class=\"dropdown user-menu\">
<a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">
<i class=\"fa fa-user fa-fw\" aria-hidden=\"true\"></i>
";
// line 70
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, 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.', 70, $this->source); })()), "user", [], "any", false, false, false, 70), "fullname", [], "any", false, false, false, 70), "html", null, true);
yield "
<i class=\"fa fa-caret-down\" aria-hidden=\"true\"></i>
</a>
<ul class=\"dropdown-menu dropdown-user\">
<li>Дилер:
<select id=\"user-dealer\" name=\"user_dealer\"></select>
</li>
<li>Суб Дилер:
<select id=\"user-sub-dealer\" name=\"user_sub_dealer\"></select>
</li>
";
// line 81
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, 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.', 81, $this->source); })()), "user", [], "any", false, false, false, 81), "hasRole", ["ROLE_SUPER_ADMIN"], "method", false, false, false, 81)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 82
yield " <li>
<a href=\"";
// line 83
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_change_password_page");
yield "\"><i class=\"fa fa-key\"></i> Изменить пароль</a>
</li>
";
// line 85
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", false, false, false, 85) == "dev")) {
// line 86
yield " <li>
<a href=\"";
// line 87
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_run_migration");
yield "\"><i class=\"fa fa-exclamation-triangle\"></i> Run migration</a>
</li>
";
}
// line 90
yield " ";
}
// line 91
yield " <li>
<a href=\"";
// line 92
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_logout");
yield "\"><i class=\"fa fa-sign-out\"></i> Выйти</a>
</li>
</ul>
</li>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 104
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_logo(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "logo"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "logo"));
// line 105
yield " ";
$_v0 = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
// line 106
yield " <a class=\"logo\" style=\"text-align: left; padding-left: 5px; font-size: 18px;\" href=\"";
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sonata_admin_dashboard");
yield "\">
<img src=\"";
// line 107
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/core/img/favicon.png"), "html", null, true);
yield "\" alt=\"ViDi Автодинастия\">
ViDi Автодинастия
</a>
";
yield from [];
})())) ? '' : new Markup($tmp, $this->env->getCharset());
// line 105
yield Twig\Extension\CoreExtension::spaceless($_v0);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 114
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_sonata_wrapper(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_wrapper"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "sonata_wrapper"));
// line 115
yield " ";
yield from $this->yieldParentBlock("sonata_wrapper", $context, $blocks);
yield "
<script src=\"";
// line 116
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("bundles/admin/js/custom.js"), "html", null, true);
yield "\"></script>
";
// line 117
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, true, false, 117), "dealer", [], "any", true, true, false, 117) && CoreExtension::getAttribute($this->env, $this->source, 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.', 117, $this->source); })()), "user", [], "any", false, false, false, 117), "dealer", [], "any", false, false, false, 117))) {
// line 118
yield " <div class=\"modal fade\" id=\"dealerRateHeaderModal\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h4 class=\"modal-title\">Изменить курс</h4>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\">
<form>
<div class=\"form-group\">
<label for=\"dealer_rate_input\">Курс</label>
<input id=\"dealer_rate_input\" class=\"form-control\" name=\"rate\" type=\"text\" value=\"";
// line 131
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 131, $this->source); })()), "user", [], "any", false, false, false, 131), "dealer", [], "any", false, false, false, 131), "rate", [], "any", false, false, false, 131), "html", null, true);
yield "\">
<input type=\"hidden\" name=\"dealer\" value=\"";
// line 132
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 132, $this->source); })()), "user", [], "any", false, false, false, 132), "dealer", [], "any", false, false, false, 132), "id", [], "any", false, false, false, 132), "html", null, true);
yield "\">
</div>
<div class=\"form-group\">
<label for=\"dealer_rate_input\">Курс в поставке</label>
<input id=\"dealer_rate_input\" class=\"form-control\" name=\"rate_in_delivery\" type=\"text\" value=\"";
// line 136
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 136, $this->source); })()), "user", [], "any", false, false, false, 136), "dealer", [], "any", false, false, false, 136), "rateInDelivery", [], "any", false, false, false, 136), "html", null, true);
yield "\">
</div>
</form>
</div>
<div class=\"modal-footer\">
<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Отмена</button>
<button data-href=\"";
// line 142
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("dc.deaker.rate.save");
yield "\" type=\"button\" class=\"btn btn-primary jsSaveRateBtn\">Сохранить</button>
</div>
</div>
</div>
</div>
";
}
// line 148
yield "
<script>
\$(\".js-date-picker\").datepicker({
language : 'ru',
format : 'yyyy-mm-dd'
});
\$(document).ready(function () {
var select = \$(\"#user-dealer\");
var selectSubDealer = \$(\"#user-sub-dealer\");
var changeDealerList = ";
// line 157
yield json_encode(CoreExtension::getAttribute($this->env, $this->source, 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.', 157, $this->source); })()), "user", [], "any", false, false, false, 157), "changeDealerList", [], "any", false, false, false, 157));
yield ";
";
// line 159
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["app"] ?? null), "user", [], "any", false, true, false, 159), "dealer", [], "any", true, true, false, 159) && CoreExtension::getAttribute($this->env, $this->source, 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.', 159, $this->source); })()), "user", [], "any", false, false, false, 159), "dealer", [], "any", false, false, false, 159))) {
// line 160
yield " \$.ajax({
url: '";
// line 161
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("core.user_get_dealers");
yield "',
dataType: 'json',
method: 'POST',
success: function (response) {
if (response) {
if (response.dealers) {
\$.each(response.dealers, function () {
";
// line 168
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, 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.', 168, $this->source); })()), "user", [], "any", false, false, false, 168), "hasRole", ["ROLE_SUPER_ADMIN"], "method", false, false, false, 168)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 169
yield " console.log('ROLE_SUPER_ADMIN');
select.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
";
} else {
// line 172
yield " if (changeDealerList.includes(this.id)) {
select.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
}
console.log('NO ROLE_SUPER_ADMIN');
";
}
// line 177
yield " });
select.val('";
// line 179
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 179, $this->source); })()), "user", [], "any", false, false, false, 179), "dealer", [], "any", false, false, false, 179), "id", [], "any", false, false, false, 179), "html", null, true);
yield "').change();
select.on('change', function () {
\$.ajax({
url: '";
// line 182
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("core.user_set_dealer");
yield "',
data: { user_dealer: select.val() },
dataType: 'json',
method: 'POST',
success: function (response) {
if (response.success) {
location.reload();
} else {
console.log('error');
}
},
});
});
}
if (response.subDealers) {
\$.each(response.subDealers, function () {
selectSubDealer.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
});
selectSubDealer.val('";
// line 200
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, 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.', 200, $this->source); })()), "user", [], "any", false, false, false, 200), "subDealer", [], "any", false, false, false, 200)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, 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.', 200, $this->source); })()), "user", [], "any", false, false, false, 200), "subDealer", [], "any", false, false, false, 200), "id", [], "any", false, false, false, 200), "html", null, true)) : (0));
yield "').change();
selectSubDealer.on('change', function () {
\$.ajax({
url: '";
// line 203
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("core.user_set_dealer");
yield "',
data: { user_sub_dealer: selectSubDealer.val() },
dataType: 'json',
method: 'POST',
success: function (response) {
if (response.success) {
location.reload();
} else {
console.log('error');
}
},
});
});
}
}
}
});
";
}
// line 222
yield " });
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "@Admin/admin/standard_layout.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% extends '@SonataAdmin/standard_layout.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<link rel=\"icon\" href=\"{{ asset('bundles/core/img/favicon.png') }}\" type=\"image/x-icon\" />
{% endblock %}
{% block javascripts %}
{% block sonata_javascript_config %}
{% endblock %}
{% block sonata_javascript_pool %}
{% for javascript in sonata_config.getOption('javascripts', []) %}
<script src=\"{{ asset(javascript) }}\"></script>
{% endfor %}
{% endblock %}
{# localize moment #}
{% set localeForMoment = canonicalize_locale_for_moment() %}
{% if localeForMoment == 'ua'%}
<script src=\"{{ asset(
'bundles/sonatacore/vendor/moment/locale/uk.js'
) }}\"></script>
{% elseif localeForMoment %}
<script src=\"{{ asset(
'bundles/sonatacore/vendor/moment/locale/' ~
localeForMoment ~
'.js'
) }}\"></script>
{% endif %}
{# localize select2 #}
{% if sonata_config.getOption('use_select2') %}
{% set localeForSelect2 = canonicalize_locale_for_select2() %}
{% if localeForSelect2 == 'ua' %}
<script src=\"{{ asset('bundles/sonatacore/vendor/select2/select2_locale_uk.js') }}\"></script>
{% elseif localeForSelect2 %}
<script src=\"{{ asset('bundles/sonatacore/vendor/select2/select2_locale_' ~ localeForSelect2 ~ '.js') }}\"></script>
{% endif %}
{% endif %}
{% endblock %}
{% block sonata_top_nav_menu %}
{% if app.user and is_granted('ROLE_ADMIN') %}
<div class=\"navbar-custom-menu\">
<ul class=\"nav navbar-nav\">
{% block sonata_top_nav_menu_add_block %}
<li class=\"dropdown\">
</li>
{% endblock %}
{% if app.user.dealer is defined and app.user.dealer %}
<li class=\"dropdown\">
<div style=\"padding-top: 5px; padding-right: 15px\">
Дилер: <b>{{ app.user.dealer.name }}</b><br>
{% if app.user.subDealer %}
Суб дилер: <b>{{ app.user.subDealer.name }}</b><br>
{% endif %}
<a style=\"cursor: pointer\" class=\"jsEditDealerRate\">
Текущий курс <b>{{ app.user.dealer.rate }}</b> / Курс в поставке <b>{{ app.user.dealer.rateInDelivery }}</b>
</a>
</div>
</li>
{% endif %}
{% block sonata_top_nav_menu_user_block %}
<li class=\"dropdown user-menu\">
<a class=\"dropdown-toggle\" data-toggle=\"dropdown\" href=\"#\">
<i class=\"fa fa-user fa-fw\" aria-hidden=\"true\"></i>
{{ app.user.fullname }}
<i class=\"fa fa-caret-down\" aria-hidden=\"true\"></i>
</a>
<ul class=\"dropdown-menu dropdown-user\">
<li>Дилер:
<select id=\"user-dealer\" name=\"user_dealer\"></select>
</li>
<li>Суб Дилер:
<select id=\"user-sub-dealer\" name=\"user_sub_dealer\"></select>
</li>
{% if app.user.hasRole('ROLE_SUPER_ADMIN') %}
<li>
<a href=\"{{ path('admin_change_password_page') }}\"><i class=\"fa fa-key\"></i> Изменить пароль</a>
</li>
{% if app.environment == 'dev' %}
<li>
<a href=\"{{ path('admin_run_migration') }}\"><i class=\"fa fa-exclamation-triangle\"></i> Run migration</a>
</li>
{% endif %}
{% endif %}
<li>
<a href=\"{{ path('admin_logout') }}\"><i class=\"fa fa-sign-out\"></i> Выйти</a>
</li>
</ul>
</li>
{% endblock %}
</ul>
</div>
{% endif %}
{% endblock %}
{% block logo %}
{% apply spaceless %}
<a class=\"logo\" style=\"text-align: left; padding-left: 5px; font-size: 18px;\" href=\"{{ path('sonata_admin_dashboard') }}\">
<img src=\"{{ asset('bundles/core/img/favicon.png') }}\" alt=\"ViDi Автодинастия\">
ViDi Автодинастия
</a>
{% endapply %}
{% endblock %}
{% block sonata_wrapper %}
{{ parent() }}
<script src=\"{{ asset('bundles/admin/js/custom.js') }}\"></script>
{% if app.user.dealer is defined and app.user.dealer %}
<div class=\"modal fade\" id=\"dealerRateHeaderModal\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">
<div class=\"modal-dialog\" role=\"document\">
<div class=\"modal-content\">
<div class=\"modal-header\">
<h4 class=\"modal-title\">Изменить курс</h4>
<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">
<span aria-hidden=\"true\">×</span>
</button>
</div>
<div class=\"modal-body\">
<form>
<div class=\"form-group\">
<label for=\"dealer_rate_input\">Курс</label>
<input id=\"dealer_rate_input\" class=\"form-control\" name=\"rate\" type=\"text\" value=\"{{ app.user.dealer.rate }}\">
<input type=\"hidden\" name=\"dealer\" value=\"{{ app.user.dealer.id }}\">
</div>
<div class=\"form-group\">
<label for=\"dealer_rate_input\">Курс в поставке</label>
<input id=\"dealer_rate_input\" class=\"form-control\" name=\"rate_in_delivery\" type=\"text\" value=\"{{ app.user.dealer.rateInDelivery }}\">
</div>
</form>
</div>
<div class=\"modal-footer\">
<button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">Отмена</button>
<button data-href=\"{{ path('dc.deaker.rate.save') }}\" type=\"button\" class=\"btn btn-primary jsSaveRateBtn\">Сохранить</button>
</div>
</div>
</div>
</div>
{% endif %}
<script>
\$(\".js-date-picker\").datepicker({
language : 'ru',
format : 'yyyy-mm-dd'
});
\$(document).ready(function () {
var select = \$(\"#user-dealer\");
var selectSubDealer = \$(\"#user-sub-dealer\");
var changeDealerList = {{ app.user.changeDealerList|json_encode|raw }};
{% if app.user.dealer is defined and app.user.dealer %}
\$.ajax({
url: '{{ path('core.user_get_dealers') }}',
dataType: 'json',
method: 'POST',
success: function (response) {
if (response) {
if (response.dealers) {
\$.each(response.dealers, function () {
{% if app.user.hasRole('ROLE_SUPER_ADMIN') %}
console.log('ROLE_SUPER_ADMIN');
select.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
{% else %}
if (changeDealerList.includes(this.id)) {
select.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
}
console.log('NO ROLE_SUPER_ADMIN');
{% endif %}
});
select.val('{{ app.user.dealer.id }}').change();
select.on('change', function () {
\$.ajax({
url: '{{ path('core.user_set_dealer') }}',
data: { user_dealer: select.val() },
dataType: 'json',
method: 'POST',
success: function (response) {
if (response.success) {
location.reload();
} else {
console.log('error');
}
},
});
});
}
if (response.subDealers) {
\$.each(response.subDealers, function () {
selectSubDealer.append('<option value=\"' + this.id + '\">' + this.name + '</option>');
});
selectSubDealer.val('{{ app.user.subDealer ? app.user.subDealer.id : 0 }}').change();
selectSubDealer.on('change', function () {
\$.ajax({
url: '{{ path('core.user_set_dealer') }}',
data: { user_sub_dealer: selectSubDealer.val() },
dataType: 'json',
method: 'POST',
success: function (response) {
if (response.success) {
location.reload();
} else {
console.log('error');
}
},
});
});
}
}
}
});
{% endif %}
});
</script>
{% endblock sonata_wrapper %}
", "@Admin/admin/standard_layout.html.twig", "/var/www/vidi.ua/releases/251023-65bd7d10/src/AdminBundle/Resources/views/admin/standard_layout.html.twig");
}
}