diff --git a/module/VuFind/src/VuFind/View/Helper/AbstractLayoutClass.php b/module/VuFind/src/VuFind/View/Helper/AbstractLayoutClass.php index af9b84e6c0bccbbb87a589a585c255a81516922e..33a1115d55eb6e4638b2c95f751c8ca5f8d67897 100644 --- a/module/VuFind/src/VuFind/View/Helper/AbstractLayoutClass.php +++ b/module/VuFind/src/VuFind/View/Helper/AbstractLayoutClass.php @@ -43,7 +43,7 @@ abstract class AbstractLayoutClass extends \Zend\View\Helper\AbstractHelper * * @var bool */ - protected $left; + protected $sidebarOnLeft; /** * Is the sidebar offcanvas? @@ -60,7 +60,7 @@ abstract class AbstractLayoutClass extends \Zend\View\Helper\AbstractHelper */ public function __construct($left = false, $offcanvas = false) { - $this->left = $left; + $this->sidebarOnLeft = $left; $this->offcanvas = $offcanvas; } diff --git a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php index fb2ad863b1e190711a6679eb2da4d99b937e61ce..ee0d9d8608f2e59cfc6689f20cba887f60240d64 100644 --- a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php +++ b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/Factory.php @@ -65,7 +65,7 @@ class Factory public static function getLayoutClass(ServiceManager $sm) { $config = $sm->getServiceLocator()->get('VuFind\Config')->get('config'); - $left = !isset($config->Site->sidebarOnLeft) + $sidebarOnLeft = !isset($config->Site->sidebarOnLeft) ? false : $config->Site->sidebarOnLeft; $mirror = !isset($config->Site->mirrorSidebarInRTL) ? true : $config->Site->mirrorSidebarInRTL; @@ -76,9 +76,9 @@ class Factory // the mirror setting appropriately. $layout = $sm->getServiceLocator()->get('viewmanager')->getViewModel(); if ($layout->rtl && !$mirror) { - $left = !$left; + $sidebarOnLeft = !$sidebarOnLeft; } - return new LayoutClass($left, $offcanvas); + return new LayoutClass($sidebarOnLeft, $offcanvas); } /** diff --git a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/LayoutClass.php b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/LayoutClass.php index 92cc9f527caf1134a644e40067e530d2c414eb44..9d4a9dd4422493d595f04bc7339506776ce06b66 100644 --- a/module/VuFind/src/VuFind/View/Helper/Bootstrap3/LayoutClass.php +++ b/module/VuFind/src/VuFind/View/Helper/Bootstrap3/LayoutClass.php @@ -53,18 +53,18 @@ class LayoutClass extends \VuFind\View\Helper\AbstractLayoutClass { switch ($class) { case 'mainbody': - return $this->left + return $this->sidebarOnLeft ? 'col-sm-9 col-sm-push-3' : 'col-sm-9'; case 'sidebar': - return $this->left + return $this->sidebarOnLeft ? 'sidebar col-sm-3 col-sm-pull-9 hidden-print' : 'sidebar col-sm-3 hidden-print'; case 'offcanvas-row': if (!$this->offcanvas) { return ""; } - return $this->left + return $this->sidebarOnLeft ? 'offcanvas offcanvas-left flip' : 'offcanvas offcanvas-right flip'; }