Skip to content
Snippets Groups Projects
Commit 9b0363d0 authored by André Lahmann's avatar André Lahmann
Browse files

refs #7166:

* adjusted foundation additions in View
parent 36b0858b
No related merge requests found
...@@ -31,11 +31,11 @@ use Zend\ServiceManager\ServiceManager; ...@@ -31,11 +31,11 @@ use Zend\ServiceManager\ServiceManager;
/** /**
* Factory for Foundation view helpers. * Factory for Foundation view helpers.
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link https://vufind.org/wiki/development Wiki
* *
* @codeCoverageIgnore * @codeCoverageIgnore
*/ */
...@@ -67,8 +67,17 @@ class Factory ...@@ -67,8 +67,17 @@ class Factory
$config = $sm->getServiceLocator()->get('VuFind\Config')->get('config'); $config = $sm->getServiceLocator()->get('VuFind\Config')->get('config');
$left = !isset($config->Site->sidebarOnLeft) $left = !isset($config->Site->sidebarOnLeft)
? false : $config->Site->sidebarOnLeft; ? false : $config->Site->sidebarOnLeft;
$mirror = !isset($config->Site->mirrorSidebarInRTL)
? true : $config->Site->mirrorSidebarInRTL;
$offcanvas = !isset($config->Site->offcanvas) $offcanvas = !isset($config->Site->offcanvas)
? false : $config->Site->offcanvas; ? false : $config->Site->offcanvas;
// The right-to-left setting is injected into the layout by the Bootstrapper;
// pull it back out here to avoid duplicate effort, then use it to apply
// the mirror setting appropriately.
$layout = $sm->getServiceLocator()->get('viewmanager')->getViewModel();
if ($layout->rtl && !$mirror) {
$left = !$left;
}
return new LayoutClass($left, $offcanvas); return new LayoutClass($left, $offcanvas);
} }
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
...@@ -30,11 +30,11 @@ namespace VuFind\View\Helper\Foundation; ...@@ -30,11 +30,11 @@ namespace VuFind\View\Helper\Foundation;
/** /**
* Flash message view helper * Flash message view helper
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link https://vufind.org/wiki/development Wiki
*/ */
class Flashmessages extends \VuFind\View\Helper\Root\Flashmessages class Flashmessages extends \VuFind\View\Helper\Root\Flashmessages
{ {
......
...@@ -19,22 +19,22 @@ ...@@ -19,22 +19,22 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link https://vufind.org/wiki/development Wiki
*/ */
namespace VuFind\View\Helper\Foundation; namespace VuFind\View\Helper\Foundation;
/** /**
* Highlight view helper * Highlight view helper
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link https://vufind.org/wiki/development Wiki
*/ */
class Highlight extends \VuFind\View\Helper\Root\Highlight class Highlight extends \VuFind\View\Helper\Root\Highlight
{ {
...@@ -46,4 +46,4 @@ class Highlight extends \VuFind\View\Helper\Root\Highlight ...@@ -46,4 +46,4 @@ class Highlight extends \VuFind\View\Helper\Root\Highlight
$this->startTag = '<mark>'; $this->startTag = '<mark>';
$this->endTag = '</mark>'; $this->endTag = '</mark>';
} }
} }
\ No newline at end of file
...@@ -20,11 +20,11 @@ ...@@ -20,11 +20,11 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link https://vufind.org/wiki/development Wiki
*/ */
namespace VuFind\View\Helper\Foundation; namespace VuFind\View\Helper\Foundation;
...@@ -32,11 +32,11 @@ namespace VuFind\View\Helper\Foundation; ...@@ -32,11 +32,11 @@ namespace VuFind\View\Helper\Foundation;
* Helper class for managing bootstrap theme's high-level (body vs. sidebar) page * Helper class for managing bootstrap theme's high-level (body vs. sidebar) page
* layout. * layout.
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link https://vufind.org/wiki/development Wiki
*/ */
class LayoutClass extends \VuFind\View\Helper\AbstractLayoutClass class LayoutClass extends \VuFind\View\Helper\AbstractLayoutClass
{ {
......
...@@ -19,22 +19,22 @@ ...@@ -19,22 +19,22 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link https://vufind.org/wiki/development Wiki
*/ */
namespace VuFind\View\Helper\Foundation; namespace VuFind\View\Helper\Foundation;
/** /**
* Helper class for displaying search-related HTML chunks. * Helper class for displaying search-related HTML chunks.
* *
* @category VuFind2 * @category VuFind
* @package View_Helpers * @package View_Helpers
* @author Demian Katz <demian.katz@villanova.edu> * @author Demian Katz <demian.katz@villanova.edu>
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License
* @link http://vufind.org/wiki/vufind2:developer_manual Wiki * @link https://vufind.org/wiki/development Wiki
*/ */
class Search extends \VuFind\View\Helper\AbstractSearch class Search extends \VuFind\View\Helper\AbstractSearch
{ {
...@@ -61,4 +61,4 @@ class Search extends \VuFind\View\Helper\AbstractSearch ...@@ -61,4 +61,4 @@ class Search extends \VuFind\View\Helper\AbstractSearch
return '<a href="' . $url . '" title="' . $view->transEsc('spell_expand_alt') return '<a href="' . $url . '" title="' . $view->transEsc('spell_expand_alt')
. '"><i class="icon-circle-arrow-right"></i></a>'; . '"><i class="icon-circle-arrow-right"></i></a>';
} }
} }
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment