templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>{% block title %}Welcome!{% endblock %}</title>
  6.     <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700"/>
  7.     {{ encore_entry_link_tags('app') }}
  8.     <link rel="stylesheet" href="{{ asset('assets/theme/plugins/custom/fullcalendar/fullcalendar.bundle.css') }}">
  9.     <link rel="stylesheet" href="{{ asset('assets/theme/plugins/custom//datatables/datatables.bundle.css') }}"/>
  10.     <link rel="stylesheet" href="{{ asset('assets/theme/plugins/global/plugins.bundle.css') }}">
  11.     <link rel="stylesheet" href="{{ asset('assets/theme/plugins/custom/prismjs/prismjs.bundle.css') }}">
  12.     <link rel="stylesheet" href="{{ asset('assets/theme/css/style.bundle.css') }}">
  13.     <link rel="stylesheet" href="{{ asset('assets/theme/css/themes/layout/header/base/light.css') }}">
  14.     <link rel="stylesheet" href="{{ asset('assets/theme/css/themes/layout/header/menu/light.css') }}">
  15.     <link rel="stylesheet" href="{{ asset('assets/theme/css/themes/layout/brand/light.css') }}">
  16.     <link rel="stylesheet" href="{{ asset('assets/theme/css/themes/layout/aside/light.css') }}">
  17.     <link rel="shortcut icon" href="{{ asset('assets/theme/media/logos/favicon.ico') }}"/>
  18.     {% block stylesheets %}{% endblock %}
  19. </head>
  20. <body id="kt_body"
  21.       class="header-fixed header-mobile-fixed subheader-enabled aside-enabled aside-fixed aside-minimize-hoverable page-loading">
  22. <!--begin::Main-->
  23. {% block main %}
  24.     <!--[html-partial:include:{"file":"partials/_header-mobile.html"}]/-->
  25.     {% include '_partials/_header-mobile.html.twig' %}
  26.     <div class="d-flex flex-column flex-root">
  27.         <!--begin::Page-->
  28.         <div class="d-flex flex-row flex-column-fluid page">
  29.             <!--[html-partial:include:{"file":"partials/_aside.html"}]/-->
  30.             {% include '_partials/_aside.html.twig' %}
  31.             <!--begin::Wrapper-->
  32.             <div class="d-flex flex-column flex-row-fluid wrapper" id="kt_wrapper">
  33.                 <!--[html-partial:include:{"file":"partials/_header.html"}]/-->
  34.                 {% if block('headerMenu') is not defined %}{% block headerMenu %}
  35.                     <div></div>{% endblock %}{% endif %}
  36.                 {% include '_partials/_header.html.twig' with {headerMenu: block('headerMenu')} %}
  37.                 <!--begin::Content-->
  38.                 <div class="content d-flex flex-column flex-column-fluid" id="kt_content">
  39.                     <!--[html-partial:include:{"file":"partials/_subheader/subheader-v2.html"}]/-->
  40.                     {% if block('subHeaderLeft') is not defined %}{% block subHeaderLeft %}<h5
  41.                             class="text-dark font-weight-bold mt-2 mb-2 mr-5">{{ block('title') }}</h5>{% endblock %}{% endif %}
  42.                     {% if block('subHeaderRight') is not defined %}{% block subHeaderRight %}{% endblock %}{% endif %}
  43.                     {% include '_partials/_subheader/subheader-v2.html.twig' with {subHeaderLeft: block('subHeaderLeft'), subHeaderRight: block('subHeaderRight')} %}
  44.                     <!--[html-partial:include:{"file":"partials/_content.html"}]/-->
  45.                     {# {% include '_partials/_content.html.twig' %} #}
  46.                     <div class="d-flex flex-column-fluid">
  47.                         <!--begin::Container-->
  48.                         <div class="container-fluid">
  49.                             {% for label, messages in app.flashes %}
  50.                                 <div class="container">
  51.                                     <div class="alert alert-{{ label }}">
  52.                                         {% for message in messages %}
  53.                                             <p>{{ message | raw }}</p>
  54.                                         {% endfor %}
  55.                                     </div>
  56.                                 </div>
  57.                             {% endfor %}
  58.                             {% block body %}{% endblock %}
  59.                         </div>
  60.                     </div>
  61.                 </div>
  62.                 <!--end::Content-->
  63.                 <!--[html-partial:include:{"file":"partials/_footer.html"}]/-->
  64.                 {% include '_partials/_footer.html.twig' %}
  65.             </div>
  66.             <!--end::Wrapper-->
  67.         </div>
  68.         <!--end::Page-->
  69.     </div>
  70. {% endblock %}
  71. <!--end::Main-->
  72. <!--[html-partial:include:{"file":"partials/_extras/offcanvas/quick-search.html"}]/-->
  73. {# {% include '_partials/_extras/offcanvas/quick-search.html.twig' %} #}
  74. <!--[html-partial:include:{"file":"partials/_extras/offcanvas/quick-user.html"}]/-->
  75. {% include '_partials/_extras/offcanvas/quick-user.html.twig' %}
  76. <!--[html-partial:include:{"file":"partials/_extras/scrolltop.html"}]/-->
  77. {% include '_partials/_extras/scrolltop.html.twig' %}
  78. <!--[html-partial:include:{"file":"partials/_extras/toolbar.html"}]/-->
  79. {# {% include '_partials/_extras/toolbar.html.twig' %} #}
  80. <!--[html-partial:include:{"file":"partials/_extras/offcanvas/demo-panel.html"}]/-->
  81. {# {% include '_partials/_extras/offcanvas/demo-panel.html.twig' %} #}
  82. <script>
  83.     var HOST_URL = "https://preview.keenthemes.com/metronic/theme/html/tools/preview";
  84. </script>
  85. <script>
  86.     var KTAppSettings = {
  87.         "breakpoints": {
  88.             "sm": 576,
  89.             "md": 768,
  90.             "lg": 992,
  91.             "xl": 1200,
  92.             "xxl": 1400
  93.         },
  94.         "colors": {
  95.             "theme": {
  96.                 "base": {
  97.                     "white": "#ffffff",
  98.                     "primary": "#3699FF",
  99.                     "secondary": "#E5EAEE",
  100.                     "success": "#1BC5BD",
  101.                     "info": "#8950FC",
  102.                     "warning": "#FFA800",
  103.                     "danger": "#F64E60",
  104.                     "light": "#E4E6EF",
  105.                     "dark": "#181C32"
  106.                 },
  107.                 "light": {
  108.                     "white": "#ffffff",
  109.                     "primary": "#E1F0FF",
  110.                     "secondary": "#EBEDF3",
  111.                     "success": "#C9F7F5",
  112.                     "info": "#EEE5FF",
  113.                     "warning": "#FFF4DE",
  114.                     "danger": "#FFE2E5",
  115.                     "light": "#F3F6F9",
  116.                     "dark": "#D6D6E0"
  117.                 },
  118.                 "inverse": {
  119.                     "white": "#ffffff",
  120.                     "primary": "#ffffff",
  121.                     "secondary": "#3F4254",
  122.                     "success": "#ffffff",
  123.                     "info": "#ffffff",
  124.                     "warning": "#ffffff",
  125.                     "danger": "#ffffff",
  126.                     "light": "#464E5F",
  127.                     "dark": "#ffffff"
  128.                 }
  129.             },
  130.             "gray": {
  131.                 "gray-100": "#F3F6F9",
  132.                 "gray-200": "#EBEDF3",
  133.                 "gray-300": "#E4E6EF",
  134.                 "gray-400": "#D1D3E0",
  135.                 "gray-500": "#B5B5C3",
  136.                 "gray-600": "#7E8299",
  137.                 "gray-700": "#5E6278",
  138.                 "gray-800": "#3F4254",
  139.                 "gray-900": "#181C32"
  140.             }
  141.         },
  142.         "font-family": "Poppins"
  143.     };
  144. </script>
  145. <script src="{{ asset('assets/theme/plugins/global/plugins.bundle.js') }}"></script>
  146. <script src="{{ asset('assets/theme/js/scripts.bundle.js') }}"></script>
  147. <script src="{{ asset('assets/theme/plugins/custom/prismjs/prismjs.bundle.js') }}"></script>
  148. <script src="{{ asset('assets/theme/plugins/custom/fullcalendar/fullcalendar.bundle.js') }}"></script>
  149. <script src="{{ asset('assets/theme/plugins/custom/datatables/datatables.bundle.js') }}"></script>
  150. <script src="{{ asset('assets/theme/js/pages/crud/datatables/extensions/buttons.js') }}"></script>
  151. <script src="{{ asset('assets/theme/js/pages/widgets.js') }}"></script>
  152. {{ encore_entry_script_tags('app') }}
  153. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/locales/bootstrap-datepicker.fr.min.js"></script>
  154. <script>
  155.     $(function () {
  156.         //avatar
  157.         var avatar = new KTImageInput('avatar');
  158.         //date
  159.         arrows = {
  160.             rightArrow: '<i class="la la-angle-right"></i>',
  161.             leftArrow: '<i class="la la-angle-left"></i>'
  162.         }
  163.         // enable clear button
  164.         $('.date').datepicker({
  165.             autoclose: true,
  166.             todayBtn: "linked",
  167.             clearBtn: true,
  168.             todayHighlight: true,
  169.             templates: arrows,
  170.             language: "fr",
  171.             orientation: "bottom right"
  172.         });
  173.     })
  174.     function generateDataTableConfig(ajax, hidden = [], sort = [], order = [0, 'asc'], callback = "", displayLength = 30) {
  175.         if (callback.length === 0) {
  176.             callback = function () {
  177.                 ajaxActionTrigger();
  178.             };
  179.         }
  180.         return {
  181.             "ajax": ajax,
  182.             "columnDefs": [
  183.                 {
  184.                     "targets": hidden,
  185.                     "visible": false
  186.                 },
  187.                 {
  188.                     "targets": sort,
  189.                     "orderable": false
  190.                 }
  191.             ],
  192.             "order": [order],
  193.             "displayLength": displayLength,
  194.             "lengthMenu": [[10, 25, 50, 100, 150, 200, 400, 500 /*-1*/], [10, 25, 50, 100, 150, 200, 400, 500]],
  195.             "language": {
  196.                 "sEmptyTable": "Aucune donnée disponible dans le tableau",
  197.                 "sInfo": "Affichage de l'élément _START_ à _END_ sur _TOTAL_ éléments",
  198.                 "sInfoEmpty": "Affichage de l'élément 0 à 0 sur 0 élément",
  199.                 "sInfoFiltered": "(filtré à partir de _MAX_ éléments au total)",
  200.                 "sInfoPostFix": "",
  201.                 "sInfoThousands": ",",
  202.                 "sLengthMenu": "Afficher _MENU_ éléments",
  203.                 "sLoadingRecords": "Chargement...",
  204.                 "sProcessing": "Traitement...",
  205.                 "sSearch": "Rechercher :",
  206.                 "sZeroRecords": "Aucun élément correspondant trouvé",
  207.                 "oPaginate": {
  208.                     "sFirst": "Premier",
  209.                     "sLast": "Dernier",
  210.                     "sNext": "Suivant",
  211.                     "sPrevious": "Précédent"
  212.                 },
  213.                 "oAria": {
  214.                     "sSortAscending": ": activer pour trier la colonne par ordre croissant",
  215.                     "sSortDescending": ": activer pour trier la colonne par ordre décroissant"
  216.                 },
  217.                 // "select": {
  218.                 //     "rows": {
  219.                 //         "_": "%d lignes sélectionnées",
  220.                 //         "0": "Aucune ligne sélectionnée",
  221.                 //         "1": "1 ligne sélectionnée"
  222.                 //     }
  223.                 // },
  224.                 "search": "_INPUT_"
  225.             },
  226.             "pagingType": "full_numbers",
  227.             "iDisplayLength": 25,
  228.             "bProcessing": true,
  229.             "serverSide": true,
  230.             dom: `<'row'<'col-sm-6 text-left'f><'col-sm-6 text-right'B>>
  231.             <'row'<'col-sm-12'tr>>
  232.             <'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7 dataTables_pager'lp>>`,
  233.             "buttons": [
  234.                 {extend: 'print', className: 'btn dark btn-outline', filter: "applied", order: "current"},
  235.                 {extend: 'copy', className: 'btn red btn-outline', filter: "applied", order: "current"},
  236.                 {
  237.                     extend: 'pdf',
  238.                     className: 'btn green btn-outline',
  239.                     columns: "visible",
  240.                     filter: "applied",
  241.                     order: "current"
  242.                 },
  243.                 {extend: 'excel', className: 'btn yellow btn-outline ', filter: "applied", order: "current"},
  244.                 {extend: 'csv', className: 'btn purple btn-outline ', filter: "applied", order: "current"},
  245.                 {
  246.                     extend: 'colvis',
  247.                     className: 'btn dark btn-outline',
  248.                     text: 'Columns',
  249.                     filter: "applied",
  250.                     order: "current"
  251.                 }
  252.             ],
  253.             "drawCallback": callback,
  254.             // "preDrawCallback": function (settings) {
  255.             //
  256.             //     var elTable = jQuery('#SamiTable');
  257.             //     var oTable = elTable.DataTable();
  258.             //     if (oTable.context[0].jqXHR) {
  259.             //         oTable.context[0].jqXHR.abort()
  260.             //     }
  261.             // }
  262.         };
  263.     }
  264.     function ajaxActionTrigger() {
  265.         $(".ajax_action").on("click", function () {
  266.             var form = $(this).parent();
  267.             Swal.fire({
  268.                 text: form.data('message'),
  269.                 icon: "info",
  270.                 confirmButtonText: "Confirmer !",
  271.                 customClass: {
  272.                     confirmButton: "btn btn-danger font-weight-bold btn-pill",
  273.                     cancelButton: "btn btn-secondary font-weight-bold btn-pill"
  274.                 },
  275.                 cancelButtonText: 'Annuler',
  276.                 showCancelButton: true
  277.             }).then((result) => {
  278.                 if (result.isConfirmed) {
  279.                     form.submit();
  280.                 }
  281.             })
  282.         });
  283.     }
  284. </script>
  285. {% block javascripts %}{% endblock %}
  286. </body>
  287. </html>