diff options
| author | polo <ordipolo@gmx.fr> | 2026-07-02 00:01:31 +0200 |
|---|---|---|
| committer | polo <ordipolo@gmx.fr> | 2026-07-02 00:01:31 +0200 |
| commit | 0fa852ee4e9c3060ba7fc0daf4b08a44ea151f7f (patch) | |
| tree | aa41e7a0a2e41649dea66114e73a26574a042b85 /src/view | |
| parent | 9021dc699874c46b72dcbe019ec1a4408fbf6d70 (diff) | |
| download | cms-0fa852ee4e9c3060ba7fc0daf4b08a44ea151f7f.tar.gz cms-0fa852ee4e9c3060ba7fc0daf4b08a44ea151f7f.tar.bz2 cms-0fa852ee4e9c3060ba7fc0daf4b08a44ea151f7f.zip | |
entité Presentation, MAJ filtre ViewController::SPECIAL_PAGES, table node_data non allégée pour l'instant
Diffstat (limited to 'src/view')
| -rw-r--r-- | src/view/FooterBuilder.php | 2 | ||||
| -rw-r--r-- | src/view/MainBuilder.php | 8 | ||||
| -rw-r--r-- | src/view/templates/modify_block.php | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/view/FooterBuilder.php b/src/view/FooterBuilder.php index da16758..bb99c13 100644 --- a/src/view/FooterBuilder.php +++ b/src/view/FooterBuilder.php | |||
| @@ -99,7 +99,7 @@ class FooterBuilder extends AbstractBuilder | |||
| 99 | private function makePageModifModeButton(): string | 99 | private function makePageModifModeButton(): string |
| 100 | { | 100 | { |
| 101 | $link_edit_page = new URL(['page' => CURRENT_PAGE]); | 101 | $link_edit_page = new URL(['page' => CURRENT_PAGE]); |
| 102 | if(!in_array(CURRENT_PAGE, ['article', 'new_page', 'menu_paths', 'maintenance'])) // ajouter 'user_edit' et 'connection' le jour où ces pages auront un footer | 102 | if(!in_array(CURRENT_PAGE, ViewController::SPECIAL_PAGES)) // cas impossibles: 'user_edit' et 'connection' qui n'ont pas de footer |
| 103 | { | 103 | { |
| 104 | if(MainBuilder::$modif_mode){ | 104 | if(MainBuilder::$modif_mode){ |
| 105 | $link_edit_label = 'Sortir du mode modification'; | 105 | $link_edit_label = 'Sortir du mode modification'; |
diff --git a/src/view/MainBuilder.php b/src/view/MainBuilder.php index b488703..b888a56 100644 --- a/src/view/MainBuilder.php +++ b/src/view/MainBuilder.php | |||
| @@ -53,10 +53,10 @@ class MainBuilder extends AbstractBuilder | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | // mode modification de page uniquement | 55 | // mode modification de page uniquement |
| 56 | private function viewEditBlocks($node): void | 56 | private function viewEditBlocks(Node $node): void |
| 57 | { | 57 | { |
| 58 | $options = ''; | 58 | $options = ''; |
| 59 | foreach(Blocks::$blocks as $key => $value){ | 59 | foreach(Presentation::$blocks as $key => $value){ |
| 60 | $options .= '<option value= "' . $key . '">' . $value . "</option>\n"; | 60 | $options .= '<option value= "' . $key . '">' . $value . "</option>\n"; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| @@ -69,7 +69,7 @@ class MainBuilder extends AbstractBuilder | |||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | // présentation par défaut | 71 | // présentation par défaut |
| 72 | if(Blocks::hasPresentation($child_node->getName()) && $child_node->getNodeData()->getPresentation() === null){ | 72 | if(Presentation::hasPresentation($child_node->getName()) && $child_node->getNodeData()->getPresentation() === null){ |
| 73 | $child_node->getNodeData()->setPresentation('full_width'); // pas de persistence ici | 73 | $child_node->getNodeData()->setPresentation('full_width'); // pas de persistence ici |
| 74 | } | 74 | } |
| 75 | 75 | ||
| @@ -87,7 +87,7 @@ class MainBuilder extends AbstractBuilder | |||
| 87 | private function makePresentationOptions(string $presentation): string | 87 | private function makePresentationOptions(string $presentation): string |
| 88 | { | 88 | { |
| 89 | $options = ''; | 89 | $options = ''; |
| 90 | foreach(Blocks::$presentations as $key => $value){ | 90 | foreach(Presentation::$presentations as $key => $value){ |
| 91 | $options .= '<option value="' . $key . '" ' . ($presentation === $key ? 'selected' : '') . '>' . $value . '</option>'; | 91 | $options .= '<option value="' . $key . '" ' . ($presentation === $key ? 'selected' : '') . '>' . $value . '</option>'; |
| 92 | } | 92 | } |
| 93 | return $options; | 93 | return $options; |
diff --git a/src/view/templates/modify_block.php b/src/view/templates/modify_block.php index d855a4a..1da3176 100644 --- a/src/view/templates/modify_block.php +++ b/src/view/templates/modify_block.php | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | <?php declare(strict_types=1); ?> | 1 | <?php declare(strict_types=1); ?> |
| 2 | <div class="modify_one_block" id="bloc_edit_<?= $child_node->getId() ?>"> | 2 | <div class="modify_one_block" id="bloc_edit_<?= $child_node->getId() ?>"> |
| 3 | <div class="block_options"> | 3 | <div class="block_options"> |
| 4 | <label for="bloc_rename_<?= $child_node->getId() ?>">Type <b><?= Blocks::$blocks[$child_node->getName()] ?? '<i>erreur base de données</i>' ?></b> | 4 | <label for="bloc_rename_<?= $child_node->getId() ?>">Type <b><?= App\Entity\Presentation::$blocks[$child_node->getName()] ?? '<i>erreur base de données</i>' ?></b> |
| 5 | </label> | 5 | </label> |
| 6 | <p> | 6 | <p> |
| 7 | <input type="text" id="bloc_rename_<?= $child_node->getId() ?>" name="bloc_rename_title" value="<?= $child_node->getNodeData()->getdata()['title'] ?>" required> | 7 | <input type="text" id="bloc_rename_<?= $child_node->getId() ?>" name="bloc_rename_title" value="<?= $child_node->getNodeData()->getdata()['title'] ?>" required> |
| @@ -31,7 +31,7 @@ if($child_node->getName() === 'news_block'){ | |||
| 31 | </div> | 31 | </div> |
| 32 | <?php | 32 | <?php |
| 33 | } | 33 | } |
| 34 | if(Blocks::hasPresentation($child_node->getName())){ | 34 | if(App\Entity\Presentation::hasPresentation($child_node->getName())){ |
| 35 | ?> | 35 | ?> |
| 36 | <div class="grid_options"> | 36 | <div class="grid_options"> |
| 37 | <div> | 37 | <div> |
