{% extends 'layout/base.html.twig' %}
{% block stylesheets %}
{{ parent() }}
<link href="{{ asset('assets/css/grasp_mobile_progress_circle-1.0.0.min.css') }}" rel="stylesheet" type="text/css" />
<link href="{{ asset('assets/css/jquery.mCustomScrollbar.css') }}" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{{ asset('https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css') }}">
<link href="{{ asset('assets/css/style.blue.css') }}" rel="stylesheet" type="text/css" />
{% endblock %}
{% block title %}
{{ parent() }}
/Administration
{% endblock %}
{% block main %}
{% block sidebar %}
<nav class="side-navbar">
<div class="side-navbar-wrapper">
{% block identification %}
<div class="sidenav-header d-flex align-items-center justify-content-center">
<div class="sidenav-header-inner text-center">
<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">
<h2 class="h5 text-uppercase"></h2>
<span class="text-uppercase">
{% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
{{ app.user.username }}
{% endif %}
</span>
</div>
<div class="sidenav-header-logo">
<a href="index.html" class="brand-small text-center">
<strong></strong>
<strong class="text-primary">
D
</strong>
</a>
</div>
</div>
{% endblock identification %}
{% block menu %}
<div class="main-menu">
<ul id="side-main-menu" class="side-menu list-unstyled">
{% if is_granted('ROLE_ADMIN') %}
<li class="{% if app.request.attributes.get('_route') == "admin_school_years" %}active{% endif %}">
<a href="{{ path('admin_school_years') }}">
<i class="fa fa-calendar" aria-hidden="true"></i>
Années scolaires
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_quaters" %}active{% endif %}">
<a href="{{ path('admin_quaters') }}">
<i class="fa fa-calendar-check-o" aria-hidden="true"></i>
Trimestres
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_sequences" %}active{% endif %}">
<a href="{{ path('admin_sequences') }}">
<i class="fa fa-calendar-minus-o" aria-hidden="true"></i>
Séquences
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_programs" %}active{% endif %}">
<a href="{{ path('admin_programs') }}">
<i class="fa fa-table" aria-hidden="true"></i>
Programmes
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_sections" %}active{% endif %}">
<a href="{{ path('admin_sections') }}">
<i class="fa fa-th-large" aria-hidden="true"></i>
Sections
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_cycles" %}active{% endif %}">
<a href="{{ path('admin_cycles') }}">
<i class="fa fa-th-list" aria-hidden="true"></i>
Cycles
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_levels" %}active{% endif %}">
<a href="{{ path('admin_levels') }}">
<i class="fa fa-list-ul" aria-hidden="true"></i>
Niveaux
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_modules" %}active{% endif %}">
<a href="{{ path('admin_modules') }}">
<i class="fa fa-folder-open-o" aria-hidden="true"></i>
Module
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_domains" %}active{% endif %}">
<a href="{{ path('admin_domains') }}">
<i class="fa fa-user-md" aria-hidden="true"></i>
Departement.
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_courses" %}active{% endif %}">
<a href="{{ path('admin_courses') }}">
<i class="fa fa-book" aria-hidden="true"></i>
Matières
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_subscriptions" %}active{% endif %}">
<a href="{{ path('admin_subscriptions') }}">
<i class="fa fa-exchange" aria-hidden="true"></i>
Inscriptions
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_students" %}active{% endif %}">
<a href="{{ path('admin_students', { 'type': "new_students_not_yet_registered_checkbox" }) }}">
<i class="fa fa-users"></i>
Eleves
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_attributions" %}active{% endif %}">
<a href="{{ path('admin_attributions') }}">
<i class="fa fa-map-signs" aria-hidden="true"></i>
Attributions
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_users" %}active{% endif %}">
<a href="{{ path('admin_users') }}">
<i class="fa fa-user" aria-hidden="true"></i>
Professeurs
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_statistics" %}active{% endif %}">
<a href="{{ path('admin_statistics') }}">
<i class="fa fa-area-chart" aria-hidden="true"></i>
Statistiques
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_classrooms" %}active{% endif %}">
<a href="{{ path('admin_classrooms') }}">
<i class="fa fa-indent" aria-hidden="true"></i>
Classes
</a>
</li>
{% endif %}
<li class="{% if app.request.attributes.get('_route') == "admin_evaluations" %}active{% endif %}">
<a href="{{ path('admin_evaluations') }}">
<i class="fa fa-file-pdf-o" aria-hidden="true"></i>
Evaluations
</a>
</li>
{% if is_granted('ROLE_DISCIPLINE') %}
<li class="{% if app.request.attributes.get('_route') == "admin_abscences_sheet_index" %}active{% endif %}">
<a href="{{ path('admin_abscences_sheet_index') }}">
<i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
Discipline
</a>
</li>
{% endif %}
{% if is_granted('ROLE_FINANCIAL') %}
<li class="{% if app.request.attributes.get('_route') == "app_payment_index" %}active{% endif %}">
<a href="{{ path('app_payment_index') }}">
<i class="fa fa-money" aria-hidden="true"></i>
Payment
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_paymentPlans" %}active{% endif %}">
<a href="{{ path('admin_paymentPlans') }}">
<i class="fa fa-clock-o" aria-hidden="true"></i>
Scolarite
</a>
</li>
{% endif %}
{#<li class="{% if app.request.attributes.get('_route') == "admin_emails" %}active{% endif %}">
<a href="{{ path('admin_emails')}}"><i class="fa fa-credit-card" aria-hidden="true"></i>Messages</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_payes" %}active{% endif %}">
<a href="{{ path('admin_payes')}}"><i class="fa fa-money" aria-hidden="true"></i>Versement</a>
</li>
<HR size="0.8" align="center" width="80%" color="white">
{#
<HR size="0.8" align="center" width="80%" color="white">
<li class="{% if app.request.attributes.get('_route') == "admin_tables" %}active{% endif %}">
<a href="{{ path('admin_tables')}}">
<i class="fa fa-filter" aria-hidden="true"></i>
<span>Filtres
</span>
</a>
</li>
<li class="{% if app.request.attributes.get('_route') == "admin_graphs" %}active{% endif %}">
<a href="{{ path('admin_graphs')}}">
<i class="fa fa-bar-chart" aria-hidden="true"></i>
<span>Graphes
</span>
</a>
</li>
#}
<li class="{% if app.request.attributes.get('_route') == "app_account" %}active{% endif %}">
<a href="{{ path('app_account') }}">
<i class="fa fa-user-circle"></i>
Account
</a>
</li>
</ul>
</div>
{% endblock menu %}
</div>
</nav>
{% endblock sidebar %}
<div class="page home-page">
{% block header %}
<header class="header">
<nav class="navbar">
<div class="container-fluid">
<div class="navbar-holder d-flex justify-content-around">
<div class="navbar-header">
<a id="toggle-btn" href="#" class="menu-btn">
<i class="fa fa-bars" aria-hidden="true"></i>
</a>
<a href="{{ path('app_home') }}" class="navbar-brand text-center">
<div class="brand-text d-none d-md-inline-block">
<strong class="text-primary">
SCHOOL MANAGEMENT SYSTEM
</strong>
</div>
</a>
{% if app.user %}
<a id="logout_btn" href="#" onclick="event.preventDefault(); document.getElementById('js-logout-form').submit();" class="btn text-right btn-warning">
<i class="fa fa-sign-out" aria-hidden="true"></i>
</a>
<form id="js-logout-form" action="{{ path('app_logout') }}" style="dislay:none;" method="POST">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('logout') }}" />
</form>
{% endif %}
</div>
</div>
</div>
</nav>
<section class="container-fluid">
{% if is_granted('ROLE_ADMIN') %}
<div class="row m-2">
<div class="col-xl-2 col-md-4 col-6">
<div class="wrapper count-title d-flex">
<div class="icon">
<i class="fa fa-graduation-cap" aria-hidden="true"></i>
</div>
<div class="name">
<strong class="text-uppercase">
{{ students_count() }} eleves
</strong>
</div>
</div>
</div>
<div class="col-xl-2 col-md-4 col-6">
<div class="wrapper count-title d-flex">
<div class="icon">
<i class="fa fa-users" aria-hidden="true"></i>
</div>
<div class="name">
<strong class="text-uppercase">
{{ teachers_count() }} enseigants
</strong>
</div>
</div>
</div>
<div class="col-xl-2 col-md-4 col-6">
<div class="wrapper count-title d-flex">
<div class="icon">
<i class="fa fa-users"></i>
</div>
<div class="name">
<strong class="text-uppercase">
{# insolvents() #} insolvables
</strong>
</div>
</div>
</div>
<div class="col-xl-2 col-md-4 col-6">
<div class="wrapper count-title d-flex">
<div class="form-group">
<select class="custom-select form-select form-control" id="select_year">
{% for year in years()|reverse %}
{% if app.session.has('session_school_year') %}
<option {% if app.session.get('session_school_year')== year.id %}selected{% endif %} value={{year.id}}>{{year.code}}</option>
{% else %}
<option value={{year.id}}>{{year.code}}</option>
{% endif %}
{% endfor %}
</select>
</div>
</div>
</div>
<div class="col-xl-2 col-md-4 col-6">
<div class="wrapper count-title d-flex">
<div class="icon">
<i class="icon-list"></i>
</div>
<div class="name">
<strong class="text-uppercase">
{{ rooms_count() }} classes
</strong>
<div class="count-number"></div>
</div>
</div>
</div>
<div class="col-xl-2 col-md-4 col-6">
<div class="wrapper count-title d-flex">
<div class="icon">
<i class="fa fa-home" aria-hidden="true"></i>
</div>
<div class="name">
<strong class="text-uppercase">
</strong>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</section>
</header>
{% endblock header %}
</div>
<section class=" section-padding row">
<article class="row">
<aside class="col-2"></aside>
<section class="col-10">
{% block content %}{% endblock content %}
</section>
</article>
</section>
{% endblock main %}
{% block footer %}{% endblock footer %}
{% block javascripts %}
{{ parent() }}
<script type="text/javascript" src="{{ asset('assets/js/jquery.cookie.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/grasp_mobile_progress_circle-1.0.0.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/jquery.validate.min.js') }}"></script>
<script type="text/javascript" src="{{ asset('assets/js/jquery.mCustomScrollbar.concat.min.js') }}"></script>
<script type="text/javascript">
$('#select_year').on('change', function() {
postData = {
"selectedSchoolYear": $(this).val()
};
$.ajax({
type: "POST",
url: "{{ path('update_school_year') }}",
data: postData,
datatype: "json",
success: function (data) {
console.log("Changement d'annee.");
location.reload();
},
error: function (e) {
console.log(e.message);
alert("Echec.");
}
});
});
</script>
{% endblock javascripts %}