2
0
stany.ferer 1 жил өмнө
parent
commit
be11c5f18e

+ 3 - 1
core/class/git.class.php

@@ -22,7 +22,9 @@ class git
 
     public static function printVersion(){
         echo sprintf(
-            '<h6>%s <span class="badge bg-success">%s</h6></div><div>%s (%s)</div>',
+            '<h6>%s <span class="badge bg-success">%s</span></h6>
+            <code>%s</code>
+            <div class="media-body pb-3 mb-0 small lh-125">Le %s</div>',         
             self::getCommitAuthor(), 
             self::getCommitHash(),
             self::getCommitName(),

+ 57 - 0
core/views/pages/cms.parametres-debug.php

@@ -0,0 +1,57 @@
+<table class="table table-bordered">
+<tbody>
+    <tr>
+        <th scope="row">
+            <h4>Rechargement</h4>
+                <div class="element-parametres">
+                    <a href="/submit.php?from=parametres-json-refresh" onclick="return confirm('Etes-vous certain de vouloir réinitialiser les JSON ?')"><button type="button" class="btn btn-warning">Réinitialisation des JSON</button></a>
+                </div>
+
+                <?php if (session::accessUserByType(1) and session::getId() == 1 and (ENVIRONNEMENT == "DEV" or ENVIRONNEMENT == "PREPROD")) { ?>
+
+                <h4>Développement</h4>
+                <div class="element-parametres">
+                    <a href="/submit.php?from=parametres-reset-datas" onclick="return confirm('Etes-vous certain de vouloir supprimer les données ?')"><button type="button" class="btn btn-danger">Nettoyer les données</button></a>
+                </div>
+                <div class="element-parametres">
+                    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modalPHPInfo">PHP Infos</button>
+                </div>
+
+                <div class="modal fade" id="modalPHPInfo" tabindex="-1" role="dialog" aria-hidden="true">
+                    <div class="modal-dialog" role="document">
+                        <div class="modal-content">
+                            <div class="modal-header">
+                                <h5 class="modal-title" id="exampleModalLabel">PHP Info</h5>
+                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
+                                    <span aria-hidden="true">&times;</span>
+                                </button>
+                            </div>
+                            <div class="modal-body">
+                                <iframe width="970" height="800" src="/parametres-debug-info.vue"></iframe>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+
+                <?php } ?>
+        </th>
+        <td>
+            <div class="element-parametres">
+                <?php git::printVersion() ?>
+            </div>
+        </td>
+    </tr>
+    </tbody>
+</table>
+
+<script>
+    $(document).ready(function() {
+        $('#modalPHPInfo').on('show.bs.modal', function() {
+            $(this).find('.modal-body').css({
+                width: 'auto', //probably not needed
+                height: 'auto', //probably not needed 
+                'max-height': '100%'
+            });
+        });
+    });
+</script>

+ 0 - 76
core/views/pages/cms.parametres-general.php

@@ -33,45 +33,6 @@
     <label class="form-check-label" for="checkLogError">Historiser les actions en erreur</label>
 </div>
 
-<h4>Rechargement</h4>
-<div class="element-parametres">
-    <a href="/submit.php?from=parametres-json-refresh" onclick="return confirm('Etes-vous certain de vouloir réinitialiser les JSON ?')"><button type="button" class="btn btn-warning">Réinitialisation des JSON</button></a>
-</div>
-
-
-<?php if (session::accessUserByType(1) and session::getId() == 1 and (ENVIRONNEMENT == "DEV" or ENVIRONNEMENT == "PREPROD")) { ?>
-
-    <h4>Développement</h4>
-    <div class="element-parametres">
-        <a href="/submit.php?from=parametres-reset-datas" onclick="return confirm('Etes-vous certain de vouloir supprimer les données ?')"><button type="button" class="btn btn-warning">Nettoyer les données</button></a>
-    </div>
-    <div class="element-parametres">
-        <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#modalPHPInfo">PHP Infos</button>
-    </div>
-
-    <div class="modal fade" id="modalPHPInfo" tabindex="-1" role="dialog" aria-hidden="true">
-        <div class="modal-dialog" role="document">
-            <div class="modal-content">
-                <div class="modal-header">
-                    <h5 class="modal-title" id="exampleModalLabel">PHP Info</h5>
-                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
-                        <span aria-hidden="true">&times;</span>
-                    </button>
-                </div>
-                <div class="modal-body">
-                    <iframe width="970" height="800" src="/parametres-debug-info.vue"></iframe>
-                </div>
-            </div>
-        </div>
-    </div>
-
-<?php } ?>
-
-    <h4>Git</h4>
-    <div class="element-parametres">
-        <?php git::printVersion() ?>
-    </div>
-
 <script>
     $(document).ready(function() {
         $('#checkMaintenance').on('change', function() {
@@ -93,42 +54,5 @@
         $('#checkLogError').on('change', function() {
             window.location.href = "/submit.php?from=parametres-config&name=LOG_ERROR&value=" + $("#checkLogError").prop('checked');
         });
-
-        $('#modalPHPInfo').on('show.bs.modal', function() {
-            $(this).find('.modal-body').css({
-                width: 'auto', //probably not needed
-                height: 'auto', //probably not needed 
-                'max-height': '100%'
-            });
-        });
     });
 </script>
-
-<style>
-    h4 {
-        margin-top: 15px;
-    }
-
-    .element-parametres {
-        margin-top: 5px;
-    }
-
-    .modal-body {
-        position: relative;
-        overflow-y: auto;
-        max-height: 400px;
-        padding: 15px;
-    }
-
-    .modal-dialog{
-        width: 1005px !important;
-    }
-
-    .modal {
-        --bs-modal-width: none;
-    }
-
-    .autoModal.modal .modal-body {
-        max-height: 100%;
-    }
-</style>

+ 46 - 2
core/views/pages/cms.parametres.php

@@ -28,7 +28,10 @@ echo core::filAriane(array(
             <a class="nav-link" data-toggle="tab" id="users-tab" role="tab" aria-selected="">Utilisateurs</a>
         </li>
         <li class="nav-item">
-            <a class="nav-link" data-toggle="tab" id="backup-tab" role="tab" aria-selected="">Backup et restauration</a>
+            <a class="nav-link" data-toggle="tab" id="backup-tab" role="tab" aria-selected="">Backup & restauration</a>
+        </li> 
+        <li class="nav-item">
+            <a class="nav-link" data-toggle="tab" id="debug-tab" role="tab" aria-selected="">Debug & développement</a>
         </li> 
     </ul>
 <br />
@@ -43,6 +46,9 @@ echo core::filAriane(array(
     <div id="tab-backup" style="display: none;">
         <?php get::page("parametres-restore") ?>
     </div>
+    <div id="tab-debug" style="display: none;">
+        <?php get::page("parametres-debug") ?>
+    </div>
 </div>
 
 <script>
@@ -51,16 +57,54 @@ echo core::filAriane(array(
             $("#tab-general").show();
             $("#tab-users").hide();
             $("#tab-backup").hide();
+            $("#tab-debug").hide();
         }); 
         $("#users-tab").click(function() {
             $("#tab-general").hide();
             $("#tab-users").show();
             $("#tab-backup").hide();
+            $("#tab-debug").hide();
         });  
         $("#backup-tab").click(function() {
             $("#tab-general").hide();
             $("#tab-users").hide();
             $("#tab-backup").show();
+            $("#tab-debug").hide();
+        });
+        $("#debug-tab").click(function() {
+            $("#tab-general").hide();
+            $("#tab-users").hide();
+            $("#tab-backup").hide();
+            $("#tab-debug").show();
         });
     })
-</script>
+</script>
+
+<style>
+    h4 {
+        margin-top: 15px;
+    }
+
+    .element-parametres {
+        margin-top: 5px;
+    }
+
+    .modal-body {
+        position: relative;
+        overflow-y: auto;
+        max-height: 400px;
+        padding: 15px;
+    }
+
+    .modal-dialog{
+        width: 1005px !important;
+    }
+
+    .modal {
+        --bs-modal-width: none;
+    }
+
+    .autoModal.modal .modal-body {
+        max-height: 100%;
+    }
+</style>