diff --git a/module/VuFind/src/VuFind/Theme/Root/Helper/OfflineMode.php b/module/VuFind/src/VuFind/Theme/Root/Helper/OfflineMode.php deleted file mode 100644 index 1d23c17a1ce86d4e72894b4a9710e3f0ec48662a..0000000000000000000000000000000000000000 --- a/module/VuFind/src/VuFind/Theme/Root/Helper/OfflineMode.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * "Offline mode" view helper - * - * PHP version 5 - * - * Copyright (C) Villanova University 2010. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * @category VuFind2 - * @package View_Helpers - * @author Demian Katz <demian.katz@villanova.edu> - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link http://vufind.org/wiki/building_a_recommendations_module Wiki - */ -namespace VuFind\Theme\Root\Helper; -use VuFind\Connection\Manager as ConnectionManager, - VuFind\Search\Options, Zend\View\Helper\AbstractHelper; - -/** - * "Offline mode" view helper - * - * @category VuFind2 - * @package View_Helpers - * @author Demian Katz <demian.katz@villanova.edu> - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link http://vufind.org/wiki/building_a_recommendations_module Wiki - */ -class OfflineMode extends AbstractHelper -{ - /** - * Wrapper function to the get the catalog's current offline mode. - * - * @return string - */ - public function __invoke() - { - return ConnectionManager::connectToCatalog()->getOfflineMode(); - } -} \ No newline at end of file diff --git a/themes/blueprint/templates/search/home.phtml b/themes/blueprint/templates/search/home.phtml index 57ad5e5cfa874bb16d4a06ebc68bc2f1168b78da..eaf3e74d80a2c2bd4b3c9fef436c7ca274bde5c9 100644 --- a/themes/blueprint/templates/search/home.phtml +++ b/themes/blueprint/templates/search/home.phtml @@ -16,7 +16,7 @@ $advSearch = $options->getAdvancedSearchAction(); ?> <div class="searchHomeContent"> - <? if ($this->offlineMode() == "ils-offline"): ?> + <? if ($this->ils()->getOfflineMode() == "ils-offline"): ?> <div class="sysInfo"> <h2><?=$this->transEsc('ils_offline_title')?></h2> <p><strong><?=$this->transEsc('ils_offline_status')?></strong></p> diff --git a/themes/jquerymobile/templates/search/home.phtml b/themes/jquerymobile/templates/search/home.phtml index 5951e27443a1debc6551dcc9cb63317a44aae960..57e2620860c45a703ba91ae9277073ebfd00db54 100644 --- a/themes/jquerymobile/templates/search/home.phtml +++ b/themes/jquerymobile/templates/search/home.phtml @@ -5,7 +5,7 @@ <div data-role="page" id="Search-home"> <?=$this->mobileMenu()->header(array('searchLink' => false, 'results' => null))?> <div data-role="content"> - <? if ($this->offlineMode() == "ils-offline"): ?> + <? if ($this->ils()->getOfflineMode() == "ils-offline"): ?> <div class="sysInfo"> <h2><?=$this->transEsc('ils_offline_title')?></h2> <p><strong><?=$this->transEsc('ils_offline_status')?></strong></p> diff --git a/themes/root/theme.ini b/themes/root/theme.ini index 0a40eaebf66788ea46b9506361a0fcc6a11c8038..8a29b3c6633b035fab0564eb5814d8cce84aedc1 100644 --- a/themes/root/theme.ini +++ b/themes/root/theme.ini @@ -24,7 +24,6 @@ helpers_to_register[] = "ImageLink" helpers_to_register[] = "InlineScript" helpers_to_register[] = "JqueryValidation" helpers_to_register[] = "MobileUrl" -helpers_to_register[] = "OfflineMode" helpers_to_register[] = "OpenUrl" helpers_to_register[] = "Printms" helpers_to_register[] = "ProxyUrl"