diff options
Diffstat (limited to 'src/View/templates/modify_block.php')
| -rw-r--r-- | src/View/templates/modify_block.php | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/View/templates/modify_block.php b/src/View/templates/modify_block.php new file mode 100644 index 0000000..bb5abd3 --- /dev/null +++ b/src/View/templates/modify_block.php | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | <?php | ||
| 2 | declare(strict_types=1); | ||
| 3 | use App\Service\URL; | ||
| 4 | ?> | ||
| 5 | <div class="modify_one_block" id="bloc_edit_<?= $child_node->getId() ?>"> | ||
| 6 | <div class="block_options"> | ||
| 7 | <label for="bloc_rename_<?= $child_node->getId() ?>">Type <b><?= App\Entity\Presentation::BLOCKS[$child_node->getName()] ?? '<i>erreur base de données</i>' ?></b> | ||
| 8 | </label> | ||
| 9 | <p> | ||
| 10 | <input type="text" id="bloc_rename_<?= $child_node->getId() ?>" name="bloc_rename_title" value="<?= $child_node->getNodeData()->getdata()['title'] ?>" required> | ||
| 11 | <button onclick="renamePageBloc(<?= $child_node->getId() ?>)">Renommer</button> | ||
| 12 | </p> | ||
| 13 | <div> | ||
| 14 | <p> | ||
| 15 | <img class="action_icon" onclick="switchBlocsPositions(<?= $child_node->getId() ?>, 'up')" src="assets/arrow-up.svg"> | ||
| 16 | <img class="action_icon" onclick="switchBlocsPositions(<?= $child_node->getId() ?>, 'down')" src="assets/arrow-down.svg"> | ||
| 17 | </p> | ||
| 18 | <form method="post" action="<?= new URL(['page' => CURRENT_PAGE]) ?>"> | ||
| 19 | <input type="hidden" name="delete_bloc_id" value="<?= $child_node->getId() ?>"> | ||
| 20 | <input type="hidden" name="delete_bloc_hidden"> | ||
| 21 | <input type="submit" value="Supprimer" onclick="return confirm('Voulez-vous vraiment supprimer ce bloc?');"> | ||
| 22 | </form> | ||
| 23 | </div> | ||
| 24 | </div> | ||
| 25 | <?php | ||
| 26 | if($child_node->getName() === 'news_block'){ | ||
| 27 | ?> | ||
| 28 | <div class="news_order"> | ||
| 29 | <label>Ordre des articles</label> | ||
| 30 | <select id="articles_order_select_<?= $child_node->getId() ?>" onchange="articlesOrderSelect(<?= $child_node->getId() ?>)"> | ||
| 31 | <option value="antichrono" <?= $order === 'antichrono' ? 'selected' : '' ?>>Antichronologique</option> | ||
| 32 | <option value="chrono" <?= $order === 'chrono' ? 'selected' : '' ?>>Chronologique</option> | ||
| 33 | </select> | ||
| 34 | </div> | ||
| 35 | <?php | ||
| 36 | } | ||
| 37 | if(App\Entity\Presentation::hasPresentation($child_node->getName())){ | ||
| 38 | ?> | ||
| 39 | <div class="grid_options"> | ||
| 40 | <div> | ||
| 41 | <label for="presentation_select_<?= $child_node->getId() ?>">Présentation</label> | ||
| 42 | <select id="presentation_select_<?= $child_node->getId() ?>" onchange="changePresentation(<?= $child_node->getId() ?>)"> | ||
| 43 | <?= $this->makePresentationOptions($child_node->getNodeData()->getPresentation()) ?> | ||
| 44 | </select> | ||
| 45 | </div> | ||
| 46 | <div id="cols_min_width_edit_<?= $child_node->getId() ?>" class="<?= ($child_node->getNodeData()->getPresentation() === 'grid' ? '' : 'hidden') ?>"> | ||
| 47 | <label for="cols_min_width_select_<?= $child_node->getId() ?>">Largeur minimum </label> | ||
| 48 | <input type="number" id="cols_min_width_select_<?= $child_node->getId() ?>" onchange="changeColsMinWidth(<?= $child_node->getId() ?>)" min="150" max="400" value="<?= $child_node->getNodeData()->getColsMinWidth() ?>"> pixels | ||
| 49 | </div> | ||
| 50 | </div> | ||
| 51 | <div class="pagination_limit"> | ||
| 52 | <label for="pagination_limit_<?= $child_node->getId() ?>"> | ||
| 53 | Nombre max d'articles affichés | ||
| 54 | <input type="number" id="pagination_limit_<?= $child_node->getId() ?>" name="pagination_limit" onchange="changePaginationLimit(<?= $child_node->getId() ?>)" min="0" max="30" value="<?= $child_node->getNodeData()->getPaginationLimit() ?>"> | ||
| 55 | <i>(mettre 0 désactive la pagination)</i> | ||
| 56 | </label> | ||
| 57 | </div> | ||
| 58 | <?php | ||
| 59 | } | ||
| 60 | ?> | ||
| 61 | </div> \ No newline at end of file | ||
