From 73b425be07db551445066b80a9852daa1cdda54d Mon Sep 17 00:00:00 2001 From: Mary Evans Date: Tue, 3 Feb 2015 18:19:14 +0000 Subject: [PATCH] MDL-48160 theme: Improve all block region layouts when coded for RTL. --- theme/bootstrapbase/config.php | 5 -- theme/bootstrapbase/layout/columns2.php | 20 +++--- theme/bootstrapbase/layout/columns3.php | 22 ++++--- theme/bootstrapbase/layout/secure.php | 21 +++++-- theme/bootstrapbase/less/moodle/core.less | 74 ++++++++++++++++++----- theme/bootstrapbase/style/moodle.css | 2 +- theme/clean/config.php | 5 -- theme/clean/layout/columns2.php | 19 +++--- theme/clean/layout/columns3.php | 21 ++++--- theme/clean/layout/secure.php | 21 +++++-- theme/more/config.php | 5 -- theme/upgrade.txt | 2 + 12 files changed, 148 insertions(+), 69 deletions(-) diff --git a/theme/bootstrapbase/config.php b/theme/bootstrapbase/config.php index d85dce9d903..5c801fa6472 100644 --- a/theme/bootstrapbase/config.php +++ b/theme/bootstrapbase/config.php @@ -163,8 +163,3 @@ if (core_useragent::is_ie() && !core_useragent::check_ie_version('9.0')) { } $THEME->hidefromselector = true; - -$THEME->blockrtlmanipulations = array( - 'side-pre' => 'side-post', - 'side-post' => 'side-pre' -); diff --git a/theme/bootstrapbase/layout/columns2.php b/theme/bootstrapbase/layout/columns2.php index aabe56a9adf..e9fb50f484a 100644 --- a/theme/bootstrapbase/layout/columns2.php +++ b/theme/bootstrapbase/layout/columns2.php @@ -22,7 +22,15 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$left = (!right_to_left()); // To know if to add 'pull-right' and 'desktop-first-column' classes in the layout for LTR. +// Set default (LTR) layout mark-up for a two column page (side-pre-only). +$regionmain = 'span9 pull-right'; +$sidepre = 'span3 desktop-first-column'; +// Reset layout mark-up for RTL languages. +if (right_to_left()) { + $regionmain = 'span9'; + $sidepre = 'span3 pull-right'; +} + echo $OUTPUT->doctype() ?> htmlattributes(); ?>> @@ -72,20 +80,14 @@ echo $OUTPUT->doctype() ?>
-
+
course_content_header(); echo $OUTPUT->main_content(); echo $OUTPUT->course_content_footer(); ?>
- blocks('side-pre', 'span3'.$classextra); - ?> + blocks('side-pre', $sidepre); ?>