MDL-39661 blocks: Removed notice when moving a block
This commit is contained in:
@@ -50,6 +50,7 @@ $string['hidepanel'] = 'Hide panel';
|
||||
$string['moveblock'] = 'Move {$a} block';
|
||||
$string['moveblockafter'] = 'Move block to after {$a} block';
|
||||
$string['moveblockbefore'] = 'Move block to before {$a} block';
|
||||
$string['moveblockhere'] = 'Move block here';
|
||||
$string['movingthisblockcancel'] = 'Moving this block ({$a})';
|
||||
$string['onthispage'] = 'On this page';
|
||||
$string['pagetypes'] = 'Page types';
|
||||
|
||||
@@ -1420,7 +1420,12 @@ class core_renderer extends renderer_base {
|
||||
*/
|
||||
public function block_move_target($target, $zones, $previous) {
|
||||
if ($previous == null) {
|
||||
$position = get_string('moveblockbefore', 'block', $zones[0]);
|
||||
if (empty($zones)) {
|
||||
// There are no zones, probably because there are no blocks.
|
||||
$position = get_string('moveblockhere', 'block');
|
||||
} else {
|
||||
$position = get_string('moveblockbefore', 'block', $zones[0]);
|
||||
}
|
||||
} else {
|
||||
$position = get_string('moveblockafter', 'block', $previous);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user