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 %}Greetings From SmartSigma !{% 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/css/style.bundle.css') }}">
  12.     <link rel="shortcut icon" href="{{ asset('logos/favicon.ico') }}"/>
  13.     <style>
  14.         .zoom-img{
  15.             height: 800px;
  16.         }
  17.     </style>
  18.     {% block stylesheets %}{% endblock %}
  19. </head>
  20. <!--begin::Body-->
  21. <body id="kt_body"
  22.       class="page-loading-enabled page-loading header-fixed header-tablet-and-mobile-fixed toolbar-enabled toolbar-fixed toolbar-tablet-and-mobile-fixed aside-enabled aside-fixed"
  23.       style="--kt-toolbar-height:55px;--kt-toolbar-height-tablet-and-mobile:55px" data-kt-aside-minimize="on">
  24. <!-- Loader -->
  25. {% include '_layout/_loader.html.twig' %}
  26. <!--begin::Main-->
  27. {% block main %}
  28.     <!--begin::Root-->
  29.     <div class="d-flex flex-column flex-root">
  30.         <!--begin::Page-->
  31.         <div class="page d-flex flex-row flex-column-fluid">
  32.             <!--begin::Aside-->
  33.             {% include '_layout/aside/_base.html.twig' %}
  34.             <!--begin::Wrapper-->
  35.             <div class="wrapper d-flex flex-column flex-row-fluid" id="kt_wrapper">
  36.                 <!--layout-partial:layout/header/_base.html-->
  37.                 {% include '_layout/header/_base.html.twig' with {title: block('title')} %}
  38.                 <!--begin::Content-->
  39.                 <div class="content d-flex flex-column flex-column-fluid" id="kt_content">
  40.                     <!--layout-partial:layout/toolbars/_toolbar-1.html-->
  41.                     {% if block('toolbarLeft') is not defined %}{% block toolbarLeft %}{% endblock %}{% endif %}
  42.                     {% if block('toolbarRight') is not defined %}{% block toolbarRight %}{% endblock %}{% endif %}
  43.                     {% include '_layout/toolbars/_toolbar.html.twig' with {toolbarLeft: block('toolbarLeft'), toolbarRight: block('toolbarRight')} %}
  44.                     <!--begin::Post-->
  45.                     <div class="post d-flex flex-column-fluid" id="kt_post">
  46.                         <!--begin::Container-->
  47.                         <div id="kt_content_container" class="container-fluid">
  48.                             {% for label, messages in app.flashes %}
  49.                                 <div class="container">
  50.                                     <div class="alert alert-{{ label }}">
  51.                                         {% for message in messages %}
  52.                                             <p>{{ message | raw }}</p>
  53.                                         {% endfor %}
  54.                                     </div>
  55.                                 </div>
  56.                             {% endfor %}
  57.                             <div id="body">
  58.                                 {% block modal %}{% endblock %}
  59.                                 {% block body %}{% endblock %}
  60.                             </div>
  61.                         </div>
  62.                         <!--end::Container-->
  63.                     </div>
  64.                     <!--end::Post-->
  65.                 </div>
  66.                 <!--end::Content-->
  67.                 <!--layout-partial:layout/_footer.html-->
  68.                 {% include '_layout/_footer.html.twig' %}
  69.             </div>
  70.             <!--end::Wrapper-->
  71.         </div>
  72.         <!--end::Page-->
  73.     </div>
  74.     <!--end::Root-->
  75.     <!--layout-partial:layout/_scrolltop.html-->
  76.     {% include '_layout/_scrolltop.html.twig' %}
  77. {% endblock %}
  78. <!--end::Main-->
  79. <script>var hostUrl = "{{ asset('assets/theme/') }}";</script>
  80. <!--begin::Javascript-->
  81. <!--begin::Global Javascript Bundle(used by all pages)-->
  82. <script src="{{ asset('assets/theme/plugins/global/plugins.bundle.js') }}"></script>
  83. <script src="{{ asset('assets/theme/js/scripts.bundle.js') }}"></script>
  84. {#<script src="{{ asset('assets/theme/plugins/custom/fullcalendar/fullcalendar.bundle.js') }}"></script>#}
  85. <script src="{{ asset('assets/theme/plugins/custom/datatables/datatables.bundle.js') }}"></script>
  86. <script src="{{ asset('assets/other/flatpickr-fr.js') }}"></script>
  87. <script src="{{ asset('assets/other/select2.full.min.js') }}"></script>
  88. <script src="{{ asset('assets/other/select2-fr.js') }}"></script>
  89. <!--end::Global Javascript Bundle-->
  90. <!--begin::Page Custom Javascript(used by this page)-->
  91. <script src="{{ asset('assets/theme/js/custom/widgets.js') }}"></script>
  92. <script src="{{ asset('assets/theme/js/custom/intro.js') }}"></script>
  93. <script src="{{ asset('assets/other/accounting.umd.js') }}"></script>
  94. <script src="{{ asset('assets/other/vue.js') }}"></script>
  95. <script src="{{ asset('assets/other/vue-numeric.min.js') }}"></script>
  96. <script src="{{ asset('assets/other/vue-the-mask.js') }}"></script>
  97. <script>
  98.     $(function () {
  99.         //date
  100.         arrows = {
  101.             rightArrow: '<i class="la la-angle-right"></i>',
  102.             leftArrow: '<i class="la la-angle-left"></i>'
  103.         }
  104.         var daterangepicker = $('.date');
  105.         daterangepicker.daterangepicker({
  106.             "singleDatePicker": true,
  107.             "showDropdowns": true,
  108.             "autoUpdateInput": true,
  109.             "locale": {
  110.                 "format": "DD/MM/YYYY",
  111.                 "applyLabel": "Appliquer",
  112.                 "cancelLabel": "Annuler",
  113.                 "weekLabel": "W",
  114.                 "firstDay": 1
  115.             }
  116.         });
  117.         daterangepicker.on('apply.daterangepicker', function (ev, picker) {
  118.             $(this).val(picker.startDate.format("DD/MM/YYYY"));
  119.         });
  120.         daterangepicker.on('cancel.daterangepicker', function (ev, picker) {
  121.             $(this).val('');
  122.         });
  123.         $("select:not(.no-select)").select2();
  124.     })
  125.     function generateDataTableConfig(ajax, hidden = [], sort = [], order = [0, 'desc'], callback = "", displayLength = 30) {
  126.         if (callback.length === 0) {
  127.             callback = function () {
  128.                 deleteTrigger();
  129.                 KTMenu.createInstances();
  130.                 $('[data-bs-toggle="tooltip"]').tooltip();
  131.                 zoomPictures();
  132.             };
  133.         }
  134.         return {
  135.             "ajax": ajax,
  136.             "columnDefs": [
  137.                 {
  138.                     "targets": hidden,
  139.                     "visible": false
  140.                 },
  141.                 {
  142.                     "targets": sort,
  143.                     "orderable": false
  144.                 }
  145.             ],
  146.             "order": [order],
  147.             "displayLength": displayLength,
  148.             "lengthMenu": [[10, 25, 50, 100, 150, 200, 400, 500 /*-1*/], [10, 25, 50, 100, 150, 200, 400, 500]],
  149.             "language": {
  150.                 "sEmptyTable": "Aucune donnée disponible dans le tableau",
  151.                 "sInfo": "Affichage de l'élément _START_ à _END_ sur _TOTAL_ éléments",
  152.                 "sInfoEmpty": "Affichage de l'élément 0 à 0 sur 0 élément",
  153.                 "sInfoFiltered": "(filtré à partir de _MAX_ éléments au total)",
  154.                 "sInfoPostFix": "",
  155.                 "sInfoThousands": ",",
  156.                 "sLengthMenu": "Afficher _MENU_ éléments",
  157.                 "sLoadingRecords": "Chargement...",
  158.                 "sProcessing": "Traitement...",
  159.                 "sSearch": "Rechercher :",
  160.                 "sZeroRecords": "Aucun élément correspondant trouvé",
  161.                 "oPaginate": {
  162.                     "sFirst": "Premier",
  163.                     "sLast": "Dernier",
  164.                     "sNext": "Suivant",
  165.                     "sPrevious": "Précédent"
  166.                 },
  167.                 "oAria": {
  168.                     "sSortAscending": ": activer pour trier la colonne par ordre croissant",
  169.                     "sSortDescending": ": activer pour trier la colonne par ordre décroissant"
  170.                 },
  171.                 // "select": {
  172.                 //     "rows": {
  173.                 //         "_": "%d lignes sélectionnées",
  174.                 //         "0": "Aucune ligne sélectionnée",
  175.                 //         "1": "1 ligne sélectionnée"
  176.                 //     }
  177.                 // },
  178.                 "search": "_INPUT_"
  179.             },
  180.             "pagingType": "full_numbers",
  181.             "iDisplayLength": 25,
  182.             "bProcessing": true,
  183.             "serverSide": true,
  184.             "drawCallback": callback,
  185.             // "preDrawCallback": function (settings) {
  186.             //
  187.             //     var elTable = jQuery('#SamiTable');
  188.             //     var oTable = elTable.DataTable();
  189.             //     if (oTable.context[0].jqXHR) {
  190.             //         oTable.context[0].jqXHR.abort()
  191.             //     }
  192.             // }
  193.         };
  194.     }
  195.     // Search Datatable --- official docs reference: https://datatables.net/reference/api/search()
  196.     var handleSearchDatatable = function (dt) {
  197.         const filterSearch = document.querySelector('[data-table-filter="search"]');
  198.         filterSearch.addEventListener('keyup', function (e) {
  199.             dt.search(e.target.value).draw();
  200.         });
  201.     }
  202.     function deleteTrigger() {
  203.         $(".delete").on("click", function () {
  204.             var form = $(this).parent();
  205.             Swal.fire({
  206.                 text: form.data('message'),
  207.                 icon: "error",
  208.                 confirmButtonText: "Confirmer !",
  209.                 customClass: {
  210.                     confirmButton: "btn btn-danger font-weight-bold btn-pill",
  211.                     cancelButton: "btn btn-secondary font-weight-bold btn-pill"
  212.                 },
  213.                 cancelButtonText: 'Annuler',
  214.                 showCancelButton: true
  215.             }).then((result) => {
  216.                 if (result.isConfirmed) {
  217.                     form.submit();
  218.                 }
  219.             })
  220.         });
  221.     }
  222.     function zoomPictures() {
  223.         $('.zoom-image').popover(
  224.             {
  225.                 html: true,
  226.                 trigger: 'hover',
  227.                 placement: 'right',
  228.                 content: function () {
  229.                     return '<img class="zoom-img" src="' + $(this).attr('data-image-zoom') + '">';
  230.                 }
  231.             });
  232.     }
  233.     $(function () {
  234.         zoomPictures();
  235.     })
  236. </script>
  237. {% block javascripts %}{% endblock %}
  238. <!--end::Page Custom Javascript-->
  239. <!--end::Javascript-->
  240. </body>
  241. <!--end::Body-->
  242. </html>