aboutsummaryrefslogtreecommitdiff
path: root/src/view/MenuBuilder.php
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-10-26 22:48:49 +0100
committerpolo <ordipolo@gmx.fr>2025-10-26 22:48:49 +0100
commit959527bb712fcd05351d8b4b52ff17786baad454 (patch)
tree459f66a07e443a971930e5aa3bce257c33079f20 /src/view/MenuBuilder.php
parente73ea91a5999dc2cbadc00dfda18c839ef1a158b (diff)
downloadcms-959527bb712fcd05351d8b4b52ff17786baad454.zip
modification du nom et plus seulement de l'URL des entrées "URL" du menu, header/footer: renommage de classes et input absents du HTML sans être adminHEADmain
Diffstat (limited to 'src/view/MenuBuilder.php')
-rw-r--r--src/view/MenuBuilder.php26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/view/MenuBuilder.php b/src/view/MenuBuilder.php
index 12298cf..8e8b9a9 100644
--- a/src/view/MenuBuilder.php
+++ b/src/view/MenuBuilder.php
@@ -55,32 +55,26 @@ class MenuBuilder extends AbstractBuilder
55 <img class="move_entry_icon" onclick="switchMenuPositions(' . $entry->getId() . ', \'down\')" src="assets/arrow-down.svg"> 55 <img class="move_entry_icon" onclick="switchMenuPositions(' . $entry->getId() . ', \'down\')" src="assets/arrow-down.svg">
56 <span class="menu_entry_checkbox"> 56 <span class="menu_entry_checkbox">
57 <input type="checkbox" ' . $checked . ' onclick="checkMenuEntry(' . $entry->getId() . ')"> 57 <input type="checkbox" ' . $checked . ' onclick="checkMenuEntry(' . $entry->getId() . ')">
58 </span> 58 </span>';
59 <button>' . $entry->getPageName() . '</button>';
60 59
61 // seul la modification des URL est possible pour l'instant, les noms des entrées de menu attendront 60 // entrées URL: bouton poubelle + nom du lien + adresse
62 if(str_starts_with($entry->getEndOfPath(), 'http')){ 61 if(str_starts_with($entry->getEndOfPath(), 'http')){
63 $this->html .= '<form style="display: inline;" id="delete-i' . $entry->getId() . '" method="post" action="' . new URL(['from' => 'menu_chemins']) . '"> 62 $this->html .= '<form style="display: inline;" id="delete-i' . $entry->getId() . '" method="post" action="' . new URL(['from' => 'menu_chemins']) . '">
64 <input type="hidden" name="delete" value="' . $entry->getId() . '"> 63 <input type="hidden" name="delete" value="' . $entry->getId() . '">
65 <input type="image" class="move_entry_icon" src="assets/delete-bin.svg" alt="delete link button" onclick="return confirm(\'Voulez-vous vraiment supprimer cette entrée?\');"> 64 <input type="image" class="move_entry_icon" src="assets/delete-bin.svg" alt="delete link button" onclick="return confirm(\'Voulez-vous vraiment supprimer cette entrée?\');">
66 </form> 65 </form>
67 <span class="url"> 66 <span class="url_name">
67 <button class="url_name"><input type="" value="' . htmlspecialchars($entry->getPageName()) . '"></button>
68 <img class="move_entry_icon" src="assets/save.svg" onclick="editUrl(' . $entry->getId() . ', \'url_name\')">
69 </span>
70 <span class="url_content">
68 <input type="url" value="' . htmlspecialchars($entry->getEndOfPath()) . '"> 71 <input type="url" value="' . htmlspecialchars($entry->getEndOfPath()) . '">
69 <img class="move_entry_icon" src="assets/save.svg" onclick="editUrlEntry(' . $entry->getId() . ')"> 72 <img class="move_entry_icon" src="assets/save.svg" onclick="editUrl(' . $entry->getId() . ', \'url_content\')">
70 </span>'; 73 </span>';
71
72 // code à recycler pour pouvoir modifier le nom de l'entrée de menu correspondant aux liens
73 /*$this->html .= '<span id="cancel-i' . $entry->getId() . '">
74 <input type="hidden" name="cancel" value="' . $entry->getId() . '">
75 <button class="hidden" onclick="cancelUrlEntry(' . $entry->getId() . ')">Annuler</button>
76 </span>
77 <span id="submit-i' . $entry->getId() . '">
78 <input type="hidden" name="submit" value="' . $entry->getId() . '">
79 <input type="submit" class="hidden" onclick="submitUrlEntry(' . $entry->getId() . ')">
80 </span>';*/
81 } 74 }
82 else{ 75 else{
83 $this->html .= '<i class="path">' . $entry->getPagePath() . '</i>'; 76 $this->html .= '<button>' . $entry->getPageName() . '</button>
77 <i class="path">' . $entry->getPagePath() . '</i>';
84 } 78 }
85 79
86 if(count($entry->getChildren()) > 0){ 80 if(count($entry->getChildren()) > 0){