summaryrefslogtreecommitdiff
path: root/src/view/templates/main.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/templates/main.php')
-rw-r--r--src/view/templates/main.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/view/templates/main.php b/src/view/templates/main.php
new file mode 100644
index 0000000..7ff03a8
--- /dev/null
+++ b/src/view/templates/main.php
@@ -0,0 +1,45 @@
1<?php declare(strict_types=1); ?>
2<section class="page_modification">
3 <h3>Modification de la page</h3>
4 <div class="edit_page_zone">
5 <div class="edit_page_title_zone">
6 <p id="edit_page_title">
7 <label for="page_name">Titre de la page</label>
8 <input type="text" id="page_name" name="edit_page_title" value="<?= Director::$page_path->getLast()->getPageName() ?>" onchange="makePageNamePath()" required>
9 <button onclick="changePageTitle('<?= Director::$page_path->getLast()->getId() ?>')">Renommer</button>
10 </p>
11 <form id="edit_page_menu_path" method="post" action="<?= new URL(['page' => CURRENT_PAGE]) ?>">
12 <label for="page_name_path">Chemin en "snake_case"</label>
13 <input type="text" id="page_name_path" name="page_menu_path" value="<?= Director::$page_path->getLast()->getEndOfPath() ?>" placeholder="ex: nouvelle_page" required>
14 <input type="hidden" name="page_id" value="<?= Director::$page_path->getLast()->getId() ?>"><input type="hidden" name="page_name_path_hidden">
15 <input type="submit" value="Modifier">
16 </form>
17 </div>
18 <div id="edit_description">
19 <label for="description_textarea">Description sous le titre dans les moteurs de recherche</label>
20 <div>
21 <textarea id="description_textarea" name="edit_description" cols="40" rows="3" placeholder="ex: nous faisons ceci et cela, etc" required><?= $head_node->getNodeData()->getData()['description'] ?></textarea>
22 <button onclick="changeDescription('<?= $head_node->getNodeData()->getId() ?>')">Modifier</button>
23 </div>
24 </div>
25 </div>
26 <div class="edit_bloc_zone">
27 <div class="new_bloc">
28 <p>Ajouter un bloc de page</p>
29 <form method="post" action="<?= new URL(['page' => CURRENT_PAGE]) ?>">
30 <p><label for="bloc_title">Titre</label>
31 <input type="text" id="bloc_title" name="bloc_title" required></p>
32 <p><label for="bloc_select">Type</label>
33 <select id="bloc_select" name="bloc_select" required>
34 <?= $options ?>
35 </select>
36 <input type="hidden" name="bloc_title_hidden">
37 <input type="submit" value="Valider"></p>
38 </form>
39 </div>
40 <div class="modify_bloc">
41 <p>Modifier un bloc</p>
42 <?= $bloc_edit ?>
43 </div>
44 </div>
45</section> \ No newline at end of file