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.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.     <meta name="description" content="">
  8.     <meta name="author" content="">
  9.     <title>{%  block title %}louvreBible, gestion{% endblock %}</title>
  10.     
  11.     <!-- Scripts for this template-->
  12.     <script type="text/javascript" src="{{ asset('ext/jquery/jquery-3.6.0.min.js') }}"></script>
  13.     <!-- MOMENT JS -->
  14.     <script src="https://momentjs.com/downloads/moment.min.js"></script>
  15.     <!-- BOOTBOX -->
  16.     <script src="{{ asset('ext/bootbox/bootbox.min.js') }}"></script>
  17.     <script src="{{ asset('ext/bootbox/bootbox.locales.min.js') }}"></script>
  18.     {%  block tinymce %}{% endblock %}
  19.     
  20.     <!-- Custom fonts for this template-->
  21.     <link href="{{ asset('/fonts/fontawesome-free-5.15.4-web/css/all.css') }}" rel="stylesheet" type="text/css">
  22.     <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
  23.     <link rel="icon" type="image/ico" href="{{ asset('/img/favicon.ico') }}">
  24.     
  25.     <!-- Custom styles for this template-->
  26.     <link href="{{ asset('css/sb-admin-2.min.css') }}" rel="stylesheet">
  27.     <link href="{{ asset('css/styles.css') }}" rel="stylesheet">
  28.     <!-- plugin upload fichiers -->
  29.     <link href="{{ asset('/vendor/jquery-fancyfileuploader-master/fancy-file-uploader/fancy_fileupload.css') }}" rel="stylesheet" type="text/css">
  30. </head>
  31. {% if is_granted('IS_AUTHENTICATED_FULLY') %}
  32. <body id="page-top">
  33. {% if nomenu is not defined %}
  34.     <!-- Page Wrapper -->
  35.     <div id="wrapper">
  36.         <!-- Sidebar -->
  37.         <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar" style="min-height: calc ( 100vh - 200px );background-color:black;">
  38.             <!-- Sidebar - Brand -->
  39.             <a class="sidebar-brand d-flex align-items-center justify-content-center" href="{{ path('homepage') }}">
  40.                 <div class="sidebar-brand-icon">
  41.                     <img src="{{ asset('/img/logo-mattmann.png') }}" height=60>
  42.                 </div>
  43.                 <div class="sidebar-brand-text ml-2 mr-3">LOUVREBIBLE</div>
  44.             </a>
  45.             <!-- Divider -->
  46.             <hr class="sidebar-divider my-0">
  47.             <li class="nav-item py-0">
  48.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'article_index' %}active{% endif %}" href="{{ path('article_index') }}">
  49.                     <i class="far fa-file fa-2x text-gray-300 fa-fw"></i>
  50.                     <span>Articles</span></a>
  51.             </li>
  52.             <li class="nav-item py-0">
  53.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'emplacement_index' %}active{% endif %}" href="{{ path('emplacement_index') }}">
  54.                     <i class="fas fa-map-marked fa-2x text-gray-300 fa-fw"></i>
  55.                     <span>Emplacements</span></a>
  56.             </li>
  57.             
  58.             {% if is_granted('ROLE_ADMIN') %}
  59.             <li class="nav-item py-0">
  60.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'rubrique_index' %}active{% endif %}" href="{{ path('rubrique_index') }}">
  61.                     <i class="fas fa-folder-open fa-2x text-gray-300 fa-fw"></i>
  62.                     <span>Rubriques</span></a>
  63.             </li>
  64.             {% endif %}
  65.             
  66.             <li class="nav-item py-0">
  67.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'newsletter_index' %}active{% endif %}" href="{{ path('newsletter_index') }}">
  68.                     <i class="fas fa-paper-plane fa-2x text-gray-300 fa-fw"></i>
  69.                     <span>Newsletters</span></a>
  70.             </li>
  71.             <li class="nav-item py-0">
  72.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'verset_index' %}active{% endif %}" href="{{ path('verset_index') }}">
  73.                     <i class="far fa-gem fa-2x text-gray-300 fa-fw"></i>
  74.                     <span>Versets</span></a>
  75.             </li>
  76.             <li class="nav-item py-0">
  77.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'note_index' %}active{% endif %}" href="{{ path('note_index') }}">
  78.                     <i class="far fa-comment-alt fa-2x text-gray-300 fa-fw"></i>
  79.                     <span>Notes</span></a>
  80.             </li>
  81.             
  82.             <li class="nav-item py-0">
  83.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'bibliographie_index' %}active{% endif %}" href="{{ path('bibliographie_index') }}">
  84.                     <i class="fas fa-book fa-2x text-gray-300 fa-fw"></i>
  85.                     <span>Bibliographie</span></a>
  86.             </li>
  87.             
  88.             <li class="nav-item py-0">
  89.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'glossaire_index' %}active{% endif %}" href="{{ path('glossaire_index') }}">
  90.                     <i class="fas fa-spell-check fa-2x text-gray-300 fa-fw"></i>
  91.                     <span>Glossaire</span></a>
  92.             </li>
  93.             
  94.             <li class="nav-item py-0">
  95.                <a class="nav-link {%if app.request.attributes.get('_route') == 'galerie_index' %}active{% endif %}" href="{{ path('galerie_index') }}">
  96.                     <i class="fas fa-images fa-2x text-gray-300 fa-fw"></i>
  97.                     <span>Galerie</span></a>
  98.             </li>
  99.             
  100.             <li class="nav-item py-0">
  101.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'contacts_index' %}active{% endif %}" href="{{ path('contacts_index') }}">
  102.                     <i class="fas fa-user fa-2x text-gray-300 fa-fw"></i>
  103.                     <span>Contacts</span></a>
  104.             </li>
  105.             {% if is_granted('ROLE_SUPERADMIN') %}
  106.             <!-- Divider -->
  107.             <hr class="sidebar-divider">
  108.             <li class="nav-item">
  109.                 <a class="nav-link {%if app.request.attributes.get('_route') == 'liste_utilisateurs' or app.request.attributes.get('_route') == 'user_service_index'  or app.request.attributes.get('_route') == 'liste_roles'  %}active{% endif %} collapsed" href="#" data-toggle="collapse" data-target="#menuAdministration"
  110.                     aria-expanded="true" aria-controls="menuAdministration">
  111.                     <i class="fas fa-fw fa-cog fa-2x text-gray-300"></i><span>Administration</span></a>
  112.                 <div id="menuAdministration" class="collapse" data-parent="">
  113.                 <div class='bg-taupe py-2 collapse-inner rounded'>
  114.                     <a class="collapse-item" href="{{ path('liste_utilisateurs') }}"><i class="fas fa-user"></i> Utilisateurs<span class="sr-only"></span></a>
  115.                     <a class="collapse-item" href="{{ path('liste_roles') }}"><i class="fas fa-user-shield"></i> Roles<span class="sr-only"></span></a>
  116.                 </div>
  117.                 </div>
  118.             </li>
  119.             {% endif %}
  120.  
  121.             <!-- Sidebar Toggler (Sidebar) -->
  122.             <div class="text-center d-none d-md-inline mt-4">
  123.                 <button class="rounded-circle border-0" id="sidebarToggle"></button>
  124.             </div>
  125.         </ul>
  126.         <!-- End of Sidebar -->
  127.         <!-- Content Wrapper -->
  128.         <div id="content-wrapper" class="d-flex flex-column">
  129.             <!-- Main Content -->
  130.             <div id="content">
  131.                 <!-- Topbar -->
  132.                 <nav class="navbar navbar-expand navbar-light bg-taupe topbar mb-4 static-top shadow">
  133.                     <!-- Sidebar Toggle (Topbar) -->
  134.                     <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
  135.                         <i class="fa fa-bars"></i>
  136.                     </button>
  137.                     <div id="titlenav"></div>
  138.                     <!-- Topbar Navbar -->
  139.                     <ul class="navbar-nav ml-auto">
  140.                         <div class="topbar-divider d-none d-sm-block"></div>
  141.                         <!-- Nav Item - User Information -->
  142.                         <li class="nav-item dropdown no-arrow">
  143.                             <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  144.                                 <span class="mr-2 d-none d-lg-inline text-white small">{{ app.user.username }}</span>
  145.                                 <img class="img-profile rounded-circle" src="{{ asset('img/undraw_profile.svg') }}">
  146.                             </a>
  147.                             <!-- Dropdown - User Information -->
  148.                             <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
  149.                                 <a class="dropdown-item" href="#">
  150.                                     <i class="far fa-id-badge fa-sm fa-fw mr-2 text-gray-400"></i>
  151.                                     Profil <span>{{ app.user.name }}</span> <!--class="libHierarchyLevel" -->
  152.                                     <!-- <input type="hidden" class="cdHierarchyLevel" value="AG"> -->
  153.                                 </a>
  154.                                 <div class="dropdown-divider"></div>
  155.                                 <a class="dropdown-item" href="" data-toggle="modal" data-target="#logoutModal">
  156.                                     <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
  157.                                     Déconnexion
  158.                                 </a>
  159.                             </div>
  160.                         </li>
  161.                     </ul>
  162.                 </nav>
  163.                 <!-- End of Topbar -->
  164.                 
  165.                 <div id="status-area" style="position:fixed;margin-top:0px;margin-left:0px;z-index:9999"></div>
  166.                 
  167.                 <div class="m-3">
  168.                 {% block body %}{% endblock %}
  169.                 {% block content %}{% endblock %}
  170.                 </div>
  171.             </div>
  172.             <!-- End of Main Content -->
  173.             <!-- Footer -->
  174.             <footer class="sticky-footer">
  175.                 <div class="container my-auto">
  176.                     <div class="copyright text-center my-auto d-flex flex-row align-items-center justify-content-center">
  177.                         <div style="border-radius:50%;height:50px;width:50px;padding-top:3px;"><img class="sidebar-card-illustration" src="{{ asset('/img/logo-mattmann.png') }}" alt="LouvreBible" height="40"></div>
  178.                         <span class="text-primary ml-2">Copyright © LouvreBible {{ 'now'|date('Y') }}</span>
  179.                     </div>
  180.                 </div>
  181.             </footer>
  182.             <!-- End of Footer -->
  183.         </div>
  184.         <!-- End of Content Wrapper -->
  185.     </div>
  186.     <!-- End of Page Wrapper -->
  187.     <!-- Scroll to Top Button-->
  188.     <a class="scroll-to-top rounded" href="#page-top">
  189.         <i class="fas fa-angle-up"></i>
  190.     </a>
  191.     <!-- Logout Modal-->
  192.     <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="logoutModalLabel" aria-hidden="true">
  193.         <div class="modal-dialog" role="document">
  194.             <div class="modal-content">
  195.                 <div class="modal-header">
  196.                     <h5 class="modal-title" id="logoutModalLabel">Prêt à quitter ?</h5>
  197.                     <button class="close" type="button" data-dismiss="modal" aria-label="Close">
  198.                         <span aria-hidden="true">×</span>
  199.                     </button>
  200.                 </div>
  201.                 <div class="modal-body">Vous souhaitez réellement quitter l'application ?</div>
  202.                 <div class="modal-footer">
  203.                     <button class="btn btn-light" type="button" data-dismiss="modal">Annuler</button>
  204.                     <a class="btn btn-danger" href="{{ path('app_logout') }}">Déconnecter</a>
  205.                 </div>
  206.             </div>
  207.         </div>
  208.     </div>
  209. {% else %}            
  210.     <div id="status-area" style="position:fixed;margin-top:0px;margin-left:0px;z-index:9999"></div>                
  211.     <div class="m-3">
  212.     {% block nomenu %}{% endblock %}
  213.     </div>
  214.  {% endif %}
  215.     <!-- Bootstrap core JavaScript-->
  216.     <!--script src="{{ asset('vendor/jquery/jquery.min.js') }}"></script-->
  217.     <script src="{{ asset('vendor/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
  218.     <script src="{{ asset('vendor/jquery-easing/jquery.easing.min.js') }}"></script>
  219.     
  220.     <!-- Custom scripts for all pages-->
  221.     <script src="{{ asset('js/sb-admin-2.min.js') }}"></script>
  222.     <!--script src="{{ asset('vendor/chart.js/Chart.min.js') }}"></script-->
  223.     <!--script src="{{ asset('js/demo/chart-area-demo.js') }}"></script>
  224.     <script src="{{ asset('js/demo/chart-pie-demo.js') }}"></script-->
  225.     <!-- <script src="{{ asset('ext/ckeditor/ckeditor5-build-custom/build/ckeditor.js') }}"></script> -->
  226.     <link rel="stylesheet" href="{{ asset('ext/bootstrap-table-master/dist/bootstrap-table.min.css') }}">
  227.     <script src="{{ asset('ext/bootstrap-table-master/dist/bootstrap-table.min.js') }}"></script>
  228.     <script src="{{ asset('ext/bootstrap-table-master/dist/locale/bootstrap-table-fr-FR.min.js') }}"></script>
  229.     <script src="https://unpkg.com/bootstrap-table@1.19.1/dist/extensions/filter-control/bootstrap-table-filter-control.min.js"></script>
  230.     <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js" 
  231.             integrity="sha512-T/tUfKSV1bihCnd+MxKD0Hm1uBBroVYBOYSk1knyvQ9VyZJpc/ALb4P0r6ubwVPSGB2GvjeoMAJJImBG12TiaQ==" 
  232.             crossorigin="anonymous"
  233.             referrerpolicy="no-referrer">
  234.     </script>
  235.     
  236. </body>
  237. {% else %}
  238.     {% include('login.html.twig')%}
  239. {% endif %}
  240. <script type="text/javascript">
  241.     
  242.     
  243.     function dateFormat(value, row, index) {
  244.         //console.log(value);
  245.         //console.log(moment(value).format('DD/MM/YYYY'));
  246.         if ( value == "" || value == null ) return value;
  247.        return moment(value.date).format('DD/MM/YYYY');
  248.     }
  249.     function dateFormatHour(value, row, index) {
  250.         if ( value == "" || value == null ) return value;
  251.         //console.log(value);
  252.         //console.log(moment(value).format('DD/MM/YYYY'));
  253.        return moment(value.date).format('DD/MM/YYYY HH:mm');
  254.     }
  255.     (function($) {
  256.         $.fn.flash_message = function(options) {
  257.           
  258.             options = $.extend({
  259.             text: 'Done',
  260.             time: 3000,
  261.             how: 'before',
  262.             class_name: ''
  263.             }, options);
  264.           
  265.             return $(this).each(function() {
  266.                 if( $(this).parent().find('.flash_message').get(0) )
  267.                   return;
  268.                 var message = $('<span />', {
  269.                   'class': 'flash_message ' + options.class_name,
  270.                   text: options.text
  271.                 }).hide().fadeIn('fast');
  272.                 $(this)[options.how](message);
  273.                 message.delay(options.time).fadeOut('normal', function() {
  274.                   $(this).remove();
  275.                 });
  276.             });
  277.         };
  278.     })(jQuery);    
  279.     
  280.     $( document ).ready(function() {
  281.         bootbox.setLocale('fr');
  282.         {% block document_ready %}{% endblock %}
  283.     });    
  284. </script>
  285. {% block scripts_end %}{% endblock %}
  286. </html>