diff options
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/NewsBlockBuilder.php | 5 | ||||
-rw-r--r-- | src/view/PostBlockBuilder.php | 5 | ||||
-rw-r--r-- | src/view/templates/modify_block.php | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/view/NewsBlockBuilder.php b/src/view/NewsBlockBuilder.php index 4716c63..76e42c5 100644 --- a/src/view/NewsBlockBuilder.php +++ b/src/view/NewsBlockBuilder.php | |||
@@ -23,9 +23,10 @@ class NewsBlockBuilder extends AbstractBuilder | |||
23 | 23 | ||
24 | // stratégie d'affichage du contenu (utilisation de méthodes ou de classe List, GridPresentation, etc) | 24 | // stratégie d'affichage du contenu (utilisation de méthodes ou de classe List, GridPresentation, etc) |
25 | $section_class = $node->getNodeData()->getPresentation()->getName(); // = list, grid , mosaic ou carousel | 25 | $section_class = $node->getNodeData()->getPresentation()->getName(); // = list, grid , mosaic ou carousel |
26 | $cols_min_width = ''; | ||
26 | if($section_class === 'grid'){ | 27 | if($section_class === 'grid'){ |
27 | $min_width = (string)$node->getNodeData()->getColsMinWidth(); | 28 | $min_width = $node->getNodeData()->getColsMinWidth(); |
28 | $cols_min_width = 'grid-template-columns: repeat(auto-fit, minmax(' . $min_width . 'px, 1fr));'; | 29 | $cols_min_width = 'grid-template-columns: repeat(auto-fit, minmax(' . (string)$min_width . 'px, 1fr));'; |
29 | } | 30 | } |
30 | 31 | ||
31 | // ajouter un article | 32 | // ajouter un article |
diff --git a/src/view/PostBlockBuilder.php b/src/view/PostBlockBuilder.php index 017e78e..dca4fbd 100644 --- a/src/view/PostBlockBuilder.php +++ b/src/view/PostBlockBuilder.php | |||
@@ -23,9 +23,10 @@ class PostBlockBuilder extends AbstractBuilder | |||
23 | 23 | ||
24 | // stratégie d'affichage du contenu (utilisation de méthodes ou de classe List, GridPresentation, etc) | 24 | // stratégie d'affichage du contenu (utilisation de méthodes ou de classe List, GridPresentation, etc) |
25 | $section_class = $node->getNodeData()->getPresentation()->getName(); // = list, grid , mosaic ou carousel | 25 | $section_class = $node->getNodeData()->getPresentation()->getName(); // = list, grid , mosaic ou carousel |
26 | $cols_min_width = ''; | ||
26 | if($section_class === 'grid'){ | 27 | if($section_class === 'grid'){ |
27 | $min_width = (string)$node->getNodeData()->getColsMinWidth(); | 28 | $min_width = $node->getNodeData()->getColsMinWidth(); |
28 | $cols_min_width = 'grid-template-columns: repeat(auto-fit, minmax(' . $min_width . 'px, 1fr));'; | 29 | $cols_min_width = 'grid-template-columns: repeat(auto-fit, minmax(' . (string)$min_width . 'px, 1fr));'; |
29 | } | 30 | } |
30 | 31 | ||
31 | // ajouter un article | 32 | // ajouter un article |
diff --git a/src/view/templates/modify_block.php b/src/view/templates/modify_block.php index dae8994..2514085 100644 --- a/src/view/templates/modify_block.php +++ b/src/view/templates/modify_block.php | |||
@@ -27,7 +27,7 @@ if($child_node->getNodeData()->getPresentation() !== null){ | |||
27 | <?= $this->makePresentationOptions($child_node->getNodeData()->getPresentation()->getName()) ?> | 27 | <?= $this->makePresentationOptions($child_node->getNodeData()->getPresentation()->getName()) ?> |
28 | </select> | 28 | </select> |
29 | <div id="cols_min_width_edit_<?= $child_node->getId() ?>" class="<?= ($child_node->getNodeData()->getPresentation()->getName() === 'grid' ? '' : 'hidden') ?>"> | 29 | <div id="cols_min_width_edit_<?= $child_node->getId() ?>" class="<?= ($child_node->getNodeData()->getPresentation()->getName() === 'grid' ? '' : 'hidden') ?>"> |
30 | <label for="cols_min_width_select_' . $child_node->getId() . '">Largeur minimum </label> | 30 | <label for="cols_min_width_select_<?= $child_node->getId() ?>">Largeur minimum </label> |
31 | <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 | 31 | <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 |
32 | </div> | 32 | </div> |
33 | </div> | 33 | </div> |