var/cache/staging/twig/8a/8af0c9e1d4f5bdbc7df7f108c0de180c.php line 169

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\MacroNamespace;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Sandbox\SecurityNotAllowedTestError;
  14. use Twig\Source;
  15. use Twig\Template;
  16. use Twig\TemplateWrapper;
  17. /* base.html.twig */
  18. class __TwigTemplate_d25062949008879923fa671b299f36cb extends Template
  19. {
  20. private Source $source;
  21. /**
  22. * @var array<string, MacroNamespace>
  23. */
  24. private array $macros = [];
  25. private \Twig\Runtime\EscaperRuntime $escaper;
  26. public function __construct(Environment $env)
  27. {
  28. parent::__construct($env);
  29. $this->source = $this->getSourceContext();
  30. $this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
  31. $this->parent = false;
  32. $this->blocks = [
  33. 'title' => [$this, 'block_title'],
  34. 'stylesheets' => [$this, 'block_stylesheets'],
  35. 'body' => [$this, 'block_body'],
  36. 'javascripts' => [$this, 'block_javascripts'],
  37. ];
  38. }
  39. protected function doDisplay(array $context, array $blocks = []): iterable
  40. {
  41. $macros = $this->macros;
  42. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  43. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "base.html.twig"));
  44. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  45. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "base.html.twig"));
  46. // line 1
  47. yield "<!DOCTYPE html>
  48. <html lang=\"fr\">
  49. <head>
  50. <meta charset=\"UTF-8\">
  51. <title>";
  52. // line 5
  53. yield from $this->unwrap()->yieldBlock('title', $context, $blocks);
  54. yield "</title>
  55. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  56. <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">
  57. <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>
  58. <link href=\"https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400;1,600;1,700;1,800;1,900&display=swap\" rel=\"stylesheet\">
  59. ";
  60. // line 10
  61. yield (string) $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("stylesheets");
  62. yield "
  63. ";
  64. // line 11
  65. yield from $this->unwrap()->yieldBlock('stylesheets', $context, $blocks);
  66. // line 12
  67. yield "</head>
  68. <body>
  69. ";
  70. // line 15
  71. $context["currentUserRoleModifier"] = null;
  72. // line 16
  73. yield "
  74. ";
  75. // line 17
  76. if ((($tmp = 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.', 17, $this->source); })()), "user", [], "any", false, false, false, 17)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  77. // line 18
  78. yield " ";
  79. if ((CoreExtension::inFilter("ROLE_ADMIN", 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.', 18, $this->source); })()), "user", [], "any", false, false, false, 18), "roles", [], "any", false, false, false, 18)) || CoreExtension::inFilter("ROLE_ADMIN_READ_ONLY", 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.', 18, $this->source); })()), "user", [], "any", false, false, false, 18), "roles", [], "any", false, false, false, 18)))) {
  80. // line 19
  81. yield " ";
  82. $context["currentUserRoleModifier"] = "is-admin";
  83. // line 20
  84. yield " ";
  85. yield from $this->load("_partials/nav/admin.html.twig", 20)->unwrap()->yield($context);
  86. // line 21
  87. yield " ";
  88. } elseif (CoreExtension::inFilter("ROLE_COMPANY", 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.', 21, $this->source); })()), "user", [], "any", false, false, false, 21), "roles", [], "any", false, false, false, 21))) {
  89. // line 22
  90. yield " ";
  91. $context["currentUserRoleModifier"] = "is-company";
  92. // line 23
  93. yield " ";
  94. yield from $this->load("_partials/nav/company.html.twig", 23)->unwrap()->yield($context);
  95. // line 24
  96. yield " ";
  97. } else {
  98. // line 25
  99. yield " ";
  100. yield from $this->load("_partials/nav/user.html.twig", 25)->unwrap()->yield($context);
  101. // line 26
  102. yield " ";
  103. }
  104. } else {
  105. // line 28
  106. yield " ";
  107. yield from $this->load("_partials/nav/main.html.twig", 28)->unwrap()->yield($context);
  108. }
  109. // line 30
  110. yield "
  111. ";
  112. // line 31
  113. if ((($tmp = 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.', 31, $this->source); })()), "user", [], "any", false, false, false, 31)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  114. // line 32
  115. yield " <div class=\"current-logged-in-user-role ";
  116. yield (string) $this->escaper->escape((isset($context["currentUserRoleModifier"]) || array_key_exists("currentUserRoleModifier", $context) ? $context["currentUserRoleModifier"] : (function () { throw new RuntimeError('Variable "currentUserRoleModifier" does not exist.', 32, $this->source); })()), "html", null, true);
  117. yield "\">
  118. Connecté en tant
  119. ";
  120. // line 34
  121. if (CoreExtension::inFilter("ROLE_ADMIN", 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.', 34, $this->source); })()), "user", [], "any", false, false, false, 34), "roles", [], "any", false, false, false, 34))) {
  122. // line 35
  123. yield " qu\x27administrateur
  124. ";
  125. } elseif (CoreExtension::inFilter("ROLE_ADMIN_READ_ONLY", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 36
  126. (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 36, $this->source); })()), "user", [], "any", false, false, false, 36), "roles", [], "any", false, false, false, 36))) {
  127. // line 37
  128. yield " qu\x27agent de la DEAL
  129. ";
  130. } elseif (CoreExtension::inFilter("ROLE_COMPANY", CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 38
  131. (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 38, $this->source); })()), "user", [], "any", false, false, false, 38), "roles", [], "any", false, false, false, 38))) {
  132. // line 39
  133. yield " qu\x27élagueur
  134. ";
  135. } else {
  136. // line 41
  137. yield " qu\x27utilisateur
  138. ";
  139. }
  140. // line 43
  141. yield " </div>
  142. ";
  143. }
  144. // line 45
  145. yield "
  146. ";
  147. // line 46
  148. yield from $this->load("_partials/message.html.twig", 46)->unwrap()->yield($context);
  149. // line 47
  150. yield "
  151. ";
  152. // line 48
  153. yield from $this->load("_partials/message-popup.html.twig", 48)->unwrap()->yield($context);
  154. // line 49
  155. yield "
  156. ";
  157. // line 50
  158. yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
  159. // line 51
  160. yield "
  161. ";
  162. // line 52
  163. yield from $this->load("_partials/footer.html.twig", 52)->unwrap()->yield($context);
  164. // line 53
  165. yield "
  166. ";
  167. // line 54
  168. yield (string) $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackScriptTags("scripts");
  169. yield "
  170. ";
  171. // line 56
  172. yield from $this->unwrap()->yieldBlock('javascripts', $context, $blocks);
  173. // line 57
  174. yield "<script>
  175. const googleApiKey = \x27";
  176. // line 58
  177. yield (string) $this->escaper->escape((isset($context["GOOGLE_API_KEY"]) || array_key_exists("GOOGLE_API_KEY", $context) ? $context["GOOGLE_API_KEY"] : (function () { throw new RuntimeError('Variable "GOOGLE_API_KEY" does not exist.', 58, $this->source); })()), "html", null, true);
  178. yield "\x27
  179. let onlyRead = false
  180. ";
  181. // line 61
  182. if (((($tmp = 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)) && $tmp instanceof Markup ? (string) $tmp : $tmp) && CoreExtension::inFilter("ROLE_ADMIN_READ_ONLY", 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), "roles", [], "any", false, false, false, 61)))) {
  183. // line 62
  184. yield " onlyRead = true
  185. ";
  186. }
  187. // line 64
  188. yield "</script>
  189. </body>
  190. </html>
  191. ";
  192. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  193. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  194. return; yield;
  195. }
  196. // line 5
  197. /**
  198. * @return iterable<null|scalar|\Stringable>
  199. */
  200. public function block_title(array $context, array $blocks = []): iterable
  201. {
  202. $macros = $this->macros;
  203. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  204. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  205. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  206. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  207. yield "Bienvenue";
  208. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  209. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  210. return; yield;
  211. }
  212. // line 11
  213. /**
  214. * @return iterable<null|scalar|\Stringable>
  215. */
  216. public function block_stylesheets(array $context, array $blocks = []): iterable
  217. {
  218. $macros = $this->macros;
  219. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  220. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  221. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  222. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
  223. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  224. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  225. return; yield;
  226. }
  227. // line 50
  228. /**
  229. * @return iterable<null|scalar|\Stringable>
  230. */
  231. public function block_body(array $context, array $blocks = []): iterable
  232. {
  233. $macros = $this->macros;
  234. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  235. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  236. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  237. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
  238. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  239. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  240. return; yield;
  241. }
  242. // line 56
  243. /**
  244. * @return iterable<null|scalar|\Stringable>
  245. */
  246. public function block_javascripts(array $context, array $blocks = []): iterable
  247. {
  248. $macros = $this->macros;
  249. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  250. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  251. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  252. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  253. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  254. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  255. return; yield;
  256. }
  257. /**
  258. * @codeCoverageIgnore
  259. */
  260. public function getTemplateName(): string
  261. {
  262. return "base.html.twig";
  263. }
  264. /**
  265. * @codeCoverageIgnore
  266. */
  267. public function isTraitable(): bool
  268. {
  269. return false;
  270. }
  271. /**
  272. * @codeCoverageIgnore
  273. */
  274. public function getDefaultEscapeStrategy(): string|false
  275. {
  276. return "html";
  277. }
  278. /**
  279. * @codeCoverageIgnore
  280. */
  281. public function getDebugInfo(): array
  282. {
  283. return array ( 282 => 56, 260 => 50, 238 => 11, 215 => 5, 201 => 64, 197 => 62, 195 => 61, 189 => 58, 186 => 57, 184 => 56, 179 => 54, 176 => 53, 174 => 52, 171 => 51, 169 => 50, 166 => 49, 164 => 48, 161 => 47, 159 => 46, 156 => 45, 152 => 43, 148 => 41, 144 => 39, 142 => 38, 139 => 37, 137 => 36, 134 => 35, 132 => 34, 126 => 32, 124 => 31, 121 => 30, 117 => 28, 113 => 26, 110 => 25, 107 => 24, 104 => 23, 101 => 22, 98 => 21, 95 => 20, 92 => 19, 89 => 18, 87 => 17, 84 => 16, 82 => 15, 77 => 12, 75 => 11, 71 => 10, 63 => 5, 57 => 1,);
  284. }
  285. public function getSourceContext(): Source
  286. {
  287. return new Source("<!DOCTYPE html>
  288. <html lang=\"fr\">
  289. <head>
  290. <meta charset=\"UTF-8\">
  291. <title>{% block title %}Bienvenue{% endblock %}</title>
  292. <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
  293. <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">
  294. <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>
  295. <link href=\"https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,400;0,600;0,700;0,800;0,900;1,400;1,600;1,700;1,800;1,900&display=swap\" rel=\"stylesheet\">
  296. {{ encore_entry_link_tags(\x27stylesheets\x27) }}
  297. {% block stylesheets %}{% endblock %}
  298. </head>
  299. <body>
  300. {% set currentUserRoleModifier = null %}
  301. {% if app.user %}
  302. {% if \x27ROLE_ADMIN\x27 in app.user.roles or \x27ROLE_ADMIN_READ_ONLY\x27 in app.user.roles %}
  303. {% set currentUserRoleModifier = \x27is-admin\x27 %}
  304. {% include(\x27_partials/nav/admin.html.twig\x27) %}
  305. {% elseif \x27ROLE_COMPANY\x27 in app.user.roles %}
  306. {% set currentUserRoleModifier = \x27is-company\x27 %}
  307. {% include(\x27_partials/nav/company.html.twig\x27) %}
  308. {% else %}
  309. {% include(\x27_partials/nav/user.html.twig\x27) %}
  310. {% endif %}
  311. {% else %}
  312. {% include(\x27_partials/nav/main.html.twig\x27) %}
  313. {% endif %}
  314. {% if app.user %}
  315. <div class=\"current-logged-in-user-role {{ currentUserRoleModifier }}\">
  316. Connecté en tant
  317. {% if \x27ROLE_ADMIN\x27 in app.user.roles %}
  318. qu\x27administrateur
  319. {% elseif \x27ROLE_ADMIN_READ_ONLY\x27 in app.user.roles %}
  320. qu\x27agent de la DEAL
  321. {% elseif \x27ROLE_COMPANY\x27 in app.user.roles %}
  322. qu\x27élagueur
  323. {% else %}
  324. qu\x27utilisateur
  325. {% endif %}
  326. </div>
  327. {% endif %}
  328. {% include \x27_partials/message.html.twig\x27 %}
  329. {% include \x27_partials/message-popup.html.twig\x27 %}
  330. {% block body %}{% endblock %}
  331. {% include(\x27_partials/footer.html.twig\x27) %}
  332. {{ encore_entry_script_tags(\x27scripts\x27) }}
  333. {% block javascripts %}{% endblock %}
  334. <script>
  335. const googleApiKey = \x27{{ GOOGLE_API_KEY }}\x27
  336. let onlyRead = false
  337. {% if app.user and \x27ROLE_ADMIN_READ_ONLY\x27 in app.user.roles %}
  338. onlyRead = true
  339. {% endif %}
  340. </script>
  341. </body>
  342. </html>
  343. ", "base.html.twig", "/home/www-dev/dev/zinvaziv.re/app/templates/base.html.twig");
  344. }
  345. }