From f477314613beb26b0ce4c61ec0b1900df1de1cb1 Mon Sep 17 00:00:00 2001 From: polo Date: Mon, 1 Sep 2025 18:52:17 +0200 Subject: =?UTF-8?q?renommage=20des=20pr=C3=A9sentations,modif=20pr=C3=A9se?= =?UTF-8?q?ntation=20des=20blocs=20et=20largeur=20min=20(donc=20nb=20de=20?= =?UTF-8?q?colonnes)=20en=20mode=20grid,=20corrections=20de=20bugs=20et=20?= =?UTF-8?q?erreurs=20404,=20le=20param=20page=5Fmodif=20n'est=20plus=20une?= =?UTF-8?q?=20action,=20l=C3=A9g=C3=A8re=20symfonyfication=20du=20routeur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/MainBuilder.php | 63 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 12 deletions(-) (limited to 'src/view/MainBuilder.php') diff --git a/src/view/MainBuilder.php b/src/view/MainBuilder.php index d7a0dfa..fc80cd1 100644 --- a/src/view/MainBuilder.php +++ b/src/view/MainBuilder.php @@ -5,10 +5,11 @@ declare(strict_types=1); use App\Entity\Article; use App\Entity\Node; +use App\Entity\Presentation; class MainBuilder extends AbstractBuilder { - static bool $modif_mode = false; + static public bool $modif_mode = false; public function __construct(Node $node) { @@ -52,7 +53,8 @@ class MainBuilder extends AbstractBuilder // mode modification de page uniquement private function viewEditBlocks($node): void { - $viewFile = self::VIEWS_PATH . $node->getName() . '.php'; // mode modification uniquement + //$viewFile = self::VIEWS_PATH . $node->getName() . '.php'; // mode modification uniquement + $viewFile = self::VIEWS_PATH . 'modify_page.php'; // mode modification uniquement $blocks = Blocks::getTypeNamePairs(); $options = ''; @@ -71,25 +73,62 @@ class MainBuilder extends AbstractBuilder $bloc_edit = ''; foreach($node->getChildren() as $child_node){ + // mettre tout ça dans une vue modify_block.php + // => pourrait être déplacé au niveau des articles + // renommage d'un bloc - $bloc_edit .= '
-

- - '. "\n"; + $bloc_edit .= '

+
+ +

+ + +

'. "\n"; // déplacement d'un bloc - $bloc_edit .= ' - ' . "\n"; + $bloc_edit .= '
+

+ + +

' . "\n"; // suppression d'un bloc $bloc_edit .= '
- - -

-
+ + + + +
'. "\n"; + if($child_node->getNodeData()->getPresentation() !== null){ + // select mode de présentation + $bloc_edit .= '

+ + '; + // select largeur minimale colonnes mode grid + $bloc_edit .= '

+ '; + $bloc_edit .= ''; + /*$bloc_edit .= '';*/ + $bloc_edit .= ' pixels
+
'; + } + $bloc_edit .= "
\n"; } ob_start(); require $viewFile; $this->html .= ob_get_clean(); } + + private function makePresentationOptions(string $presentation): string + { + $options = ''; + foreach(Presentation::$option_list as $key => $value){ + $options .= ''; + } + return $options; + } } \ No newline at end of file -- cgit v1.2.3