templates/base.html.twig line 1

Open in your IDE?
  1. {# @@include('./partials/html.html') #}
  2. {{ include('partials/html.html.twig') }}
  3. <head>
  4.     {#    @@include("./partials/title-meta.html", {"title": "CRM"}) #}
  5.     <meta charset="utf-8"/>
  6.     <title>Bionops Extranet - {% block title %}{% endblock %}</title>
  7.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8.     <meta content="Club Espace professionnel BIONOPS" name="description"/>
  9.     <meta content="Numerilabs" name="author"/>
  10.     <!-- App favicon -->
  11.     <link rel="icon" type="image/x-icon" href="{{ asset('build/images/favicon.ico') }}"/>
  12.     {#    @@include('./partials/head-css.html') #}
  13.     {#    {{ include('partials/head-css.html.twig') }} #}
  14.     {% block stylesheets %}
  15.         <!-- Daterangepicker css -->
  16.         <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css"/>
  17.         <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css">
  18.         <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet"/>
  19.         <link rel="stylesheet" href="https://unpkg.com/tippy.js@6.3.1/dist/tippy.css">
  20.         {{ encore_entry_link_tags('app') }}
  21.         <!-- include summernote css/js -->
  22.         <link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.20/summernote-lite.min.css" rel="stylesheet">
  23.         <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dragula/3.6.6/dragula.css"
  24.               integrity="sha512-gGkweS4I+MDqo1tLZtHl3Nu3PGY7TU8ldedRnu60fY6etWjQ/twRHRG2J92oDj7GDU2XvX8k6G5mbp0yCoyXCA=="
  25.               crossorigin="anonymous" referrerpolicy="no-referrer"/>
  26.         <!-- Datatables css -->
  27.         {#        <link href="assets/vendor/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet" type="text/css" /> #}
  28.         {#        <link href="assets/vendor/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css" rel="stylesheet" type="text/css" /> #}
  29.         <link rel="stylesheet" type="text/css"
  30.               href="https://cdn.datatables.net/buttons/1.6.2/css/buttons.dataTables.min.css">
  31.     {% endblock %}
  32. </head>
  33. <body>
  34. <!-- Begin page -->
  35. <div class="wrapper">
  36.     {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  37.         {{ include('partials/menu.html.twig') }}
  38.     {% endif %}
  39.     <!-- ============================================================== -->
  40.     <!-- Start Page Content here -->
  41.     <!-- ============================================================== -->
  42.     <div class="content-page">
  43.         <div class="content">
  44.             <!-- Start Content-->
  45.             <div class="container-fluid">
  46.                 {#                {{ include("partials/page-title.html.twig") }} #}
  47.                 {#                {% embed "partials/page-title.html.twig" %}{% endembed %} #}
  48.                 {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  49.                     <!-- start page title -->
  50.                     <div class="row">
  51.                         <div class="col-12">
  52.                             <div class="page-title-box">
  53.                                 <div class="page-title-right">
  54.                                     <nav aria-label="breadcrumb m-0">
  55.                                         <ol class="breadcrumb bg-light-lighten p-2">
  56.                                             <li class="breadcrumb-item"><a href="{{ path('app_home') }}">
  57.                                                     <i class="uil-home-alt"></i>&nbsp;Accueil</a>
  58.                                             </li>
  59.                                             <li class="breadcrumb-item active" aria-current="page">
  60.                                                 {% block breadcrubSubTitle %} test {% endblock %}
  61.                                             </li>
  62.                                         </ol>
  63.                                     </nav>
  64.                                 </div>
  65.                                 {#                            <div class="page-title-right"> #}
  66.                                 {#                                <form class="d-flex"> #}
  67.                                 {#                                    <div class="input-group"> #}
  68.                                 {#                                        <input type="text" class="form-control form-control-light" id="dash-daterange"> #}
  69.                                 {#                                        <span class="input-group-text bg-primary border-primary text-white"> #}
  70.                                 {#                                                    <i class="mdi mdi-calendar-range font-13"></i> #}
  71.                                 {#                                                </span> #}
  72.                                 {#                                    </div> #}
  73.                                 {#                                    <a href="javascript: void(0);" class="btn btn-primary ms-2"> #}
  74.                                 {#                                        <i class="mdi mdi-autorenew"></i> #}
  75.                                 {#                                    </a> #}
  76.                                 {#                                </form> #}
  77.                                 {#                            </div> #}
  78.                                 <h4 class="page-title">{% block pageTitle %}{% endblock %}</h4>
  79.                             </div>
  80.                         </div>
  81.                     </div>
  82.                     <!-- end page title -->
  83.                 {% endif %}
  84.                 {% for message in app.flashes('success') %}
  85.                     <div class="alert alert-success" role="alert">
  86.                         {{ message|raw }}
  87.                     </div>
  88.                 {% endfor %}
  89.                 {#                {% if is_granted('IS_AUTHENTICATED_FULLY') %} #}
  90.                 {#                    <div class="alert alert-danger alert-dismissible fade show" role="alert"> #}
  91.                 {#                        <p> #}
  92.                 {#                            Vous ne voyez pas vos informations habituelles ? #}
  93.                 {#                            <strong>Pas d'inquiétude, c'est normal !</strong> #}
  94.                 {#                        </p> #}
  95.                 {#                        <p> #}
  96.                 {#                            Elles seront à nouveau disponibles très rapidement. #}
  97.                 {#                        </p> #}
  98.                 {#                        <p> #}
  99.                 {#                            En attendant, vous pouvez nous contacter par mail (julie.peroux@bionops.eu) #}
  100.                 {#                            ou téléphone (022 519 70 34) pour toute question. <strong> A très bientôt !</strong> #}
  101.                 {#                        </p> #}
  102.                 {#                    </div> #}
  103.                 {#                {% endif %} #}
  104.                 {% block content %}
  105.                 {% endblock %}
  106.                 <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
  107.                      aria-hidden="true">
  108.                     <div class="modal-dialog modal-lg">
  109.                         <div class="modal-content">
  110.                             <div class="modal-header">
  111.                                 <h4 class="modal-title" id="myLargeModalLabel">Recherche rapide d'un prescripteur</h4>
  112.                                 <button type="button" class="btn-close" data-bs-dismiss="modal"
  113.                                         aria-hidden="true"></button>
  114.                             </div>
  115.                             <div class="modal-body">
  116.                             </div>
  117.                         </div><!-- /.modal-content -->
  118.                     </div><!-- /.modal-dialog -->
  119.                 </div><!-- /.modal -->
  120.                 <div class="modal fade" id="message-modal" tabindex="-1" aria-labelledby="contactModalLabel"
  121.                      aria-hidden="true">
  122.                     <div class="modal-dialog modal-dialog-centered">
  123.                         <div class="modal-content">
  124.                             {{ render(controller(
  125.                                 'App\\Controller\\MessageController::send'
  126.                             )) }}
  127.                         </div>
  128.                     </div>
  129.                 </div>
  130.             </div> <!-- container -->
  131.         </div> <!-- content -->
  132.         {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  133.             {{ include('partials/footer.html.twig') }}
  134.         {% endif %}
  135.     </div>
  136.     <!-- ============================================================== -->
  137.     <!-- End Page content -->
  138.     <!-- ============================================================== -->
  139. </div>
  140. <!-- END wrapper -->
  141. {# @@include('./partials/right-sidebar.html') #}
  142. {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  143.     {{ include('partials/right-sidebar.html.twig') }}
  144. {% endif %}
  145. {% block javascripts %}
  146.     {{ encore_entry_script_tags('app') }}
  147.     <script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/latest/jquery.min.js"></script>
  148.     <script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
  149.     <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
  150.     <!-- Datatables js -->
  151.     <script type="text/javascript"
  152.             src="https://cdn.datatables.net/v/bs5/dt-1.13.2/date-1.3.0/r-2.4.0/rg-1.3.0/datatables.min.js"></script>
  153.     {#    <script src="assets/vendor/datatables.net/js/jquery.dataTables.min.js"></script> #}
  154.     {#    <script src="assets/vendor/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script> #}
  155.     {#    <script src="assets/vendor/datatables.net-responsive/js/dataTables.responsive.min.js"></script> #}
  156.     {#    <script src="assets/vendor/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js"></script> #}
  157.     <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/dataTables.buttons.min.js"></script>
  158.     <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
  159.     <script type="text/javascript" src="https://cdn.datatables.net/buttons/1.6.2/js/buttons.html5.min.js"></script>
  160.     <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
  161.     <script src="https://cdn.datatables.net/plug-ins/1.10.25/sorting/datetime-moment.js"></script>
  162.     <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
  163.     <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
  164.     {# <script src="https://unpkg.com/tippy.js@6.3.1/dist/tippy-bundle.umd.js"></script> #}
  165.     <script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.20/summernote-lite.min.js"></script>
  166.     <script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.20/lang/summernote-fr-FR.min.js"
  167.             integrity="sha512-et98S/ky8BvCYlQFuj7FzPYsJ94+v4Cxyu1OJ92FDqwwZmxMpXqWf/VmBPLxHIfKUCQ5rrW60futO0nmtYsHcA=="
  168.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  169.     <script src="https://cdnjs.cloudflare.com/ajax/libs/dragula/3.6.6/dragula.min.js"
  170.             integrity="sha512-MrA7WH8h42LMq8GWxQGmWjrtalBjrfIzCQ+i2EZA26cZ7OBiBd/Uct5S3NP9IBqKx5b+MMNH1PhzTsk6J9nPQQ=="
  171.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  172.     <script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery.dotdotdot/4.1.0/dotdotdot.js"
  173.             integrity="sha512-y3NiupaD6wK/lVGW0sAoDJ0IR2f3+BWegGT20zcCVB+uPbJOsNO2PVi09pCXEiAj4rMZlEJpCGu6oDz0PvXxeg=="
  174.             crossorigin="anonymous" referrerpolicy="no-referrer"></script>
  175.     <script src="{{ asset('bundles/fosjsrouting/js/router.min.js') }}"></script>
  176.     <script src="{{ path('fos_js_routing_js', {'callback': 'fos.Router.setData'}) }}"></script>
  177.     <script>
  178.         document.getElementById('message-form').addEventListener('submit', function (event) {
  179.             event.preventDefault();
  180.             const formData = new FormData(event.target);
  181.             const xhr = new XMLHttpRequest();
  182.             xhr.open('POST', '{{ path('app_message_send') }}', true);
  183.             xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
  184.             xhr.onload = function () {
  185.                 if (xhr.status >= 200 && xhr.status < 400) {
  186.                     // Le traitement de la réponse du serveur peut être effectué ici, par exemple, afficher un message de succès
  187.                     // console.log(xhr.responseText);
  188.                     // Parser la réponse JSON
  189.                     const jsonResponse = JSON.parse(xhr.responseText);
  190.                     // Afficher le message de succès
  191.                     // alert(jsonResponse.message);
  192.                     // Toastify({
  193.                     //     heading: 'Positioning',
  194.                     //     text: 'Use the predefined ones, or specify a custom position object.',
  195.                     //     position: {
  196.                     //         left: 120,
  197.                     //         top: 120
  198.                     //     },
  199.                     //     stack: false
  200.                     // })
  201.                     //
  202.                     // Toastify({
  203.                     //     heading: 'Information',
  204.                     //     text: 'Loaders are enabled by default. Use `loader`, `loaderBg` to change the default behavior',
  205.                     //     icon: 'info',
  206.                     //     loader: true,        // Change it to false to disable loader
  207.                     //     loaderBg: '#9EC600'  // To change the background
  208.                     // })
  209.                     // Afficher le message de succès
  210.                     Toastify({
  211.                         text: jsonResponse.message,
  212.                         duration: 5000,
  213.                         close: true,
  214.                         gravity: 'top',
  215.                         position: 'right ',
  216.                         loader: true,
  217.                         offset: {
  218.                             x: 20,
  219.                             y: 80
  220.                         },
  221.                         // backgroundColor: 'linear-gradient(to right, #00b09b, #96c93d)',
  222.                     }).showToast();
  223.                     // On vide les champs du formulaire
  224.                     $('#message_subject').val('');
  225.                     $('#message_body').val('');
  226.                     // Fermer la fenêtre modale en cas de succès
  227.                     $('#message-modal').modal('hide');
  228.                 } else {
  229.                     console.error('Erreur lors de la soumission du formulaire.');
  230.                 }
  231.             };
  232.             xhr.onerror = function () {
  233.                 console.error('Erreur lors de la soumission du formulaire.');
  234.             };
  235.             xhr.send(formData);
  236.         });
  237.     </script>
  238.     {% if is_granted('ROLE_PRESCRIBER_VIEW') %}
  239.     <script>
  240.         $(function () {
  241.             function checkAuthenticationAndOpenModal() {
  242.                 $.get('{{ path('check_authentication') }}', function (data) {
  243.                     if (data.isAuthenticated) {
  244.                         openModalAndFocusSearch();
  245.                     } else {
  246.                         window.location.href = '{{ path('app_home') }}'; // Redirection vers la page d'accueil
  247.                     }
  248.                 });
  249.             }
  250.             function openModalAndFocusSearch() {
  251.                 $('#myModal').on('shown.bs.modal', function () {
  252.                     $('#searchPrescriber').focus();
  253.                 });
  254.                 $.get($('a[data-modal]').attr('href'), function (data) {
  255.                     $('#myModal .modal-body').html(data);
  256.                     $('#myModal').removeClass('fade'); // Supprimer la classe fade pour ne pas avoir d'animation
  257.                     $('#myModal').modal('show');
  258.                 });
  259.             }
  260.             $('a[data-modal]').on('click', function (event) {
  261.                 event.preventDefault();
  262.                 checkAuthenticationAndOpenModal();
  263.             });
  264.             $(document).keydown(function (event) {
  265.                 if (event.which === 113) {
  266.                     event.preventDefault();
  267.                     checkAuthenticationAndOpenModal();
  268.                 }
  269.             });
  270.         });
  271.     </script>
  272.     {% endif %}
  273.     {#    <script> #}
  274.     {#        document.getElementById('message-form').addEventListener('submit', function(event) { #}
  275.     {#            event.preventDefault(); #}
  276.     {#            const formData = new FormData(event.target); #}
  277.     {#            const xhr = new XMLHttpRequest(); #}
  278.     {#            xhr.open('POST', '{{ path('app_message_send') }}', true); #}
  279.     {#            xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); #}
  280.     {#            xhr.onload = function() { #}
  281.     {#                if (xhr.status >= 200 && xhr.status < 400) { #}
  282.     {#                    // Le traitement de la réponse du serveur peut être effectué ici, par exemple, afficher un message de succès #}
  283.     {#                    console.log(xhr.responseText); #}
  284.     {#                } else { #}
  285.     {#                    console.error('Erreur lors de la soumission du formulaire.'); #}
  286.     {#                } #}
  287.     {#            }; #}
  288.     {#            xhr.onerror = function() { #}
  289.     {#                console.error('Erreur lors de la soumission du formulaire.'); #}
  290.     {#            }; #}
  291.     {#            xhr.send(formData); #}
  292.     {#        }); #}
  293.     {#    </script> #}
  294. {% endblock %}
  295. </body>
  296. </html>