diff options
| author | polo <ordipolo@gmx.fr> | 2025-05-07 01:11:27 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2025-05-07 01:11:27 +0200 |
| commit | 2d8ec75f4aaf3b93fd9f6758f8dcb4f1f9f03d0c (patch) | |
| tree | dfa6f5e31ed96f9ddcf9238304364e7887c26a7d /src/view | |
| parent | 5fc1a655e0271b583f3caa009524ea9d99a8bd3e (diff) | |
| download | cms-2d8ec75f4aaf3b93fd9f6758f8dcb4f1f9f03d0c.tar.gz cms-2d8ec75f4aaf3b93fd9f6758f8dcb4f1f9f03d0c.tar.bz2 cms-2d8ec75f4aaf3b93fd9f6758f8dcb4f1f9f03d0c.zip | |
page menu et chemins, partie5
Diffstat (limited to 'src/view')
| -rw-r--r-- | src/view/MenuBuilder.php | 7 | ||||
| -rw-r--r-- | src/view/templates/menu.php | 8 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/view/MenuBuilder.php b/src/view/MenuBuilder.php index 5331c08..780ca7e 100644 --- a/src/view/MenuBuilder.php +++ b/src/view/MenuBuilder.php | |||
| @@ -62,9 +62,12 @@ class MenuBuilder extends AbstractBuilder | |||
| 62 | <button>' . $entry->getPageName() . '</button>'; | 62 | <button>' . $entry->getPageName() . '</button>'; |
| 63 | 63 | ||
| 64 | if(str_starts_with($entry->getEndOfPath(), 'http')){ | 64 | if(str_starts_with($entry->getEndOfPath(), 'http')){ |
| 65 | $this->html .= '<span id="edit-i..."><img class="move_entry_icon" src="assets/edit.svg" onclick="editUrlEntry(' . $entry->getId() . ')"></span> | 65 | $this->html .= '<span id="edit-i' . $entry->getId() . '"><img class="move_entry_icon" src="assets/edit.svg" onclick="editUrlEntry(' . $entry->getId() . ')"></span> |
| 66 | <i class="url">' . $entry->getEndOfPath() . '</i> | 66 | <i class="url">' . $entry->getEndOfPath() . '</i> |
| 67 | <span id="delete-i..."><img class="move_entry_icon" src="assets/delete-bin.svg" onclick="deleteUrlEntry(' . $entry->getId() . ')"></span>'; | 67 | <form style="display: inline;" id="delete-i' . $entry->getId() . '" method="post" action="' . new URL(['from' => 'menu_chemins']) . '"> |
| 68 | <input type="hidden" name="delete" value="' . $entry->getId() . '"> | ||
| 69 | <input type="image" class="move_entry_icon" src="assets/delete-bin.svg" alt="delete link button"> | ||
| 70 | </form>'; | ||
| 68 | } | 71 | } |
| 69 | else{ | 72 | else{ |
| 70 | $this->html .= '<i class="path">' . $entry->getPagePath() . '</i>'; | 73 | $this->html .= '<i class="path">' . $entry->getPagePath() . '</i>'; |
diff --git a/src/view/templates/menu.php b/src/view/templates/menu.php index 49df4e0..d62b78b 100644 --- a/src/view/templates/menu.php +++ b/src/view/templates/menu.php | |||
| @@ -7,14 +7,14 @@ | |||
| 7 | <p>Ajouter au menu un lien vers un site web quelconque avec le formulaire ci-dessous:</p> | 7 | <p>Ajouter au menu un lien vers un site web quelconque avec le formulaire ci-dessous:</p> |
| 8 | <form method="post" action="<?= new URL(['from' => 'menu_chemins']) ?>"> | 8 | <form method="post" action="<?= new URL(['from' => 'menu_chemins']) ?>"> |
| 9 | <p> | 9 | <p> |
| 10 | <label for="url_input">Adresse URL:</label> | ||
| 11 | <input id="url_input" type="url" name="url_input"> | ||
| 12 | </p> | ||
| 13 | <p> | ||
| 14 | <label for="label_input">Nom:</label> | 10 | <label for="label_input">Nom:</label> |
| 15 | <input id="label_input" type="text" name="label_input"> | 11 | <input id="label_input" type="text" name="label_input"> |
| 16 | </p> | 12 | </p> |
| 17 | <p> | 13 | <p> |
| 14 | <label for="url_input">Adresse URL:</label> | ||
| 15 | <input id="url_input" type="url" name="url_input"> | ||
| 16 | </p> | ||
| 17 | <p> | ||
| 18 | <label>Placer le lien juste après cette entrée:</label> | 18 | <label>Placer le lien juste après cette entrée:</label> |
| 19 | <select id="location" name="location"> | 19 | <select id="location" name="location"> |
| 20 | <?= $this->options ?> | 20 | <?= $this->options ?> |
