templates/layout/backEndLayout.html.twig line 1

Open in your IDE?
  1. {% extends 'layout/base.html.twig' %}
  2. {% block stylesheets %}
  3.     {{ parent() }}
  4.     <link href="{{ asset('assets/css/grasp_mobile_progress_circle-1.0.0.min.css') }}" rel="stylesheet" type="text/css" />
  5.     <link href="{{ asset('assets/css/jquery.mCustomScrollbar.css') }}" rel="stylesheet" type="text/css" />
  6.     <link rel="stylesheet" href="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css') }}">
  7.         <link href="{{ asset('assets/css/style.blue.css') }}" rel="stylesheet" type="text/css" />
  8.     {% endblock %}
  9.     {% block title %}
  10.         {{ parent() }}
  11.         /Administration 
  12.     {% endblock %}
  13.     {% block main %}
  14.         {% block sidebar %}
  15.             <nav class="side-navbar">
  16.                 <div class="side-navbar-wrapper">
  17.                     {% block identification %}
  18.                         <div class="sidenav-header d-flex align-items-center justify-content-center">
  19.                             <div class="sidenav-header-inner text-center">
  20.                                 <img src={% if is_granted("IS_AUTHENTICATED_REMEMBERED") %} "{{ app.user.avatar(75) }}" {% else %} {{ asset("img/avatar-2.jpg") }} {% endif %} class="img-fluid rounded-circle" alt="user-avatar">
  21.                                     <h2 class="h5 text-uppercase"></h2>
  22.                                     <span class="text-uppercase">
  23.                                         {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
  24.                                             {{ app.user.username }}
  25.                                         {% endif %}
  26.                                     </span>
  27.                                 </div>
  28.                                 <div class="sidenav-header-logo">
  29.                                     <a href="index.html" class="brand-small text-center">
  30.                                         <strong></strong>
  31.                                         <strong class="text-primary">
  32.                                             D                                     
  33.                                                                                                                                                                                                                         
  34.                                                                                                                                                                             
  35.                                                                                                                                 
  36.                                                                                     
  37.                                         </strong>
  38.                                     </a>
  39.                                 </div>
  40.                             </div>
  41.                         {% endblock identification %}
  42.                         {% block menu %}
  43.                             <div class="main-menu">
  44.                                 <ul id="side-main-menu" class="side-menu list-unstyled">
  45.                                    {% if is_granted('ROLE_ADMIN') %}
  46.                                     <li class="{% if app.request.attributes.get('_route') == "admin_school_years" %}active{% endif %}">
  47.                                         <a href="{{ path('admin_school_years') }}">
  48.                                             <i class="fa fa-calendar" aria-hidden="true"></i>
  49.                                             Années scolaires                                                                                                        
  50.                                         </a>
  51.                                     </li>
  52.                                     <li class="{% if app.request.attributes.get('_route') == "admin_quaters" %}active{% endif %}">
  53.                                         <a href="{{ path('admin_quaters') }}">
  54.                                             <i class="fa fa-calendar-check-o" aria-hidden="true"></i>
  55.                                             Trimestres                                      
  56.                                         </a>
  57.                                     </li>
  58.                                     <li class="{% if app.request.attributes.get('_route') == "admin_sequences" %}active{% endif %}">
  59.                                         <a href="{{ path('admin_sequences') }}">
  60.                                             <i class="fa fa-calendar-minus-o" aria-hidden="true"></i>
  61.                                             Séquences
  62.                                          </a>
  63.                                     </li>
  64.                                     <li class="{% if app.request.attributes.get('_route') == "admin_programs" %}active{% endif %}">
  65.                                         <a href="{{ path('admin_programs') }}">
  66.                                             <i class="fa fa-table" aria-hidden="true"></i>
  67.                                             Programmes
  68.                                           </a>
  69.                                     </li>
  70.                                     <li class="{% if app.request.attributes.get('_route') == "admin_sections" %}active{% endif %}">
  71.                                         <a href="{{ path('admin_sections') }}">
  72.                                             <i class="fa fa-th-large" aria-hidden="true"></i>
  73.                                             Sections
  74.                                                                                                                                                                                                                                                                                                                                     
  75.                                                                                                                                                                                                                                                                                     
  76.                                                                                                                                                                                                                                     
  77.                                                                                                                                                                                     
  78.                                                                                                                                     
  79.                                                                                     
  80.                                         </a>
  81.                                     </li>
  82.                                     <li class="{% if app.request.attributes.get('_route') == "admin_cycles" %}active{% endif %}">
  83.                                         <a href="{{ path('admin_cycles') }}">
  84.                                             <i class="fa fa-th-list" aria-hidden="true"></i>
  85.                                             Cycles
  86.                                                                                                                                                                                                                                                                                                                                     
  87.                                                                                                                                                                                                                                                                                     
  88.                                                                                                                                                                                                                                     
  89.                                                                                                                                                                                     
  90.                                                                                                                                     
  91.                                                                                     
  92.                                         </a>
  93.                                     </li>
  94.                                     <li class="{% if app.request.attributes.get('_route') == "admin_levels" %}active{% endif %}">
  95.                                         <a href="{{ path('admin_levels') }}">
  96.                                             <i class="fa fa-list-ul" aria-hidden="true"></i>
  97.                                             Niveaux
  98.                                                                                                                                                                                                                                                                                                                                     
  99.                                                                                                                                                                                                                                                                                     
  100.                                                                                                                                                                                                                                     
  101.                                                                                                                                                                                     
  102.                                                                                                                                     
  103.                                                                                     
  104.                                         </a>
  105.                                     </li>
  106.                                   
  107.                                     <li class="{% if app.request.attributes.get('_route') == "admin_modules" %}active{% endif %}">
  108.                                         <a href="{{ path('admin_modules') }}">
  109.                                             <i class="fa fa-folder-open-o" aria-hidden="true"></i>
  110.                                             Module
  111.                                                                                                                                                                                                                                                                                                                                                         
  112.                                                                                                                                                                                                                                                                                                     
  113.                                                                                                                                                                                                                                                 
  114.                                                                                                                                                                                             
  115.                                                                                                                                         
  116.                                                                                     
  117.                                         </a>
  118.                                     </li>
  119.                                     <li class="{% if app.request.attributes.get('_route') == "admin_domains" %}active{% endif %}">
  120.                                         <a href="{{ path('admin_domains') }}">
  121.                                             <i class="fa fa-user-md" aria-hidden="true"></i>
  122.                                             Departement.
  123.                                                                                                                                                                                                                                                                                                                                                         
  124.                                                                                                                                                                                                                                                                                                     
  125.                                                                                                                                                                                                                                                 
  126.                                                                                                                                                                                             
  127.                                                                                                                                         
  128.                                                                                     
  129.                                         </a>
  130.                                     </li>
  131.                                     <li class="{% if app.request.attributes.get('_route') == "admin_courses" %}active{% endif %}">
  132.                                         <a href="{{ path('admin_courses') }}">
  133.                                             <i class="fa fa-book" aria-hidden="true"></i>
  134.                                             Matières
  135.                                                                                                                                                                                                                                                                                                                                                         
  136.                                                                                                                                                                                                                                                                                                     
  137.                                                                                                                                                                                                                                                 
  138.                                                                                                                                                                                             
  139.                                                                                                                                         
  140.                                                                                     
  141.                                         </a>
  142.                                     </li>
  143.                                     <li class="{% if app.request.attributes.get('_route') == "admin_subscriptions" %}active{% endif %}">
  144.                                         <a href="{{ path('admin_subscriptions') }}">
  145.                                             <i class="fa fa-exchange" aria-hidden="true"></i>
  146.                                             Inscriptions
  147.                                                                                                                                                                                                                                                                                                                                                                             
  148.                                                                                                                                                                                                                                                                                                                     
  149.                                                                                                                                                                                                                                                             
  150.                                                                                                                                                                                                     
  151.                                                                                                                                             
  152.                                                                                     
  153.                                         </a>
  154.                                     </li>
  155.                                      
  156.                                     <li class="{% if app.request.attributes.get('_route') == "admin_students" %}active{% endif %}">
  157.                                         <a href="{{ path('admin_students', { 'type': "new_students_not_yet_registered_checkbox" }) }}">
  158.                                             <i class="fa fa-users"></i>
  159.                                             Eleves
  160.                                                                                                                                                                                                                                                                                                                                                                             
  161.                                                                                                                                                                                                                                                                                                                     
  162.                                                                                                                                                                                                                                                             
  163.                                                                                                                                                                                                     
  164.                                                                                                                                             
  165.                                                                                     
  166.                                         </a>
  167.                                     </li>
  168.                                     <li class="{% if app.request.attributes.get('_route') == "admin_attributions" %}active{% endif %}">
  169.                                         <a href="{{ path('admin_attributions') }}">
  170.                                             <i class="fa fa-map-signs" aria-hidden="true"></i>
  171.                                             Attributions
  172.                                                                                                                                                                                                                                                                                                                                                                                                                         
  173.                                                                                                                                                                                                                                                                                                                                                                             
  174.                                                                                                                                                                                                                                                                                                                     
  175.                                                                                                                                                                                                                                                             
  176.                                                                                                                                                                                                     
  177.                                                                                                                                             
  178.                                                                                     
  179.                                         </a>
  180.                                     </li>
  181.                                     <li class="{% if app.request.attributes.get('_route') == "admin_users" %}active{% endif %}">
  182.                                         <a href="{{ path('admin_users') }}">
  183.                                             <i class="fa fa-user" aria-hidden="true"></i>
  184.                                             Professeurs
  185.                                                                                                                                                                                                                                                                                                                                                                             
  186.                                                                                                                                                                                                                                                                                                                     
  187.                                                                                                                                                                                                                                                             
  188.                                                                                                                                                                                                     
  189.                                                                                                                                             
  190.                                                                                     
  191.                                         </a>
  192.                                     </li>
  193.                                     <li class="{% if app.request.attributes.get('_route') == "admin_statistics" %}active{% endif %}">
  194.                                         <a href="{{ path('admin_statistics') }}">
  195.                                             <i class="fa fa-area-chart" aria-hidden="true"></i>
  196.                                             Statistiques
  197.                                                                                                                                                                                                                                                                                                                                                                             
  198.                                        </a>
  199.                                     </li>
  200.                                     <li class="{% if app.request.attributes.get('_route') == "admin_classrooms" %}active{% endif %}">
  201.                                         <a href="{{ path('admin_classrooms') }}">
  202.                                             <i class="fa fa-indent" aria-hidden="true"></i>
  203.                                             Classes
  204.                                                                                                                                                                                                                                                                                                                                     
  205.                                                                                                                                                                                                                                                                                     
  206.                                                                                                                                                                                                                                     
  207.                                                                                                                                                                                     
  208.                                                                                                                                     
  209.                                                                                     
  210.                                         </a>
  211.                                     </li>
  212.                                 {% endif %}
  213.                                       
  214.                                     <li class="{% if app.request.attributes.get('_route') == "admin_evaluations" %}active{% endif %}">
  215.                                         <a href="{{ path('admin_evaluations') }}">
  216.                                             <i class="fa fa-file-pdf-o" aria-hidden="true"></i>
  217.                                             Evaluations
  218.                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
  219.                                                                                     
  220.                                         </a>
  221.                                     </li>
  222.                                      {% if is_granted('ROLE_DISCIPLINE') %}
  223.                                      <li class="{% if app.request.attributes.get('_route') == "admin_abscences_sheet_index" %}active{% endif %}">
  224.                                         <a href="{{ path('admin_abscences_sheet_index') }}">
  225.                                             <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
  226.                                             Discipline                                                                                                                                                                                                                                                                                                                           
  227.                                        </a>
  228.                                     </li>
  229.                                      {% endif %}
  230.                                     {% if is_granted('ROLE_FINANCIAL') %}
  231.                                         <li class="{% if app.request.attributes.get('_route') == "app_payment_index" %}active{% endif %}">
  232.                                             <a href="{{ path('app_payment_index') }}">
  233.                                                 <i class="fa fa-money" aria-hidden="true"></i>
  234.                                                 Payment
  235.                                                                                                                                                                                                                                                                                                                                                                                                                 
  236.                                             </a>
  237.                                         </li>
  238.                                         <li class="{% if app.request.attributes.get('_route') == "admin_paymentPlans" %}active{% endif %}">
  239.                                             <a href="{{ path('admin_paymentPlans') }}">
  240.                                                 <i class="fa fa-clock-o" aria-hidden="true"></i>
  241.                                                 Scolarite
  242.                                             </a>
  243.                                         </li>
  244.                                     {% endif %}
  245.                                     
  246.                                     {#<li class="{% if app.request.attributes.get('_route') == "admin_emails" %}active{% endif %}">
  247.                                                                                                                                                                                                                                                                                                                                                                 <a href="{{ path('admin_emails')}}"><i class="fa fa-credit-card" aria-hidden="true"></i>Messages</a>
  248.                                                                                                                                                                                                                                                                                                                                                             </li>
  249.                                                                                                                                                                                                                                                                                                                                                         <li class="{% if app.request.attributes.get('_route') == "admin_payes" %}active{% endif %}">
  250.                                                                                                                                                                                                                                                                                                                                                                 <a href="{{ path('admin_payes')}}"><i class="fa fa-money" aria-hidden="true"></i>Versement</a>
  251.                                                                                                                                                                                                                                                                                                                                                             </li>
  252.                                                                                                                                                                                                                                                                                                                                                             
  253.                                                                                                                                                                                                                                                                                                                                                             <HR size="0.8" align="center" width="80%" color="white">
  254.                                                                                                                                                                                                                                                                                                                                                         
  255.                                                                                                                                                                                                                                                                                                                                                             
  256.                                                                                                                                                                                                                                                                                                                                                             
  257.                                                                                                                                                                                                                                                                                                                                                         
  258.                                                                                                                                                                                                                                                                                                                                                             {# 
  259.                                                                                                                                                                                                                                                                                                                                                             <HR size="0.8" align="center" width="80%" color="white">
  260.                                                                                                                                                                                                                                                                                                                                                             <li class="{% if app.request.attributes.get('_route') == "admin_tables" %}active{% endif %}">
  261.                                                                                                                                                                                                                                                                                                                                                                 <a href="{{ path('admin_tables')}}">
  262.                                                                                                                                                                                                                                                                                                                                                                     <i class="fa fa-filter" aria-hidden="true"></i>
  263.                                                                                                                                                                                                                                                                                                                                                                     <span>Filtres
  264.                                                                                                                                                                                                                                                                                                                                                                     </span>
  265.                                                                                                                                                                                                                                                                                                                                                                 </a>
  266.                                                                                                                                                                                                                                                                                                                                                             </li>
  267.                                                                                                                                                                                                                                                                                                                                                             <li class="{% if app.request.attributes.get('_route') == "admin_graphs" %}active{% endif %}">
  268.                                                                                                                                                                                                                                                                                                                                                                 <a href="{{ path('admin_graphs')}}">
  269.                                                                                                                                                                                                                                                                                                                                                                     <i class="fa fa-bar-chart" aria-hidden="true"></i>
  270.                                                                                                                                                                                                                                                                                                                                                                     <span>Graphes
  271.                                                                                                                                                                                                                                                                                                                                                                     </span>
  272.                                                                                                                                                                                                                                                                                                                                                                 </a>
  273.                                                                                                                                                                                                                                                                                                                                                             </li>
  274.                                                                                                                                                                                                                                                                                                                                                                 #}
  275.                                     <li class="{% if app.request.attributes.get('_route') == "app_account" %}active{% endif %}">
  276.                                         <a href="{{ path('app_account') }}">
  277.                                             <i class="fa fa-user-circle"></i>
  278.                                             Account
  279.                                         
  280.                                                                                                                                                                                                                                                                                                                
  281.                                                                                                                                                                                                                                                                                                                     
  282.                                                                                                                                                                                                                                                             
  283.                                                                                                                                                                                                     
  284.                                                                                                                                             
  285.                                                                                     
  286.                                         </a>
  287.                                     </li>
  288.                                 </ul>
  289.                             </div>
  290.                         {% endblock menu %}
  291.                     </div>
  292.                 </nav>
  293.             {% endblock  sidebar %}
  294.             <div class="page home-page">
  295.                 {% block header %}
  296.                     <header class="header">
  297.                         <nav class="navbar">
  298.                             <div class="container-fluid">
  299.                                 <div class="navbar-holder d-flex justify-content-around">
  300.                                     <div class="navbar-header">
  301.                                         <a id="toggle-btn" href="#" class="menu-btn">
  302.                                             <i class="fa fa-bars" aria-hidden="true"></i>
  303.                                         </a>
  304.                                         <a href="{{ path('app_home') }}" class="navbar-brand text-center">
  305.                                             <div class="brand-text d-none d-md-inline-block">
  306.                                                 <strong class="text-primary">
  307.                                                     SCHOOL MANAGEMENT SYSTEM
  308.                                                                                                                                                                                                                                                                                                                                                                                                                                     
  309.                                                                                                                                                                                                                                                                                                                                                                     
  310.                                                                                                                                                                                                                                                                                                     
  311.                                                                                                                                                                                                                                     
  312.                                                                                                                                                                     
  313.                                                                                                     
  314.                                                 </strong>
  315.                                             </div>
  316.                                         </a>
  317.                                         {% if app.user %}
  318.                                             <a id="logout_btn" href="#" onclick="event.preventDefault(); document.getElementById('js-logout-form').submit();" class="btn text-right btn-warning">
  319.                                                 <i class="fa fa-sign-out" aria-hidden="true"></i>
  320.                                             </a>
  321.                                             <form id="js-logout-form" action="{{ path('app_logout') }}" style="dislay:none;" method="POST">
  322.                                                 <input type="hidden" name="_csrf_token" value="{{ csrf_token('logout') }}" />
  323.                                             </form>
  324.                                         {% endif %}
  325.                                     </div>
  326.                                     
  327.                                 </div>
  328.                             </div>
  329.                         </nav>
  330.                         <section class="container-fluid">
  331.                          {% if is_granted('ROLE_ADMIN') %}
  332.                             <div class="row m-2">
  333.                                 <div class="col-xl-2 col-md-4 col-6">
  334.                                     <div class="wrapper count-title d-flex">
  335.                                         <div class="icon">
  336.                                             <i class="fa fa-graduation-cap" aria-hidden="true"></i>
  337.                                         </div>
  338.                                         <div class="name">
  339.                                             <strong class="text-uppercase">
  340.                                                 
  341.                                                 &nbsp; {{ students_count() }} &nbsp; eleves                                                                                                                                                                                                                                                                                                                                                  
  342.                                                                                                                                                                                                                                                                                                                                                                     
  343.                                             </strong>
  344.                                            
  345.                                         </div>
  346.                                     </div>
  347.                                 </div>
  348.                                 <div class="col-xl-2 col-md-4 col-6">
  349.                                     <div class="wrapper count-title d-flex">
  350.                                         <div class="icon">
  351.                                             <i class="fa fa-users" aria-hidden="true"></i>
  352.                                         </div>
  353.                                         <div class="name">
  354.                                             <strong class="text-uppercase">
  355.                                                     &nbsp; {{ teachers_count() }} &nbsp; enseigants
  356.                                            </strong>
  357.                         
  358.                                         </div>
  359.                                     </div>
  360.                                 </div>
  361.                                 <div class="col-xl-2 col-md-4 col-6">
  362.                                     <div class="wrapper count-title d-flex">
  363.                                         <div class="icon">
  364.                                             <i class="fa fa-users"></i>
  365.                                         </div>
  366.                                         <div class="name">
  367.                                             <strong class="text-uppercase">
  368.                                                     &nbsp; {# insolvents() #} &nbsp;  insolvables
  369.                                            </strong>
  370.                         
  371.                                         </div>
  372.                                     </div>
  373.                                 </div>
  374.                                 <div class="col-xl-2 col-md-4 col-6">
  375.                                     <div class="wrapper count-title d-flex">
  376.                                         
  377.                                         
  378.                                         <div class="form-group">
  379.                                             <select class="custom-select form-select form-control" id="select_year">
  380.                                                     {% for year in years()|reverse %}
  381.                                                          {% if app.session.has('session_school_year')  %}
  382.                                                                    
  383.                                                                     <option  {% if app.session.get('session_school_year')== year.id %}selected{% endif %}   value={{year.id}}>{{year.code}}</option>
  384.                                                          {% else %}
  385.                                                                     <option  value={{year.id}}>{{year.code}}</option>
  386.                                                         {% endif %}
  387.                                                     {% endfor %}
  388.                                             </select>
  389.                                         </div>
  390.                                     </div>
  391.                                 </div>
  392.                                 <div class="col-xl-2 col-md-4 col-6">
  393.                                     <div class="wrapper count-title d-flex">
  394.                                         <div class="icon">
  395.                                             <i class="icon-list"></i>
  396.                                         </div>
  397.                                         <div class="name">
  398.                                             <strong class="text-uppercase">
  399.                                                    &nbsp; {{ rooms_count() }} &nbsp; classes
  400.                                                                                                                                                                                                                                                                                                                                                                                                         
  401.                                                                                                                                                                                                                                                                                                                                             
  402.                                                                                                                                                                                                                                                                                 
  403.                                                                                                                                                                                                                     
  404.                                                                                                                                                         
  405.                                                                                             
  406.                                             </strong>
  407.                                            
  408.                                             <div class="count-number"></div>
  409.                                         </div>
  410.                                     </div>
  411.                                 </div>
  412.                                 <div class="col-xl-2 col-md-4 col-6">
  413.                                     <div class="wrapper count-title d-flex">
  414.                                         <div class="icon">
  415.                                             <i class="fa fa-home" aria-hidden="true"></i>
  416.                                         </div>
  417.                                         <div class="name">
  418.                                             <strong class="text-uppercase">
  419.                                                                                                                                                                                                                                                                                                                                                                                                         
  420.                                                                                                                                                                                                                                                                                                                                             
  421.                                                                                                                                                                                                                                                                                 
  422.                                                                                                                                                                                                                     
  423.                                                                                                                                                         
  424.                                                                                             
  425.                                             </strong>
  426.                                         </div>
  427.                                     </div>
  428.                                 </div>
  429.                             </div>
  430.                             </div>
  431.                           {% endif %}
  432.                     </section>
  433.                 </header>
  434.             {% endblock header %}
  435.         </div>
  436.         <section class=" section-padding row">
  437.             <article class="row">
  438.                 <aside class="col-2"></aside>
  439.                 <section class="col-10">
  440.                     {% block content %}{% endblock content %}
  441.                 </section>
  442.             </article>
  443.         </section>
  444.     {% endblock  main %}
  445.     {% block footer %}{% endblock footer %}
  446.     {% block javascripts %}
  447.         {{ parent() }}
  448.         
  449.        <script type="text/javascript" src="{{ asset('assets/js/jquery.cookie.js') }}"></script>
  450.        <script type="text/javascript" src="{{ asset('assets/js/grasp_mobile_progress_circle-1.0.0.min.js') }}"></script>
  451.        <script type="text/javascript" src="{{ asset('assets/js/jquery.validate.min.js') }}"></script>
  452.        <script type="text/javascript" src="{{ asset('assets/js/jquery.mCustomScrollbar.concat.min.js') }}"></script>
  453.        <script type="text/javascript">
  454.             $('#select_year').on('change', function() {
  455.             postData = {
  456.                 "selectedSchoolYear":  $(this).val()
  457.             };
  458.             $.ajax({
  459.             type: "POST",
  460.             url: "{{ path('update_school_year') }}",
  461.             data: postData,
  462.             datatype: "json",
  463.             success: function (data) {
  464.                 console.log("Changement  d'annee.");
  465.                 location.reload();
  466.             },
  467.             error: function (e) {
  468.                 console.log(e.message);
  469.                 alert("Echec.");
  470.             }
  471.             });
  472.         });
  473.             
  474.            
  475.        </script>
  476.         
  477.     {% endblock javascripts %}
  478.