mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Switch arrows in blocks when in RTL mode MDL-10768
This commit is contained in:
parent
7982426d1b
commit
b4483b9107
@ -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 = '<div class="commands">';
|
||||
|
||||
if ($this->instance->visible) {
|
||||
@ -361,7 +370,7 @@ class block_base {
|
||||
|
||||
if ($options & BLOCK_MOVE_LEFT) {
|
||||
$movebuttons .= '<a class="icon left" title="'. $this->str->moveleft .'" href="'.$script.'&blockaction=moveleft">' .
|
||||
'<img src="'. $CFG->pixpath .'/t/left.gif" alt="'. $this->str->moveleft .'" /></a>';
|
||||
'<img src="'. $CFG->pixpath .'/t/'.$leftarrow.'" alt="'. $this->str->moveleft .'" /></a>';
|
||||
}
|
||||
if ($options & BLOCK_MOVE_UP) {
|
||||
$movebuttons .= '<a class="icon up" title="'. $this->str->moveup .'" href="'.$script.'&blockaction=moveup">' .
|
||||
@ -373,7 +382,7 @@ class block_base {
|
||||
}
|
||||
if ($options & BLOCK_MOVE_RIGHT) {
|
||||
$movebuttons .= '<a class="icon right" title="'. $this->str->moveright .'" href="'.$script.'&blockaction=moveright">' .
|
||||
'<img src="'. $CFG->pixpath .'/t/right.gif" alt="'. $this->str->moveright .'" /></a>';
|
||||
'<img src="'. $CFG->pixpath .'/t/'.$rightarrow.'" alt="'. $this->str->moveright .'" /></a>';
|
||||
}
|
||||
|
||||
$movebuttons .= '</div>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user