src/MentalSchool/AppBundle/Resources/views/Student/Components/_sidebar.html.twig line 1

Open in your IDE?
  1. {% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
  2. {% 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"] %}
  3. {% 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"] %}
  4. {% 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"] %}
  5. {% set newMessages = app_count_new_messages() %}
  6. {% set newTasks = app_count_new_tasks() %}
  7. {% set maxSortIdTheme = app.user.type != constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT') ? app_get_themes_tasks()|length : app.user.StudentProfile.getSortThemeId() %}
  8. <div class="menu">
  9.     <ul>
  10.         {% if (app.user.type == constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT')) and
  11.             (app.user.studentProfile.status == constant('MentalSchool\\AppBundle\\Entity\\StudentProfile::STATUS_FULL_COURSE')) %}
  12.             <li class="{{ isTaskPage ? 'active' : '' }}">
  13.                 <a href="{{- path('ms_student_tasks') -}}">
  14.                     {% if(newTasks) %}
  15.                         <span class="ms-count-new-messages"> {{ newTasks }} </span>
  16.                     {% endif %}
  17.                     {{- 'app.student.task.title'|trans({}, 'app') -}}
  18.                 </a>
  19.             </li>
  20.         {% endif %}
  21.         {% if (app.user.type != constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT')) or
  22.             (app.user.studentProfile.status != constant('MentalSchool\\AppBundle\\Entity\\StudentProfile::STATUS_VACATION')) %}
  23.             <li class="{{ isTraining ? 'active' : '' }}">
  24.                 <a href="{{ path("ms_student_show_training", {"template": "simple"}) }}">
  25.                     {{- 'app.breadcrumbs.training_title'|trans({}, 'app') -}}
  26.                 </a>
  27.                 {#
  28.                 <ul class="submenu">
  29.                     {% for key, template in app_get_themes_tasks() %}
  30.                         {% if key == 'flashcards' %}
  31.                             <li><a href="{{ path("ms_student_show_training", {"template": key}) }}">
  32.                                     <span> {{- template|trans({}, 'app') -}}</span>
  33.                                 </a>
  34.                             </li>
  35.                         {% elseif  key not in ['multiplication', 'division', 'wiles'] %}
  36.                             {% if app_get_theme_uniqueId(key) <= maxSortIdTheme %}
  37.                                 <li><a href="{{ path("ms_student_show_training", {"template": key}) }}">
  38.                                         <span> {{- template|trans({}, 'app') -}}</span>
  39.                                     </a>
  40.                                 </li>
  41.                             {% endif %}
  42.                         {% else %}
  43.                             {% if  maxSortIdTheme == 21 or app_get_allowed_levels_for_student(key)|length or app.user.type != constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT') %}
  44.                                 <li><a href="{{ path("ms_student_show_training", {"template": key}) }}">
  45.                                         <span> {{- template|trans({}, 'app') -}}</span>
  46.                                     </a>
  47.                                 </li>
  48.                             {% endif %}
  49.                         {% endif %}
  50.                     {% endfor %}
  51.                 </ul>
  52.                 #}
  53.             </li>
  54.             {#
  55.             <li class="{{ isColumns ? 'active' : '' }}">
  56.                 <a href="{{ path("ms_student_show_columns", {"template": "simple"}) }}" class="sub-button">
  57.                     {{- 'app.breadcrumbs.columns'|trans({}, 'app') -}}
  58.                 </a>
  59.                 <ul class="submenu">
  60.                     {% for key, template in app_get_themes_columns() %}
  61.                         {% if  key not in ['multiplication', 'division', 'wiles', 'flashcards'] %}
  62.                             {% if app_get_theme_uniqueId(key) <= maxSortIdTheme %}
  63.                                 <li><a href="{{ path("ms_student_show_columns", {"template": key}) }}">
  64.                                         <span> {{- template|trans({}, 'app') -}}</span>
  65.                                     </a>
  66.                                 </li>
  67.                             {% endif %}
  68.                         {% endif %}
  69.                     {% endfor %}
  70.                 </ul>
  71.             </li>
  72.             #}
  73.         {% endif %}
  74.         <li>
  75.             <span class="sub-button"> {{- 'app.mathematical_puzzles'|trans({}, 'app') -}}</span>
  76.             <ul class="submenu">
  77.                 <li>
  78.                     <a href="{{ path('ms_student_show_training_corner_examples') }}">
  79.                         <span> {{- 'app.corner_examples.title'|trans({}, 'app') -}}</span>
  80.                     </a>
  81.                 </li>
  82.                 <li>
  83.                     <a href="{{ path('ms_student_show_training_mathematical_square') }}">
  84.                         <span> {{- 'app.mathematical_square.title'|trans({}, 'app') -}}</span>
  85.                     </a>
  86.                 </li>
  87.                 <li>
  88.                     <a href="{{ path('ms_student_show_training_mathematical_pyramids') }}">
  89.                         <span> {{- 'app.mathematical_pyramids.title'|trans({}, 'app') -}}</span>
  90.                     </a>
  91.                 </li>
  92.                 <li>
  93.                     <a href="{{ path('ms_student_show_training_fractions') }}">
  94.                         <span> {{- 'app.fractions.title'|trans({}, 'app') -}}</span>
  95.                     </a>
  96.                 </li>
  97.                 {% if not (app.user.school and app.user.school.id == 143) %}
  98.                     <li>
  99.                         <a href="{{ path('ms_student_show_training_shulte') }}">
  100.                             <span>{{ 'app.shulte.title'|trans({}, 'app') }}</span>
  101.                         </a>
  102.                     </li>
  103.                 {% endif %}
  104.             </ul>
  105.             <span class="beta"><span>Beta</span></span>
  106.         </li>
  107.         {% if (app.user.type == constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT')) %}
  108.             {% if app.user.studentProfile.status != constant('MentalSchool\\AppBundle\\Entity\\StudentProfile::STATUS_VACATION') %}
  109.                 {% if app.user.studentGroup.isHideCalendarOfLessons != 1 %}
  110.                     <li class="{{ (currentPath == path('ms_student_lessons')) ? 'active' : '' }}">
  111.                         <a href="{{- path('ms_student_lessons') -}}">{{- 'app.breadcrumbs.lessons'|trans({}, 'app') -}}</a>
  112.                     </li>
  113.                 {% endif %}
  114.             {% endif %}
  115.             <li class="{{ (currentPath == path('ms_student_payment')) ? 'active' : '' }}">
  116.                 <a href="{{- path('ms_student_payment') -}}">{{- 'app.breadcrumbs.payment'|trans({}, 'app') -}}</a>
  117.             </li>
  118.             {% if  (app.user.studentProfile.status != constant('MentalSchool\\AppBundle\\Entity\\StudentProfile::STATUS_VACATION')) %}
  119.                 <li class="{{ (currentPath == path('ms_student_rating')) ? 'active' : '' }}">
  120.                     <a href="{{- path('ms_student_rating') -}}">{{- 'app.breadcrumbs.rating'|trans({}, 'app') -}}</a>
  121.                 </li>
  122.             {% endif %}
  123.         {% else %}
  124.             <li class="{{ (currentPath == path('ms_student_rating')) ? 'active' : '' }}">
  125.                 <a href="{{- path('ms_student_rating') -}}">{{- 'app.breadcrumbs.rating'|trans({}, 'app') -}}</a>
  126.             </li>
  127.         {% endif %}
  128.     </ul>
  129. </div>
  130. <div class="user-info">
  131.     {% if (app.user.type == constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT')) %}
  132.         <div class="abacoins-box wrap">
  133.             <a href="{{- path('ms_student_abacoin') -}}">
  134.                 <img src="/bundles/app/image/abacoin-icon.svg">
  135.                 <span>{{ app.user.abacoins }}</span>
  136.             </a>
  137.             <span class="sub-button beta"><span>Beta</span></span>
  138.         </div>
  139.     {% endif %}
  140.     <div class="wrap">
  141.         {% block user_info %}
  142.             {%- embed 'AppBundle:Student:Components/_user_info.html.twig' -%}{%- endembed -%}
  143.         {% endblock %}
  144.     </div>
  145. </div>
  146. <div class="abacoins-box-mobile wrap">
  147.     <a href="{{- path('ms_student_abacoin') -}}">
  148.         <img src="/bundles/app/image/abacoin-icon-mobile.svg">
  149.         <div>
  150.             <span>{{ app.user.abacoins }}</span>
  151.             <span class="sub-button beta"><span>Beta</span></span>
  152.         </div>
  153.     </a>
  154. </div>
  155. {% if app.user.type == constant('MentalSchool\\AppBundle\\Entity\\User::USER_TYPE_STUDENT') %}
  156.     <div class="langs-wrap">
  157.         {# <p>{{- 'app.student.settings.language'|trans({}, 'app') -}}: </p> #}
  158.         <div class="active-lang">
  159.             {% if ("en" == app.request.locale) %}en{% endif %}
  160.             {% if ("uk" == app.request.locale) %}uk{% endif %}
  161.             {% if ("ru" == app.request.locale) %}ru{% endif %}
  162.             {% if ("he" == app.request.locale) %}he{% endif %}
  163.             {% if ("pl" == app.request.locale) %}pl{% endif %}
  164.             {% if ("ro" == app.request.locale) %}ro{% endif %}
  165.             {% if ("he" == app.request.locale) %}he{% endif %}
  166.             {% if ("tr" == app.request.locale) %}tr{% endif %}
  167.             {% if ("fr" == app.request.locale) %}fr{% endif %}
  168.         </div>
  169.         {% block lang %}
  170.             <ul class="langs-box">
  171.                 <li class="{% if ("en" == app.request.locale) %} active{% endif %}"><a
  172.                             href="/{{ app.request.locale }}/student/change-language/en" class="en">en</a></li>
  173.                 <li class="{% if ("uk" == app.request.locale) %} active{% endif %}"><a
  174.                             href="/{{ app.request.locale }}/student/change-language/uk" class="uk">uk</a></li>
  175.                 <li class="{% if ("ru" == app.request.locale) %} active{% endif %}"><a
  176.                             href="/{{ app.request.locale }}/student/change-language/ru" class="ru">ru</a></li>
  177.                 <li class="{% if ("pl" == app.request.locale) %} active{% endif %}"><a
  178.                             href="/{{ app.request.locale }}/student/change-language/pl" class="pl">pl</a></li>
  179.                 <li class="{% if ("ro" == app.request.locale) %} active{% endif %}"><a
  180.                             href="/{{ app.request.locale }}/student/change-language/ro" class="ro">ro</a></li>
  181.                 <li class="{% if ("es" == app.request.locale) %} active{% endif %}"><a
  182.                             href="/{{ app.request.locale }}/student/change-language/es" class="es">es</a></li>
  183.                 <li class="{% if ("he" == app.request.locale) %} active{% endif %}"><a
  184.                             href="/{{ app.request.locale }}/student/change-language/he" class="he">he</a></li>
  185.                 <li class="{% if ("tr" == app.request.locale) %} active{% endif %}"><a
  186.                             href="/{{ app.request.locale }}/student/change-language/tr" class="tr">tr</a></li>
  187.                 <li class="{% if ("fr" == app.request.locale) %} active{% endif %}"><a
  188.                             href="/{{ app.request.locale }}/student/change-language/fr" class="fr">fr</a></li>
  189.             </ul>
  190.         {% endblock %}
  191.     </div>
  192. {% endif %}
  193. <span class="mob-button-menu">
  194.     <span></span>
  195.     <span></span>
  196.     <span></span>
  197. </span>
  198. <span class="mob-close-submenu"></span>