templates/app/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <title>{% block title %}Flash Énergie{% endblock %}</title>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1" />
  7. <link rel="shortcut icon" href="/assets/media/logos/favicon.ico" />
  8. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,600,700" />
  9. <link href="/assets/plugins/custom/fullcalendar/fullcalendar.bundle.css" rel="stylesheet" type="text/css" />
  10. <link href="/assets/plugins/custom/datatables/datatables.bundle.css" rel="stylesheet" type="text/css" />
  11. <link rel="stylesheet" href="/assets/css/style.bundle.css">
  12. <link href="/assets/plugins/global/plugins.bundle.css" rel="stylesheet" type="text/css" />
  13. <link href="/assets/css/style.bundle.css" rel="stylesheet" type="text/css" />
  14. <link href="/assets/css/style.css?v=0.0.1" rel="stylesheet" type="text/css" />
  15. {% block stylesheets %}{% endblock %}
  16. </head>
  17. <body id="kt_body" class="header-fixed header-tablet-and-mobile-fixed toolbar-enabled">
  18. <div class="d-flex flex-column flex-root">
  19. <div class="page d-flex flex-row flex-column-fluid">
  20. <div class="wrapper d-flex flex-column flex-row-fluid" id="kt_wrapper">
  21. {% include("app/includes/navbar.html.twig") %}
  22. <div class="container-xxl">
  23. {% include("includes/messages.html.twig") %}
  24. </div>
  25. <div id="kt_content_container" class="d-flex flex-column-fluid align-items-start container-xxl">
  26. {% block body %}{% endblock %}
  27. </div>
  28. {% include('app/includes/footer.html.twig') %}
  29. </div>
  30. </div>
  31. </div>
  32. <div id="kt_scrolltop" class="scrolltop" data-kt-scrolltop="true">
  33. <span class="svg-icon">
  34. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
  35. <rect opacity="0.5" x="13" y="6" width="13" height="2" rx="1" transform="rotate(90 13 6)" fill="black" />
  36. <path d="M12.5657 8.56569L16.75 12.75C17.1642 13.1642 17.8358 13.1642 18.25 12.75C18.6642 12.3358 18.6642 11.6642 18.25 11.25L12.7071 5.70711C12.3166 5.31658 11.6834 5.31658 11.2929 5.70711L5.75 11.25C5.33579 11.6642 5.33579 12.3358 5.75 12.75C6.16421 13.1642 6.83579 13.1642 7.25 12.75L11.4343 8.56569C11.7467 8.25327 12.2533 8.25327 12.5657 8.56569Z" fill="black" />
  37. </svg>
  38. </span>
  39. </div>
  40. <script>var hostUrl = "/assets/";</script>
  41. <script src="/assets/plugins/global/plugins.bundle.js"></script>
  42. <script src="/assets/js/scripts.bundle.js"></script>
  43. <script src="/assets/plugins/custom/fullcalendar/fullcalendar.bundle.js"></script>
  44. <script src="/assets/plugins/custom/datatables/datatables.bundle.js"></script>
  45. <script src="/assets/js/widgets.bundle.js"></script>
  46. <script src="/assets/js/custom/widgets.js"></script>
  47. <script src="/assets/js/custom/apps/chat/chat.js"></script>
  48. <script src="/assets/js/custom/utilities/modals/create-campaign.js"></script>
  49. <script src="/assets/js/custom/utilities/modals/users-search.js"></script>
  50. {% block javascripts %}
  51. <script>
  52. (function() {
  53. var datatable = $('#datatable');
  54. var datatableAsync = $('#datatable-async');
  55. var datatableSearch = $('#datatable-search');
  56. if (datatable) {
  57. var datatableObj = datatable.DataTable({
  58. "language": {
  59. "lengthMenu": "Afficher _MENU_ résultats",
  60. "zeroRecords": "Pas de données",
  61. "info": "Page _PAGE_ sur _PAGES_",
  62. "infoEmpty": "Pas de données",
  63. "infoFiltered": "(filtered from _MAX_ total records)",
  64. "search": "Rechercher",
  65. "paginate": {
  66. "previous": "Précédent",
  67. "next": "Suivant"
  68. }
  69. },
  70. "order": [],
  71. "stateSave": true,
  72. "stateSaveCallback": function (settings, data) {
  73. localStorage.setItem("fc_filterSettings_"+window.location.href, JSON.stringify(data));
  74. },
  75. "stateLoadCallback": function (settings) {
  76. return JSON.parse(localStorage.getItem("fc_filterSettings_"+window.location.href));
  77. },
  78. });
  79. if (datatableSearch) {
  80. datatableSearch.on('keyup click', function () {
  81. datatableObj.search(datatableSearch.val()).draw();
  82. } );
  83. }
  84. }
  85. if (datatableAsync) {
  86. var datatableAsyncObj = datatableAsync.DataTable({
  87. "language": {
  88. "lengthMenu": "Afficher _MENU_ résultats",
  89. "zeroRecords": "Pas de données",
  90. "info": "Page _PAGE_ sur _PAGES_",
  91. "infoEmpty": "Pas de données",
  92. "infoFiltered": "(filtered from _MAX_ total records)",
  93. "search": "Rechercher",
  94. "paginate": {
  95. "previous": "Précédent",
  96. "next": "Suivant"
  97. }
  98. },
  99. "dom": 'rtip',
  100. "paging": false,
  101. "info": false,
  102. "order": [],
  103. "stateSave": true,
  104. "stateSaveCallback": function (settings, data) {
  105. localStorage.setItem("fc_filterSettings_"+window.location.href, JSON.stringify(data));
  106. },
  107. "stateLoadCallback": function (settings) {
  108. return JSON.parse(localStorage.getItem("fc_filterSettings_"+window.location.href));
  109. },
  110. });
  111. if (datatableSearch) {
  112. datatableSearch.on('keydown', function (event) {
  113. if (event.key === 'Enter') {
  114. const searchValue = $(this).val().trim();
  115. const currentUrl = new URL(window.location.href);
  116. currentUrl.searchParams.delete('page');
  117. if (searchValue) {
  118. currentUrl.searchParams.set('search', searchValue);
  119. window.location.href = currentUrl.toString();
  120. } else {
  121. currentUrl.searchParams.delete('search');
  122. window.location.href = currentUrl.toString();
  123. }
  124. }
  125. });
  126. }
  127. }
  128. })();
  129. </script>
  130. <script>
  131. async function getCompanyInfo(elSiret, elRaisonSociale, elCodeNaf, elSecteurActivite, elAdresse, elAdresse2, elCodePostal, elVille) {
  132. if (!elSiret || !elSiret.value) {
  133. alert("Veuillez spécifier un numéro SIRET");
  134. return;
  135. }
  136. try {
  137. const response = await fetch("/external-api/pappers/search?q=" + encodeURI(elSiret.value));
  138. if (response.ok) {
  139. const json = await response.json();
  140. if (!json || json.length === 0) {
  141. alert("Aucune entreprise trouvée avec ce SIRET.");
  142. return;
  143. }
  144. var company = json[0];
  145. if (elRaisonSociale) {
  146. elRaisonSociale.value = company.denomination;
  147. }
  148. if (elCodeNaf) {
  149. elCodeNaf.value = company.code_naf;
  150. }
  151. if (elSecteurActivite) {
  152. elSecteurActivite.value = company.libelle_code_naf;
  153. }
  154. if (company.siege) {
  155. if (elAdresse) {
  156. elAdresse.value = company.siege.adresse_ligne_1;
  157. }
  158. if (elAdresse2) {
  159. elAdresse2.value = company.siege.adresse_ligne_2;
  160. }
  161. if (elCodePostal) {
  162. elCodePostal.value = company.siege.code_postal;
  163. }
  164. if (elVille) {
  165. elVille.value = company.siege.ville;
  166. }
  167. }
  168. } else {
  169. alert("Une erreur est survenue lors de la récupération des informations à partir du SIRET");
  170. }
  171. } catch (error) {
  172. console.error(error.message);
  173. alert("Une erreur est survenue lors de la récupération des informations à partir du SIRET");
  174. }
  175. }
  176. async function getNafInfo(elCodeNaf, elLibelle) {
  177. if (!elCodeNaf || !elCodeNaf.value) {
  178. alert("Veuillez spécifier un code NAF");
  179. return;
  180. }
  181. try {
  182. const response = await fetch("/naf/search?code=" + encodeURI(elCodeNaf.value));
  183. if (response.ok) {
  184. const json = await response.json();
  185. if (json.success == false) {
  186. alert("Aucune libellé trouvé avec ce code NAF.");
  187. return;
  188. }
  189. elLibelle.value = json.libelle;
  190. } else {
  191. alert("Une erreur est survenue lors de la récupération du libellé du code NAF");
  192. }
  193. } catch (error) {
  194. console.error(error.message);
  195. alert("Une erreur est survenue lors de la récupération du libellé du code NAF");
  196. }
  197. }
  198. </script>
  199. {% endblock %}
  200. </body>
  201. </html>