{% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
{% set isTaskPage = app.request.attributes.get('_route') in ["ms_student_tasks", "ms_student_subtasks","ms_student_subtask","ms_student_start_task", "ms_student_task_result_of_example"] %}
{% set isTraining = app.request.attributes.get('_route') in ["ms_student_show_training", "ms_student_show_flash_card", "ms_student_start_training", "ms_student_start_training", "ms_student_task_result_of_training"] %}
{% set isColumns = app.request.attributes.get('_route') in ["ms_student_show_columns", "ms_student_start_columns", "ms_student_start_columns", "ms_student_task_result_of_columns"] %}
{% set newMessages = app_count_new_messages() %}
{% set newTasks = app_count_new_tasks() %}
{% set maxSortIdTheme = app.user.type != constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT') ? app_get_themes_tasks()|length : app.user.StudentProfile.getSortThemeId() %}
<div class="menu">
<ul>
{% if (app.user.type == constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT')) and
(app.user.studentProfile.status == constant('MentalSchool\\AppBundle\\Entity\\StudentProfile::STATUS_FULL_COURSE')) %}
<li class="{{ isTaskPage ? 'active' : '' }}">
<a href="{{- path('ms_student_tasks') -}}">
{% if(newTasks) %}
<span class="ms-count-new-messages"> {{ newTasks }} </span>
{% endif %}
{{- 'app.student.task.title'|trans({}, 'app') -}}
</a>
</li>
{% endif %}
{% if (app.user.type != constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT')) or
(app.user.studentProfile.status != constant('MentalSchool\\AppBundle\\Entity\\StudentProfile::STATUS_VACATION')) %}
<li class="{{ isTraining ? 'active' : '' }}">
<a href="{{ path("ms_student_show_training", {"template": "simple"}) }}">
{{- 'app.breadcrumbs.training_title'|trans({}, 'app') -}}
</a>
{#
<ul class="submenu">
{% for key, template in app_get_themes_tasks() %}
{% if key == 'flashcards' %}
<li><a href="{{ path("ms_student_show_training", {"template": key}) }}">
<span> {{- template|trans({}, 'app') -}}</span>
</a>
</li>
{% elseif key not in ['multiplication', 'division', 'wiles'] %}
{% if app_get_theme_uniqueId(key) <= maxSortIdTheme %}
<li><a href="{{ path("ms_student_show_training", {"template": key}) }}">
<span> {{- template|trans({}, 'app') -}}</span>
</a>
</li>
{% endif %}
{% else %}
{% if maxSortIdTheme == 21 or app_get_allowed_levels_for_student(key)|length or app.user.type != constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT') %}
<li><a href="{{ path("ms_student_show_training", {"template": key}) }}">
<span> {{- template|trans({}, 'app') -}}</span>
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
#}
</li>
{#
<li class="{{ isColumns ? 'active' : '' }}">
<a href="{{ path("ms_student_show_columns", {"template": "simple"}) }}" class="sub-button">
{{- 'app.breadcrumbs.columns'|trans({}, 'app') -}}
</a>
<ul class="submenu">
{% for key, template in app_get_themes_columns() %}
{% if key not in ['multiplication', 'division', 'wiles', 'flashcards'] %}
{% if app_get_theme_uniqueId(key) <= maxSortIdTheme %}
<li><a href="{{ path("ms_student_show_columns", {"template": key}) }}">
<span> {{- template|trans({}, 'app') -}}</span>
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
</li>
#}
{% endif %}
<li>
<span class="sub-button"> {{- 'app.mathematical_puzzles'|trans({}, 'app') -}}</span>
<ul class="submenu">
<li>
<a href="{{ path('ms_student_show_training_corner_examples') }}">
<span> {{- 'app.corner_examples.title'|trans({}, 'app') -}}</span>
</a>
</li>
<li>
<a href="{{ path('ms_student_show_training_mathematical_square') }}">
<span> {{- 'app.mathematical_square.title'|trans({}, 'app') -}}</span>
</a>
</li>
<li>
<a href="{{ path('ms_student_show_training_mathematical_pyramids') }}">
<span> {{- 'app.mathematical_pyramids.title'|trans({}, 'app') -}}</span>
</a>
</li>
<li>
<a href="{{ path('ms_student_show_training_fractions') }}">
<span> {{- 'app.fractions.title'|trans({}, 'app') -}}</span>
</a>
</li>
{% if not (app.user.school and app.user.school.id == 143) %}
<li>
<a href="{{ path('ms_student_show_training_shulte') }}">
<span>{{ 'app.shulte.title'|trans({}, 'app') }}</span>
</a>
</li>
{% endif %}
</ul>
<span class="beta"><span>Beta</span></span>
</li>
{% if (app.user.type == constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT')) %}
{% if app.user.studentProfile.status != constant('MentalSchool\\AppBundle\\Entity\\StudentProfile::STATUS_VACATION') %}
{% if app.user.studentGroup.isHideCalendarOfLessons != 1 %}
<li class="{{ (currentPath == path('ms_student_lessons')) ? 'active' : '' }}">
<a href="{{- path('ms_student_lessons') -}}">{{- 'app.breadcrumbs.lessons'|trans({}, 'app') -}}</a>
</li>
{% endif %}
{% endif %}
<li class="{{ (currentPath == path('ms_student_payment')) ? 'active' : '' }}">
<a href="{{- path('ms_student_payment') -}}">{{- 'app.breadcrumbs.payment'|trans({}, 'app') -}}</a>
</li>
{% if (app.user.studentProfile.status != constant('MentalSchool\\AppBundle\\Entity\\StudentProfile::STATUS_VACATION')) %}
<li class="{{ (currentPath == path('ms_student_rating')) ? 'active' : '' }}">
<a href="{{- path('ms_student_rating') -}}">{{- 'app.breadcrumbs.rating'|trans({}, 'app') -}}</a>
</li>
{% endif %}
{% else %}
<li class="{{ (currentPath == path('ms_student_rating')) ? 'active' : '' }}">
<a href="{{- path('ms_student_rating') -}}">{{- 'app.breadcrumbs.rating'|trans({}, 'app') -}}</a>
</li>
{% endif %}
</ul>
</div>
<div class="user-info">
{% if (app.user.type == constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT')) %}
<div class="abacoins-box wrap">
<a href="{{- path('ms_student_abacoin') -}}">
<img src="/bundles/app/image/abacoin-icon.svg">
<span>{{ app.user.abacoins }}</span>
</a>
<span class="sub-button beta"><span>Beta</span></span>
</div>
{% endif %}
<div class="wrap">
{% block user_info %}
{%- embed 'AppBundle:Student:Components/_user_info.html.twig' -%}{%- endembed -%}
{% endblock %}
</div>
</div>
<div class="abacoins-box-mobile wrap">
<a href="{{- path('ms_student_abacoin') -}}">
<img src="/bundles/app/image/abacoin-icon-mobile.svg">
<div>
<span>{{ app.user.abacoins }}</span>
<span class="sub-button beta"><span>Beta</span></span>
</div>
</a>
</div>
{% if app.user.type == constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT') %}
<div class="langs-wrap">
{# <p>{{- 'app.student.settings.language'|trans({}, 'app') -}}: </p> #}
<div class="active-lang">
{% if ("en" == app.request.locale) %}en{% endif %}
{% if ("uk" == app.request.locale) %}uk{% endif %}
{% if ("ru" == app.request.locale) %}ru{% endif %}
{% if ("he" == app.request.locale) %}he{% endif %}
{% if ("pl" == app.request.locale) %}pl{% endif %}
{% if ("ro" == app.request.locale) %}ro{% endif %}
{% if ("he" == app.request.locale) %}he{% endif %}
{% if ("tr" == app.request.locale) %}tr{% endif %}
{% if ("fr" == app.request.locale) %}fr{% endif %}
</div>
{% block lang %}
<ul class="langs-box">
<li class="{% if ("en" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/en" class="en">en</a></li>
<li class="{% if ("uk" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/uk" class="uk">uk</a></li>
<li class="{% if ("ru" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/ru" class="ru">ru</a></li>
<li class="{% if ("pl" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/pl" class="pl">pl</a></li>
<li class="{% if ("ro" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/ro" class="ro">ro</a></li>
<li class="{% if ("es" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/es" class="es">es</a></li>
<li class="{% if ("he" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/he" class="he">he</a></li>
<li class="{% if ("tr" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/tr" class="tr">tr</a></li>
<li class="{% if ("fr" == app.request.locale) %} active{% endif %}"><a
href="/{{ app.request.locale }}/student/change-language/fr" class="fr">fr</a></li>
</ul>
{% endblock %}
</div>
{% endif %}
<span class="mob-button-menu">
<span></span>
<span></span>
<span></span>
</span>
<span class="mob-close-submenu"></span>