Skip to content

Commit

Permalink
Indicate that block group contents will also be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
jimsafley committed Apr 4, 2024
1 parent dcab4c1 commit 2c1e292
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions application/view/common/block-layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ $layoutGridColumnPosition = $layoutData['grid_column_position'] ?? 'auto';
$layoutGridColumnSpan = $layoutData['grid_column_span'] ?? '12';

$blockClasses = ['block', 'value'];
$toBeRemovedMessage = $this->translate('Block to be removed');
if ('blockGroup' === $layout) {
$blockClasses[] = 'block-group';
$toBeRemovedMessage = $this->translate('Block and contents to be removed');
}
?>

<div class="<?php echo implode(' ', $blockClasses); ?>" data-block-layout="<?php echo $escape($layout); ?>" data-block-layout-data="<?php echo $escape($layoutData ? json_encode($layoutData) : '{}'); ?>">
<div class="block-header">
<span class="sortable-handle"></span>
<span class="block-type"><?php echo $translate($layoutLabel); ?></span>
<span class="restore-value"><?php echo $translate('Block to be removed'); ?></span>
<span class="restore-value"><?php echo $toBeRemovedMessage; ?></span>
<?php if ('blockGroup' !== $layout): ?>
<span class="block-page-layout-grid-controls">
<label><?php echo $translate('Position'); ?>
Expand All @@ -33,7 +35,7 @@ if ('blockGroup' === $layout) {
<?php endforeach; ?>
</select>
</label>
<label><?php echo $translate('Span'); ?>
<label><?php echo $translate('Span'); ?>
<select class="block-page-layout-grid-column-span-select" data-block-page-layout-grid-column-span="<?php echo $escape($layoutGridColumnSpan); ?>">
<?php foreach ($layoutGridColumnSpanOptions as $key => $value): ?>
<option value="<?php echo $escape($key); ?>"<?php echo ($layoutGridColumnSpan == $key) ? ' selected' : '' ?>><?php echo $escape($key); ?></option>
Expand Down

0 comments on commit 2c1e292

Please sign in to comment.