From 00bc4ff399a47986115f20fd927472ce844e4f32 Mon Sep 17 00:00:00 2001 From: Gareth J Barnard Date: Tue, 5 Jun 2018 16:04:43 +0100 Subject: [PATCH] Fix: Update frontpage home block area information. --- CHANGES.txt | 1 + classes/output/core_renderer.php | 16 ++++++++-------- lang/en/theme_essential.php | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0d1848af..15a18eb6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,6 +1,7 @@ New in 3.5.0.2 ============== - FIX: Block editing menu item hover. +- FIX: Update frontpage home block area information. New in 3.5.0.1 ============== diff --git a/classes/output/core_renderer.php b/classes/output/core_renderer.php index 7a293583..04e7c93f 100644 --- a/classes/output/core_renderer.php +++ b/classes/output/core_renderer.php @@ -2060,16 +2060,16 @@ protected function essential_blocks_for_region($region, $blocksperrow, $editing, /* When editing we want all the blocks to be the same as side-pre / side-post so set by CSS: * - * aside.footer-edit .block { - * .footer-fluid-span(3); + * aside.rowblock-edit .block { + * .rowblock-fluid-span(6, @fluidGridColumnWidth, @fluidGridGutterWidth); * } */ - if (($blocksperrow > 4) || ($editing)) { - $blocksperrow = 4; // Will result in a 'span3' when more than one row. - } - $rows = $blockcount / $blocksperrow; // Maximum blocks per row. - if (!$editing) { + if ($blocksperrow > 4) { + $blocksperrow = 4; // Will result in a 'span3' when more than one row. + } + $rows = $blockcount / $blocksperrow; // Maximum blocks per row. + if ($rows <= 1) { $span = 12 / $blockcount; if ($span < 1) { @@ -2086,7 +2086,7 @@ protected function essential_blocks_for_region($region, $blocksperrow, $editing, $currentrequiredrow = 1; foreach ($blockcontents as $bc) { - if (!$editing) { // Using CSS and special 'span3' only when editing. + if (!$editing) { // Using CSS and special 'span3' only when not editing. $currentblockcount++; if ($currentblockcount > ($currentrequiredrow * $blocksperrow)) { // Tripping point. diff --git a/lang/en/theme_essential.php b/lang/en/theme_essential.php index 0c8040c9..82661e1d 100644 --- a/lang/en/theme_essential.php +++ b/lang/en/theme_essential.php @@ -490,7 +490,7 @@ $string['frontpagemiddleblocks'] = 'Enable additional front page \'Home\' (was \'Middle\') blocks'; $string['frontpagemiddleblocksdesc'] = 'If enabled this will display an additional block location just under the marketing spots.'; $string['frontpagehomeblocksperrow'] = 'Home (was \'Middle\') blocks per row'; -$string['frontpagehomeblocksperrowdesc'] = 'State up to how many blocks per row between {$a->lower} and {$a->upper} for the \'Home blocks\' block region.'; +$string['frontpagehomeblocksperrowdesc'] = 'State up to how many blocks per row between {$a->lower} and {$a->upper} for the \'Home blocks\' block region. Note: For ease when editing, two blocks per row will be shown regardless of this setting.'; $string['fppagetopblocks'] = 'Enable additional front page \'Page top\' blocks'; $string['fppagetopblocksdesc'] = 'If enabled this will display an additional block location beside the side blocks and above the content area. Note: The number of blocks per row depends on the setting \'fppagetopblocksperrow\'.'; $string['fppagetopblocksperrow'] = 'Page top blocks per row';