<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* base.html.twig */
class __TwigTemplate_34244db6dbe11d8b4ff1540d4bbb784f extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'title' => [$this, 'block_title'],
'stylesheets' => [$this, 'block_stylesheets'],
'bodyclass' => [$this, 'block_bodyclass'],
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$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", "base.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "base.html.twig"));
// line 1
echo "<!DOCTYPE html>
<html>
<head>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
<title>";
// line 6
$this->displayBlock('title', $context, $blocks);
echo "</title>
";
// line 7
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->getWebpackCssFiles("app"));
foreach ($context['_seq'] as $context["_key"] => $context["css_file"]) {
// line 8
echo " <link rel=\"stylesheet\" href=\"";
echo twig_escape_filter($this->env, $context["css_file"], "html", null, true);
echo "?v=5.1\"/>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['css_file'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 10
echo "
<link rel=\"manifest\" href=\"/manifest.json\">
<link rel=\"mask-icon\" href=\"";
// line 12
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/safari-pinned-tab.svg"), "html", null, true);
echo "\" color=\"#1b6690\">
<link rel=\"icon\" href=\"";
// line 13
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("assets/images/core-logo-min.png"), "html", null, true);
echo "\" type=\"image/png\">
<meta name=\"msapplication-TileColor\" content=\"#2d89ef\">
<meta name=\"msapplication-config\" content=\"";
// line 15
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/browserconfig.xml"), "html", null, true);
echo "\">
<meta name=\"theme-color\" content=\"#2d89ef\">
";
// line 18
$this->displayBlock('stylesheets', $context, $blocks);
// line 71
echo "</head>
<body class=\"";
// line 72
$this->displayBlock('bodyclass', $context, $blocks);
echo "\">
<!-- @TOC -->
<!-- =================================================== -->
<!--
+ @Page Loader
+ @App Content
- #Left Sidebar
> \$Sidebar Header
> \$Sidebar Menu
- #Main
> \$Topbar
> \$App Screen Content
-->
<!-- @Page Loader -->
<!-- =================================================== -->
";
// line 89
if ((twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 89, $this->source); })()), "environment", [], "any", false, false, false, 89) != "dev")) {
// line 90
echo " <div id='loader'>
<div class=\"spinner\"></div>
</div>
";
}
// line 94
echo "
<!-- @App Content -->
<!-- =================================================== -->
";
// line 98
echo "
<div class=\"";
// line 99
if ((($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_GUARDIAN") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_TEACHER")) || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_CHILD"))) {
echo "version_2";
}
echo "\">
<!-- ### Left side bar menu ### -->
";
// line 102
echo twig_include($this->env, $context, "menu_components/side_menu/left_sidebar_menu_v2.html.twig");
echo "
<!-- #Main ============================ -->
";
// line 104
if ( !twig_test_empty($this->env->getRuntime('App\Twig\NotificationExtensionRuntime')->getInfoLines())) {
// line 105
echo " ";
$context["infoLine"] = twig_first($this->env, $this->env->getRuntime('App\Twig\NotificationExtensionRuntime')->getInfoLines());
// line 106
echo " ";
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_TEACHER") && (twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 106, $this->source); })()), "user", [], "any", false, false, false, 106), "id", [], "any", false, false, false, 106) == 517))) {
// line 107
echo "
";
} else {
// line 109
echo " <div class=\"wrapperrunngline\">
<div class=\"marquee\">
";
// line 111
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(range(0, 20));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 112
echo " <a target=\"_blank\"
href=\"";
// line 113
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["infoLine"]) || array_key_exists("infoLine", $context) ? $context["infoLine"] : (function () { throw new RuntimeError('Variable "infoLine" does not exist.', 113, $this->source); })()), "link", [], "any", false, false, false, 113), "html", null, true);
echo "\">
<img src=\"http://corepetitus.lt/wp-content/uploads/2024/10/favicon.svg\" alt=\"corepetitus\">
";
// line 115
echo twig_replace_filter(twig_get_attribute($this->env, $this->source, (isset($context["infoLine"]) || array_key_exists("infoLine", $context) ? $context["infoLine"] : (function () { throw new RuntimeError('Variable "infoLine" does not exist.', 115, $this->source); })()), "description", [], "any", false, false, false, 115), [" " => " "]);
echo "
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 118
echo " </div>
</div>
";
}
// line 121
echo "
";
}
// line 123
echo "
<div class=\"page-container\">
<!-- ### \$Topbar ### -->
";
// line 127
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("IS_IMPERSONATOR")) {
// line 128
echo " <div class=\"peer\" style=\"bottom: 0;z-index: 10000;position: fixed;\">
<a class=\"btn btn-success\" href=\"";
// line 129
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->getImpersonateExitPath($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("dashboard")), "html", null, true);
echo "\">Grįžti į savo
sesiją</a>
</div>
";
}
// line 133
echo "
";
// line 136
echo twig_include($this->env, $context, "menu_components/header_nav_bar/header_nav_bar_new.html.twig");
echo "
<!-- ### \$MainBody ### -->
";
// line 139
$this->displayBlock('body', $context, $blocks);
// line 142
echo " ";
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_TEACHER") && ( !array_key_exists("survey_data", $context) || twig_test_empty((isset($context["survey_data"]) || array_key_exists("survey_data", $context) ? $context["survey_data"] : (function () { throw new RuntimeError('Variable "survey_data" does not exist.', 142, $this->source); })()))))) {
// line 143
echo " ";
$context["firstLessonSurveyData"] = $this->env->getRuntime('App\Twig\NotificationExtensionRuntime')->getTeacherFirstLessonSurveyData();
// line 144
echo " ";
if ( !twig_test_empty((isset($context["firstLessonSurveyData"]) || array_key_exists("firstLessonSurveyData", $context) ? $context["firstLessonSurveyData"] : (function () { throw new RuntimeError('Variable "firstLessonSurveyData" does not exist.', 144, $this->source); })()))) {
// line 145
echo " ";
$this->loadTemplate("me/teacher/me_teacher_after_first_lesson_modal.html.twig", "base.html.twig", 145)->display(twig_array_merge($context, ["survey_data" => (isset($context["firstLessonSurveyData"]) || array_key_exists("firstLessonSurveyData", $context) ? $context["firstLessonSurveyData"] : (function () { throw new RuntimeError('Variable "firstLessonSurveyData" does not exist.', 145, $this->source); })())]));
// line 146
echo " ";
}
// line 147
echo " ";
if ((array_key_exists("show_preference_modal", $context) && (isset($context["show_preference_modal"]) || array_key_exists("show_preference_modal", $context) ? $context["show_preference_modal"] : (function () { throw new RuntimeError('Variable "show_preference_modal" does not exist.', 147, $this->source); })()))) {
// line 148
echo " ";
$this->loadTemplate("me/teacher/me_teacher_auto_preferences_modal.html.twig", "base.html.twig", 148)->display($context);
// line 149
echo " ";
}
// line 150
echo " ";
}
// line 151
echo "
";
// line 152
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_TEACHER")) {
// line 153
echo " ";
if (((null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 153, $this->source); })()), "user", [], "any", false, false, false, 153), "qrCode", [], "any", false, false, false, 153)) || (null === twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 153, $this->source); })()), "user", [], "any", false, false, false, 153), "qrCode", [], "any", false, false, false, 153), "documentPath", [], "any", false, false, false, 153)))) {
// line 154
echo " ";
$this->loadTemplate("/me/teacher/me_teacher_missing_qr_code_modal.html.twig", "base.html.twig", 154)->display($context);
// line 155
echo " ";
}
// line 156
echo " ";
$context["lastLessonSurveyData"] = $this->env->getRuntime('App\Twig\NotificationExtensionRuntime')->getTeacherLastLessonSurveyData();
// line 157
echo " ";
if ( !twig_test_empty((isset($context["lastLessonSurveyData"]) || array_key_exists("lastLessonSurveyData", $context) ? $context["lastLessonSurveyData"] : (function () { throw new RuntimeError('Variable "lastLessonSurveyData" does not exist.', 157, $this->source); })()))) {
// line 158
echo " ";
$this->loadTemplate("me/teacher/me_teacher_after_last_lesson_modal.html.twig", "base.html.twig", 158)->display(twig_array_merge($context, ["survey_data" => (isset($context["lastLessonSurveyData"]) || array_key_exists("lastLessonSurveyData", $context) ? $context["lastLessonSurveyData"] : (function () { throw new RuntimeError('Variable "lastLessonSurveyData" does not exist.', 158, $this->source); })())]));
// line 159
echo " ";
}
// line 160
echo " ";
}
// line 161
echo "
";
// line 162
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) {
// line 163
echo " ";
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\BugReport\\BugReportController::form"));
// line 165
echo "
";
}
// line 167
echo " <!-- ### \$App Screen Footer ### -->
<footer style=\"background: #FFF\" class=\"bdT ta-c p-30 lh-0 fsz-sm c-grey-600\">
<span>2026 Copyright © COREPETITUS.LT</span>
</footer>
</div>
</div>
";
// line 173
$context["allowed_ips"] = [0 => "84.15.151.106", 1 => "83.181.124.158", 2 => "78.56.131.247"];
// line 174
echo "
";
// line 175
if ((($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_GUARDIAN") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_TEACHER")) || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_CHILD"))) {
// line 176
echo " ";
echo twig_include($this->env, $context, "me/chat_widget.html.twig");
echo "
";
}
// line 178
echo "
<script>
(function () {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/assets/service-worker.js');
}
})();
window.addEventListener('load', function () {
const loader = document.getElementById('loader');
if (loader) {
setTimeout(function () {
loader.classList.add('fadeOut');
}, 300);
}
});
</script>
";
// line 195
$this->displayBlock('javascripts', $context, $blocks);
// line 423
echo "
</body>
</html>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 6
public function block_title($context, array $blocks = [])
{
$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", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo "Corepetitus";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 18
public function block_stylesheets($context, array $blocks = [])
{
$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 19
echo " <style>
#loader {
transition: all 0.3s ease-in-out;
opacity: 1;
visibility: visible;
position: fixed;
height: 100vh;
width: 100%;
background: #fff;
z-index: 90000;
}
#loader.fadeOut {
opacity: 0;
visibility: hidden;
}
.spinner {
width: 40px;
height: 40px;
position: absolute;
top: calc(50% - 20px);
left: calc(50% - 20px);
background-color: #333;
border-radius: 100%;
-webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
animation: sk-scaleout 1.0s infinite ease-in-out;
}
@-webkit-keyframes sk-scaleout {
0% {
-webkit-transform: scale(0)
}
100% {
-webkit-transform: scale(1.0);
opacity: 0;
}
}
@keyframes sk-scaleout {
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
100% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
opacity: 0;
}
}
</style>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 72
public function block_bodyclass($context, array $blocks = [])
{
$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", "bodyclass"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyclass"));
echo "app";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 139
public function block_body($context, array $blocks = [])
{
$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", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 140
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 195
public function block_javascripts($context, array $blocks = [])
{
$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 198
echo "
";
// line 199
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->getWebpackJsFiles("app"));
foreach ($context['_seq'] as $context["_key"] => $context["js_file"]) {
// line 200
echo " ";
$context["src"] = twig_replace_filter($context["js_file"], ["<script src=\"" => "", "\"></script>" => ""]);
// line 201
echo " <script src=\"";
echo twig_escape_filter($this->env, (isset($context["src"]) || array_key_exists("src", $context) ? $context["src"] : (function () { throw new RuntimeError('Variable "src" does not exist.', 201, $this->source); })()), "html", null, true);
echo "?v=3\"></script>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['js_file'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 203
echo "
";
// line 204
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_GUARDIAN") || $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_TEACHER"))) {
// line 205
echo " <script>
const unreadNotifs = ";
// line 206
echo twig_escape_filter($this->env, $this->env->getRuntime('App\Twig\NotificationExtensionRuntime')->getUserNotificationCount(), "html", null, true);
echo ";
if (unreadNotifs > 0 && !getCookie('ceNModal') && !window.location.href.includes('notifications')) {
Swal.fire({
html: `
<div class='card blue'>
<div class='card-body'>
<div class=\"icon\">
<i style=\"font-size: 24px;
margin-bottom: 15px;\" class=\"fa-solid fa-bell\"></i>
</div>Svarbu! turi \${unreadNotifs} neperskaitytus pranešimus!</div>
</div>`,
showCancelButton: true,
confirmButtonColor: \"#1AB2FE\",
cancelButtonColor: \"#d33\",
confirmButtonText: \"Peržiūrėti\",
cancelButtonText: \"Priminti vėliau\",
customClass: {
container: \"version_2\",
icon: 'border-0'
}
}).then((result) => {
if (result.isConfirmed) {
setCookie('ceNModal', true, 30);
window.location = `";
// line 229
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_me_notification_index");
echo "`;
} else {
setCookie('ceNModal', true, 30);
}
})
}
</script>
";
}
// line 237
echo "\t";
if (($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_TEACHER") && $this->extensions['App\Twig\TeacherHasLessonsExtension']->teacherHasLessonsToday())) {
// line 238
echo " <script>
(function () {
const storageKey = 'teacherLessonReviewReminder';
function getNextResetAt8AM() {
const now = new Date();
const reset = new Date(now);
reset.setHours(8, 0, 0, 0);
if (now.getTime() >= reset.getTime()) {
reset.setDate(reset.getDate() + 1);
}
return reset.getTime();
}
const storedUntil = parseInt(localStorage.getItem(storageKey) || '0', 10);
if (Date.now() < storedUntil) {
return;
}
localStorage.setItem(storageKey, String(getNextResetAt8AM()));
Swal.fire({
title: 'Primename',
customClass: \"version_2\",
html:`
<div class='card blue'>
<div class='card-body'>
<div class=\"icon\">
<i style=\"font-size: 24px;
margin-bottom: 15px;\" class=\"fa-solid fa-bell\"></i>
</div>Mokiniai jus vertina po kiekvienos pamokos.</div>
</div>
`,
confirmButtonText: 'Ok',
});
})();
</script>
";
}
// line 275
echo "\t
\t";
// line 276
if ($this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_CHILD")) {
// line 277
echo " ";
$context["childLessonReminder"] = $this->extensions['App\Twig\ChildLessonReminderExtension']->getChildClosestLessonReminder();
// line 278
echo "
";
// line 279
if ((isset($context["childLessonReminder"]) || array_key_exists("childLessonReminder", $context) ? $context["childLessonReminder"] : (function () { throw new RuntimeError('Variable "childLessonReminder" does not exist.', 279, $this->source); })())) {
// line 280
echo " ";
ob_start();
echo "
";
// line 281
$this->loadTemplate("child_lesson_review/_review_modal_content.html.twig", "base.html.twig", 281)->display(twig_array_merge($context, ["lesson" => (isset($context["childLessonReminder"]) || array_key_exists("childLessonReminder", $context) ? $context["childLessonReminder"] : (function () { throw new RuntimeError('Variable "childLessonReminder" does not exist.', 281, $this->source); })())]));
// line 282
echo " ";
$context["childLessonReviewModalHtml"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
// line 283
echo " <script>
(function () {
const lesson = ";
// line 285
echo json_encode((isset($context["childLessonReminder"]) || array_key_exists("childLessonReminder", $context) ? $context["childLessonReminder"] : (function () { throw new RuntimeError('Variable "childLessonReminder" does not exist.', 285, $this->source); })()));
echo ";
const submitUrl = '";
// line 286
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_child_lesson_review_submit");
echo "';
const dismissUrl = '";
// line 287
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_child_lesson_review_dismiss");
echo "';
const originalTitle = document.title;
const alertTitle = '(1) Corepetitus įvertinimas';
let titleFlashTimer = null;
function startTitleFlash() {
if (titleFlashTimer) {
return;
}
let showAlert = false;
titleFlashTimer = setInterval(() => {
document.title = showAlert ? originalTitle : alertTitle;
showAlert = !showAlert;
}, 1000);
}
function stopTitleFlash() {
if (titleFlashTimer) {
clearInterval(titleFlashTimer);
titleFlashTimer = null;
}
document.title = originalTitle;
}
const now = Date.now();
const triggerAt = new Date(lesson.triggerAt).getTime();
const forceUntil = lesson.forceUntil ? new Date(lesson.forceUntil).getTime() : null;
if (forceUntil !== null && now >= forceUntil) {
return;
}
const fire = () => {
if (forceUntil !== null && Date.now() >= forceUntil) {
return;
}
startTitleFlash();
if (forceUntil !== null && forceUntil > Date.now()) {
setTimeout(stopTitleFlash, forceUntil - Date.now());
}
let selectedRating = null;
Swal.fire({
title: 'Įvertink pamoką',
customClass: { popup: 'version_2 child-lesson-review-swal' },
html: ";
// line 334
echo json_encode((isset($context["childLessonReviewModalHtml"]) || array_key_exists("childLessonReviewModalHtml", $context) ? $context["childLessonReviewModalHtml"] : (function () { throw new RuntimeError('Variable "childLessonReviewModalHtml" does not exist.', 334, $this->source); })()));
echo ",
confirmButtonText: 'Pateikti',
confirmButtonColor: '#1AB2FE',
showCancelButton: false,
showCloseButton: true,
allowOutsideClick: false,
allowEscapeKey: false,
focusConfirm: false,
didOpen: () => {
document.querySelectorAll('.child-lesson-review-rating').forEach((btn) => {
btn.addEventListener('click', () => {
document.querySelectorAll('.child-lesson-review-rating').forEach((b) => b.classList.remove('is-selected'));
btn.classList.add('is-selected');
selectedRating = parseInt(btn.dataset.rating, 10);
});
});
},
preConfirm: () => {
if (!selectedRating) {
Swal.showValidationMessage('Pasirink įvertinimą');
return false;
}
const commentEl = document.getElementById('child-lesson-review-comment');
return {
rating: selectedRating,
comment: commentEl ? commentEl.value.trim() : '',
};
},
}).then(async (result) => {
if (result.dismiss) {
stopTitleFlash();
await fetch(dismissUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ lessonId: lesson.lessonId }),
});
window.location.reload();
return;
}
if (!result.isConfirmed || !result.value) {
return;
}
try {
const response = await fetch(submitUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
lessonId: lesson.lessonId,
rating: result.value.rating,
comment: result.value.comment,
}),
});
const data = await response.json();
if (!response.ok) {
throw new Error(data.message || 'Nepavyko išsaugoti');
}
stopTitleFlash();
await Swal.fire({
icon: 'success',
title: 'Ačiū!',
text: 'Jūsų atsiliepimas išsaugotas.',
confirmButtonText: 'Ok',
customClass: { popup: 'version_2' },
});
window.location.reload();
} catch (error) {
Swal.fire({
icon: 'error',
title: 'Klaida',
text: error.message || 'Nepavyko išsaugoti',
confirmButtonText: 'Ok',
customClass: { popup: 'version_2' },
});
}
});
};
if (now >= triggerAt) {
fire();
} else {
setTimeout(fire, triggerAt - now);
}
})();
</script>
";
}
// line 421
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "base.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 766 => 421, 676 => 334, 626 => 287, 622 => 286, 618 => 285, 614 => 283, 611 => 282, 609 => 281, 604 => 280, 602 => 279, 599 => 278, 596 => 277, 594 => 276, 591 => 275, 552 => 238, 549 => 237, 538 => 229, 512 => 206, 509 => 205, 507 => 204, 504 => 203, 495 => 201, 492 => 200, 488 => 199, 485 => 198, 475 => 195, 464 => 140, 454 => 139, 435 => 72, 374 => 19, 364 => 18, 345 => 6, 332 => 423, 330 => 195, 311 => 178, 305 => 176, 303 => 175, 300 => 174, 298 => 173, 290 => 167, 286 => 165, 283 => 163, 281 => 162, 278 => 161, 275 => 160, 272 => 159, 269 => 158, 266 => 157, 263 => 156, 260 => 155, 257 => 154, 254 => 153, 252 => 152, 249 => 151, 246 => 150, 243 => 149, 240 => 148, 237 => 147, 234 => 146, 231 => 145, 228 => 144, 225 => 143, 222 => 142, 220 => 139, 214 => 136, 209 => 133, 202 => 129, 199 => 128, 197 => 127, 191 => 123, 187 => 121, 182 => 118, 173 => 115, 168 => 113, 165 => 112, 161 => 111, 157 => 109, 153 => 107, 150 => 106, 147 => 105, 145 => 104, 140 => 102, 132 => 99, 129 => 98, 124 => 94, 118 => 90, 116 => 89, 96 => 72, 93 => 71, 91 => 18, 85 => 15, 80 => 13, 76 => 12, 72 => 10, 63 => 8, 59 => 7, 55 => 6, 48 => 1,);
}
public function getSourceContext()
{
return new Source("<!DOCTYPE html>
<html>
<head>
<meta charset=\"UTF-8\">
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">
<title>{% block title %}Corepetitus{% endblock %}</title>
{% for css_file in encore_entry_css_files('app') %}
<link rel=\"stylesheet\" href=\"{{ css_file }}?v=5.1\"/>
{% endfor %}
<link rel=\"manifest\" href=\"/manifest.json\">
<link rel=\"mask-icon\" href=\"{{ asset('assets/images/safari-pinned-tab.svg') }}\" color=\"#1b6690\">
<link rel=\"icon\" href=\"{{ asset('assets/images/core-logo-min.png') }}\" type=\"image/png\">
<meta name=\"msapplication-TileColor\" content=\"#2d89ef\">
<meta name=\"msapplication-config\" content=\"{{ asset('/browserconfig.xml') }}\">
<meta name=\"theme-color\" content=\"#2d89ef\">
{% block stylesheets %}
<style>
#loader {
transition: all 0.3s ease-in-out;
opacity: 1;
visibility: visible;
position: fixed;
height: 100vh;
width: 100%;
background: #fff;
z-index: 90000;
}
#loader.fadeOut {
opacity: 0;
visibility: hidden;
}
.spinner {
width: 40px;
height: 40px;
position: absolute;
top: calc(50% - 20px);
left: calc(50% - 20px);
background-color: #333;
border-radius: 100%;
-webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
animation: sk-scaleout 1.0s infinite ease-in-out;
}
@-webkit-keyframes sk-scaleout {
0% {
-webkit-transform: scale(0)
}
100% {
-webkit-transform: scale(1.0);
opacity: 0;
}
}
@keyframes sk-scaleout {
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
100% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
opacity: 0;
}
}
</style>
{% endblock %}
</head>
<body class=\"{% block bodyclass %}app{% endblock %}\">
<!-- @TOC -->
<!-- =================================================== -->
<!--
+ @Page Loader
+ @App Content
- #Left Sidebar
> \$Sidebar Header
> \$Sidebar Menu
- #Main
> \$Topbar
> \$App Screen Content
-->
<!-- @Page Loader -->
<!-- =================================================== -->
{% if app.environment != 'dev' %}
<div id='loader'>
<div class=\"spinner\"></div>
</div>
{% endif %}
<!-- @App Content -->
<!-- =================================================== -->
{# <div class=\"{{ app.request.attributes.get('_route') }}\"> #}
<div class=\"{% if is_granted('ROLE_GUARDIAN') or is_granted('ROLE_TEACHER') or is_granted('ROLE_CHILD') %}version_2{% endif %}\">
<!-- ### Left side bar menu ### -->
{{ include('menu_components/side_menu/left_sidebar_menu_v2.html.twig') }}
<!-- #Main ============================ -->
{% if getInfoLines() is not empty %}
{% set infoLine = getInfoLines()|first %}
{% if is_granted('ROLE_TEACHER') and app.user.id == 517%}
{% else %}
<div class=\"wrapperrunngline\">
<div class=\"marquee\">
{% for i in 0..20 %}
<a target=\"_blank\"
href=\"{{ infoLine.link }}\">
<img src=\"http://corepetitus.lt/wp-content/uploads/2024/10/favicon.svg\" alt=\"corepetitus\">
{{ infoLine.description|replace({\" \": \" \"})|raw }}
</a>
{% endfor %}
</div>
</div>
{% endif %}
{% endif %}
<div class=\"page-container\">
<!-- ### \$Topbar ### -->
{% if is_granted('IS_IMPERSONATOR') %}
<div class=\"peer\" style=\"bottom: 0;z-index: 10000;position: fixed;\">
<a class=\"btn btn-success\" href=\"{{ impersonation_exit_path(path('dashboard') ) }}\">Grįžti į savo
sesiją</a>
</div>
{% endif %}
{{ include('menu_components/header_nav_bar/header_nav_bar_new.html.twig') }}
<!-- ### \$MainBody ### -->
{% block body %}
{% endblock %}
{% if is_granted(\"ROLE_TEACHER\") and (survey_data is not defined or survey_data is empty) %}
{% set firstLessonSurveyData = getTeacherFirstLessonSurveyData() %}
{% if firstLessonSurveyData is not empty %}
{% include 'me/teacher/me_teacher_after_first_lesson_modal.html.twig' with {survey_data:firstLessonSurveyData} %}
{% endif %}
{% if show_preference_modal is defined and show_preference_modal %}
{% include 'me/teacher/me_teacher_auto_preferences_modal.html.twig'%}
{% endif %}
{% endif %}
{% if is_granted('ROLE_TEACHER') %}
{% if app.user.qrCode is null or app.user.qrCode.documentPath is null %}
{% include '/me/teacher/me_teacher_missing_qr_code_modal.html.twig' %}
{% endif %}
{% set lastLessonSurveyData = getTeacherLastLessonSurveyData() %}
{% if lastLessonSurveyData is not empty %}
{% include 'me/teacher/me_teacher_after_last_lesson_modal.html.twig' with {survey_data:lastLessonSurveyData} %}
{% endif %}
{% endif %}
{% if is_granted(\"ROLE_ADMIN\") %}
{{ render(controller(
'App\\\\Controller\\\\BugReport\\\\BugReportController::form'
)) }}
{% endif %}
<!-- ### \$App Screen Footer ### -->
<footer style=\"background: #FFF\" class=\"bdT ta-c p-30 lh-0 fsz-sm c-grey-600\">
<span>2026 Copyright © COREPETITUS.LT</span>
</footer>
</div>
</div>
{% set allowed_ips = ['84.15.151.106', '83.181.124.158', '78.56.131.247'] %}
{% if is_granted('ROLE_GUARDIAN') or is_granted('ROLE_TEACHER') or is_granted('ROLE_CHILD') %}
{{ include('me/chat_widget.html.twig') }}
{% endif %}
<script>
(function () {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/assets/service-worker.js');
}
})();
window.addEventListener('load', function () {
const loader = document.getElementById('loader');
if (loader) {
setTimeout(function () {
loader.classList.add('fadeOut');
}, 300);
}
});
</script>
{% block javascripts %}
{# <script src=\"{{ asset('assets/runtime.js') }}?v=v3\"></script>#}
{# <script src=\"{{ asset('assets/app.js') }}?v=v3\"></script>#}
{% for js_file in encore_entry_js_files('app') %}
{% set src = js_file|replace({'<script src=\"': '', '\"></script>': ''}) %}
<script src=\"{{ src }}?v=3\"></script>
{% endfor %}
{% if is_granted('ROLE_GUARDIAN') or is_granted('ROLE_TEACHER') %}
<script>
const unreadNotifs = {{ getUserNotificationCount() }};
if (unreadNotifs > 0 && !getCookie('ceNModal') && !window.location.href.includes('notifications')) {
Swal.fire({
html: `
<div class='card blue'>
<div class='card-body'>
<div class=\"icon\">
<i style=\"font-size: 24px;
margin-bottom: 15px;\" class=\"fa-solid fa-bell\"></i>
</div>Svarbu! turi \${unreadNotifs} neperskaitytus pranešimus!</div>
</div>`,
showCancelButton: true,
confirmButtonColor: \"#1AB2FE\",
cancelButtonColor: \"#d33\",
confirmButtonText: \"Peržiūrėti\",
cancelButtonText: \"Priminti vėliau\",
customClass: {
container: \"version_2\",
icon: 'border-0'
}
}).then((result) => {
if (result.isConfirmed) {
setCookie('ceNModal', true, 30);
window.location = `{{ path('app_me_notification_index') }}`;
} else {
setCookie('ceNModal', true, 30);
}
})
}
</script>
{% endif %}
\t{% if is_granted('ROLE_TEACHER') and teacherHasLessonsToday() %}
<script>
(function () {
const storageKey = 'teacherLessonReviewReminder';
function getNextResetAt8AM() {
const now = new Date();
const reset = new Date(now);
reset.setHours(8, 0, 0, 0);
if (now.getTime() >= reset.getTime()) {
reset.setDate(reset.getDate() + 1);
}
return reset.getTime();
}
const storedUntil = parseInt(localStorage.getItem(storageKey) || '0', 10);
if (Date.now() < storedUntil) {
return;
}
localStorage.setItem(storageKey, String(getNextResetAt8AM()));
Swal.fire({
title: 'Primename',
customClass: \"version_2\",
html:`
<div class='card blue'>
<div class='card-body'>
<div class=\"icon\">
<i style=\"font-size: 24px;
margin-bottom: 15px;\" class=\"fa-solid fa-bell\"></i>
</div>Mokiniai jus vertina po kiekvienos pamokos.</div>
</div>
`,
confirmButtonText: 'Ok',
});
})();
</script>
{% endif %}
\t
\t{% if is_granted('ROLE_CHILD') %}
{% set childLessonReminder = getChildClosestLessonReminder() %}
{% if childLessonReminder %}
{% set childLessonReviewModalHtml %}
{% include 'child_lesson_review/_review_modal_content.html.twig' with {lesson: childLessonReminder} %}
{% endset %}
<script>
(function () {
const lesson = {{ childLessonReminder|json_encode|raw }};
const submitUrl = '{{ path('app_child_lesson_review_submit') }}';
const dismissUrl = '{{ path('app_child_lesson_review_dismiss') }}';
const originalTitle = document.title;
const alertTitle = '(1) Corepetitus įvertinimas';
let titleFlashTimer = null;
function startTitleFlash() {
if (titleFlashTimer) {
return;
}
let showAlert = false;
titleFlashTimer = setInterval(() => {
document.title = showAlert ? originalTitle : alertTitle;
showAlert = !showAlert;
}, 1000);
}
function stopTitleFlash() {
if (titleFlashTimer) {
clearInterval(titleFlashTimer);
titleFlashTimer = null;
}
document.title = originalTitle;
}
const now = Date.now();
const triggerAt = new Date(lesson.triggerAt).getTime();
const forceUntil = lesson.forceUntil ? new Date(lesson.forceUntil).getTime() : null;
if (forceUntil !== null && now >= forceUntil) {
return;
}
const fire = () => {
if (forceUntil !== null && Date.now() >= forceUntil) {
return;
}
startTitleFlash();
if (forceUntil !== null && forceUntil > Date.now()) {
setTimeout(stopTitleFlash, forceUntil - Date.now());
}
let selectedRating = null;
Swal.fire({
title: 'Įvertink pamoką',
customClass: { popup: 'version_2 child-lesson-review-swal' },
html: {{ childLessonReviewModalHtml|json_encode|raw }},
confirmButtonText: 'Pateikti',
confirmButtonColor: '#1AB2FE',
showCancelButton: false,
showCloseButton: true,
allowOutsideClick: false,
allowEscapeKey: false,
focusConfirm: false,
didOpen: () => {
document.querySelectorAll('.child-lesson-review-rating').forEach((btn) => {
btn.addEventListener('click', () => {
document.querySelectorAll('.child-lesson-review-rating').forEach((b) => b.classList.remove('is-selected'));
btn.classList.add('is-selected');
selectedRating = parseInt(btn.dataset.rating, 10);
});
});
},
preConfirm: () => {
if (!selectedRating) {
Swal.showValidationMessage('Pasirink įvertinimą');
return false;
}
const commentEl = document.getElementById('child-lesson-review-comment');
return {
rating: selectedRating,
comment: commentEl ? commentEl.value.trim() : '',
};
},
}).then(async (result) => {
if (result.dismiss) {
stopTitleFlash();
await fetch(dismissUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ lessonId: lesson.lessonId }),
});
window.location.reload();
return;
}
if (!result.isConfirmed || !result.value) {
return;
}
try {
const response = await fetch(submitUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
lessonId: lesson.lessonId,
rating: result.value.rating,
comment: result.value.comment,
}),
});
const data = await response.json();
if (!response.ok) {
throw new Error(data.message || 'Nepavyko išsaugoti');
}
stopTitleFlash();
await Swal.fire({
icon: 'success',
title: 'Ačiū!',
text: 'Jūsų atsiliepimas išsaugotas.',
confirmButtonText: 'Ok',
customClass: { popup: 'version_2' },
});
window.location.reload();
} catch (error) {
Swal.fire({
icon: 'error',
title: 'Klaida',
text: error.message || 'Nepavyko išsaugoti',
confirmButtonText: 'Ok',
customClass: { popup: 'version_2' },
});
}
});
};
if (now >= triggerAt) {
fire();
} else {
setTimeout(fire, triggerAt - now);
}
})();
</script>
{% endif %}
{% endif %}
{% endblock %}
</body>
</html>
", "base.html.twig", "/var/www/project/templates/base.html.twig");
}
}