From b4483b910778713282a0a30fb142108642d1247e Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 9 Aug 2007 08:47:09 +0000 Subject: [PATCH] Switch arrows in blocks when in RTL mode MDL-10768 --- blocks/moodleblock.class.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index a9a32b946a..3b34d4f7f2 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -324,6 +324,15 @@ class block_base { $this->str->assignroles = get_string('assignroles', 'role'); } + // RTL support - exchange right and left arrows + if (right_to_left()) { + $rightarrow = 'left.gif'; + $leftarrow = 'right.gif'; + } else { + $rightarrow = 'right.gif'; + $leftarrow = 'left.gif'; + } + $movebuttons = '
'; if ($this->instance->visible) { @@ -361,7 +370,7 @@ class block_base { if ($options & BLOCK_MOVE_LEFT) { $movebuttons .= '' . - ''. $this->str->moveleft .''; + ''. $this->str->moveleft .''; } if ($options & BLOCK_MOVE_UP) { $movebuttons .= '' . @@ -373,7 +382,7 @@ class block_base { } if ($options & BLOCK_MOVE_RIGHT) { $movebuttons .= '' . - ''. $this->str->moveright .''; + ''. $this->str->moveright .''; } $movebuttons .= '
'; -- 2.39.5