diff --git a/themes/vufind/blueprint/templates/RecordDriver/SolrDefault/tab-holdings.phtml b/themes/vufind/blueprint/templates/RecordDriver/SolrDefault/tab-holdings.phtml index f1e2c1796b97cdb8add859da1db9f4971134c7f2..53cd96e39f7c27a9ce2fe543fdc6d0266a0406ec 100644 --- a/themes/vufind/blueprint/templates/RecordDriver/SolrDefault/tab-holdings.phtml +++ b/themes/vufind/blueprint/templates/RecordDriver/SolrDefault/tab-holdings.phtml @@ -20,7 +20,7 @@ </div> <? endif; ?> <? if ((VF_ILS_Connection::getHoldsMode() == 'driver' && !empty($holdings)) || VF_ILS_Connection::getTitleHoldsMode() == 'driver'): ?> - <? if ($this->account->loginEnabled() && $offlineMode != 'ils-offline'): ?> + <? if ($this->layout()->account->loginEnabled() && $offlineMode != 'ils-offline'): ?> <? if (!$user): ?> <div class="info"> <a href="<?=$this->serverUrl()?>?login=true&catalogLogin=true"><?=$this->transEsc("Login")?></a> <?=$this->transEsc("hold_login")?> diff --git a/themes/vufind/blueprint/templates/header.phtml b/themes/vufind/blueprint/templates/header.phtml index 5290efe75a1962c85b9025f1bf7be839b6d9b631..ca603a830c81b0afe6f79101844f12034be332c3 100644 --- a/themes/vufind/blueprint/templates/header.phtml +++ b/themes/vufind/blueprint/templates/header.phtml @@ -1,3 +1,4 @@ +<? $account = $this->layout()->account; ?> <a id="logo" href="<?=$this->url('home')?>"></a> <div id="headerRight"> <? $cart = \VuFind\Cart::getInstance(); if ($cart->isActive()): ?> @@ -6,24 +7,24 @@ <a id="viewCart" title="<?=$this->transEsc('View Book Bag')?>" class="viewCart bookbag offscreen" href="<?=$this->url('cart-home')?>"><strong><span id="cartSize"><?=count($cart->getItems())?></span></strong> <?=$this->transEsc('items')?><span id="cartStatus"><?=$cart->isFull() ? $this->transEsc('bookbag_full') : ' '?></span></a> </div> <? endif; ?> - <? if (is_object($this->account) && $this->account->loginEnabled()): // hide login/logout if unavailable ?> - <div id="logoutOptions"<?=!$this->account->isLoggedIn() ? ' class="hide"' : ''?>> + <? if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?> + <div id="logoutOptions"<?=!$account->isLoggedIn() ? ' class="hide"' : ''?>> <a class="account" href="<?=$this->url('myresearch-home')?>"><?=$this->transEsc("Your Account")?></a> | <a class="logout" href="<?=$this->url('myresearch-logout')?>"><?=$this->transEsc("Log Out")?></a> </div> - <div id="loginOptions"<?=$this->account->isLoggedIn() ? ' class="hide"' : ''?>> - <? if ($sessionInitiator = $this->account->getSessionInitiator()): ?> + <div id="loginOptions"<?=$account->isLoggedIn() ? ' class="hide"' : ''?>> + <? if ($sessionInitiator = $account->getSessionInitiator()): ?> <a class="login" href="<?=$this->escape($sessionInitiator)?>"><?=$this->transEsc("Institutional Login")?></a> <? else: ?> <a class="login" href="<?=$this->url('myresearch-home')?>"><?=$this->transEsc("Login")?></a> <? endif; ?> </div> <? endif; ?> - <? if (isset($this->themeOptions) && count($this->themeOptions) > 1): ?> + <? if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?> <form method="post" name="themeForm" action="" id="themeForm"> <label for="themeForm_ui"><?=$this->transEsc("Theme")?>:</label> <select id="themeForm_ui" name="ui" class="jumpMenu"> - <? foreach ($this->themeOptions as $current): ?> + <? foreach ($this->layout()->themeOptions as $current): ?> <option value="<?=$this->escape($current['name'])?>"<?=$current['selected'] ? ' selected="selected"' : ''?>><?=$this->transEsc($current['desc'])?></option> <? endforeach; ?> </select> diff --git a/themes/vufind/blueprint/templates/myresearch/bulk-action-buttons.phtml b/themes/vufind/blueprint/templates/myresearch/bulk-action-buttons.phtml index 2327326be42197961d873009975f4a14d20bd020..a246154c8a91423dc8f9d426b33b7d0027adb6e6 100644 --- a/themes/vufind/blueprint/templates/myresearch/bulk-action-buttons.phtml +++ b/themes/vufind/blueprint/templates/myresearch/bulk-action-buttons.phtml @@ -3,7 +3,7 @@ <span class="floatleft">|</span> <span class="floatleft"><strong><?=$this->transEsc('with_selected')?>: </strong></span> <input type="submit" class="mail floatleft button" name="email" value="<?=$this->transEsc('Email')?>" title="<?=$this->transEsc('email_selected')?>"/> - <? if ((!is_null($this->list) && $this->list->editAllowed()) || is_null($this->list) && $this->account->isLoggedIn()): ?> + <? if ((!is_null($this->list) && $this->list->editAllowed()) || is_null($this->list) && $this->layout()->account->isLoggedIn()): ?> <input id="<?=$this->idPrefix?>delete_list_items_<?=!is_null($this->list) ? $this->escape($this->list->id) : ''?>" type="submit" class="delete floatleft button" name="delete" value="<?=$this->transEsc('Delete')?>" title="<?=$this->transEsc('delete_selected')?>"/> <? endif; ?> <? $exportOptions = VF_Export::getBulkOptions(); if (count($exportOptions) > 0): ?> diff --git a/themes/vufind/blueprint/templates/myresearch/login.phtml b/themes/vufind/blueprint/templates/myresearch/login.phtml index c841ece95d3b4bffb4e62e15a12e127fafe0d858..0efadba906342c5d7d1d382a154a90fc2c8a810b 100644 --- a/themes/vufind/blueprint/templates/myresearch/login.phtml +++ b/themes/vufind/blueprint/templates/myresearch/login.phtml @@ -13,7 +13,8 @@ } // Convenience variables: - $hideLogin = !(is_object($this->account) && $this->account->loginEnabled()); + $account = $this->layout()->account; + $hideLogin = !(is_object($account) && $account->loginEnabled()); $offlineMode = VF_Connection_Manager::connectToCatalog()->getOfflineMode(); ?> @@ -33,7 +34,7 @@ <? if ($hideLogin): ?> <div class="error"><?=$this->transEsc('login_disabled')?></div> <? else: ?> - <? if (!$this->account->getSessionInitiator()): // display default login form if no login URL provided ?> + <? if (!$account->getSessionInitiator()): // display default login form if no login URL provided ?> <form method="post" action="<?=$this->url('myresearch-home')?>" name="loginForm" id="loginForm"> <?=$this->auth()->getLoginFields()?> <input class="push-2 button" type="submit" name="processLogin" value="<?=$this->transEsc('Login')?>"/> @@ -44,10 +45,10 @@ $initJs = '$(document).ready(function() { $(\'#loginForm\').validate(); });'; echo $this->inlineScript(Zend_View_Helper_HeadScript::SCRIPT, $initJs); ?> - <? if ($this->account->supportsCreation()): ?> + <? if ($account->supportsCreation()): ?> <a class="new_account" href="<?=$this->url('myresearch-account')?>"><?=$this->transEsc('Create New Account')?></a> <? endif; ?> <? else: ?> - <a href="<?=$this->escape($this->account->getSessionInitiator())?>"><?=$this->transEsc("Institutional Login")?></a> + <a href="<?=$this->escape($account->getSessionInitiator())?>"><?=$this->transEsc("Institutional Login")?></a> <? endif; ?> <? endif; ?> \ No newline at end of file diff --git a/themes/vufind/blueprint/templates/myresearch/mylist.phtml b/themes/vufind/blueprint/templates/myresearch/mylist.phtml index 0bbe06004ffc5f78e6162b1c978ad0f23b0cd879..4cf1b7b93990fe2b213ce5dd426d00c8e525036b 100644 --- a/themes/vufind/blueprint/templates/myresearch/mylist.phtml +++ b/themes/vufind/blueprint/templates/myresearch/mylist.phtml @@ -13,6 +13,9 @@ // Load Javascript dependencies into header: $this->headScript()->appendFile("bulk_actions.js"); + + // Convenience variable: + $account = $this->layout()->account; ?> <?=$this->flashmessages()?> @@ -48,16 +51,16 @@ <input type="hidden" name="listID" value="<?=$this->escape($list->id)?>" /> <input type="hidden" name="listName" value="<?=$this->escape($list->title)?>" /> <? endif; ?> - <?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', array('idPrefix' => '', 'list' => isset($list) ? $list : null, 'account' => $this->account))?> + <?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', array('idPrefix' => '', 'list' => isset($list) ? $list : null))?> <ul class="recordSet"> <? $i = 0; foreach ($this->results->getResults() as $current): ?> <li class="result<?=(++$i % 2 == 0) ? ' alt' : ''?>"> <span class="recordNumber"><?=$this->results->getStartRecord()+$i-1?><?=$this->record($current)->getCheckbox()?></span> - <?=$this->record($current)->getListEntry($list, $this->account->isLoggedIn())?> + <?=$this->record($current)->getListEntry($list, $account->isLoggedIn())?> </li> <? endforeach; ?> </ul> - <?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', array('idPrefix' => 'bottom_', 'list' => isset($list) ? $list : null, 'account' => $this->account))?> + <?=$this->context($this)->renderInContext('myresearch/bulk-action-buttons.phtml', array('idPrefix' => 'bottom_', 'list' => isset($list) ? $list : null))?> </form> <?=$this->paginationControl($this->results->getPaginator(), 'Sliding', 'search/pagination.phtml', array('results' => $this->results))?> <? else: ?> diff --git a/themes/vufind/jquerymobile/templates/RecordDriver/SolrDefault/tab-holdings.phtml b/themes/vufind/jquerymobile/templates/RecordDriver/SolrDefault/tab-holdings.phtml index 9af7b5eb9994414d0f6392e2cc14e504e35b4ea4..f243908d4ae21c6fa4d78ce68bf258897e40babd 100644 --- a/themes/vufind/jquerymobile/templates/RecordDriver/SolrDefault/tab-holdings.phtml +++ b/themes/vufind/jquerymobile/templates/RecordDriver/SolrDefault/tab-holdings.phtml @@ -20,7 +20,7 @@ </div> <? endif; ?> <? if ((VF_ILS_Connection::getHoldsMode() == 'driver' && !empty($holdings)) || VF_ILS_Connection::getTitleHoldsMode() == 'driver'): ?> - <? if ($this->account->loginEnabled() && $offlineMode != 'ils-offline'): ?> + <? if ($this->layout()->account->loginEnabled() && $offlineMode != 'ils-offline'): ?> <? if (!$user): ?> <div class="info"> <a href="<?=$this->serverUrl()?>?login=true&catalogLogin=true"><?=$this->transEsc("Login")?></a> <?=$this->transEsc("hold_login")?> diff --git a/themes/vufind/jquerymobile/templates/default-footer-navbar.phtml b/themes/vufind/jquerymobile/templates/default-footer-navbar.phtml index d39f4a356ffef8b74b6cdba053d10f64c5b5a65c..7637a414779da5053f5bcae5fa01f68d70b0e6f4 100644 --- a/themes/vufind/jquerymobile/templates/default-footer-navbar.phtml +++ b/themes/vufind/jquerymobile/templates/default-footer-navbar.phtml @@ -1,10 +1,11 @@ +<? $account = $this->layout()->account; ?> <div data-role="navbar"> <ul> <li><a data-rel="dialog" href="#Language-dialog" data-transition="pop"><?=$this->transEsc('Language')?></a></li> - <? if (is_object($this->account) && $this->account->loginEnabled()): // hide login/logout if unavailable ?> + <? if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?> <li><a rel="external" href="<?=$this->url('myresearch-home')?>"><?=$this->transEsc('Account')?></a></li> <? endif; ?> - <? if (is_object($this->account) && $this->account->isLoggedIn()): ?> + <? if (is_object($account) && $account->isLoggedIn()): ?> <li><a rel="external" href="<?=$this->url('myresearch-logout')?>"><?=$this->transEsc("Log Out")?></a></li> <? endif; ?> </ul> diff --git a/themes/vufind/jquerymobile/templates/myresearch/footer-navbar.phtml b/themes/vufind/jquerymobile/templates/myresearch/footer-navbar.phtml index 0e1b7a80f1935eb5c3c1fc32eeea699cb652cf77..5de39491f9e0bd49679bb376dd4b4928f4ca86c4 100644 --- a/themes/vufind/jquerymobile/templates/myresearch/footer-navbar.phtml +++ b/themes/vufind/jquerymobile/templates/myresearch/footer-navbar.phtml @@ -1,4 +1,4 @@ -<? if ($this->account->isLoggedIn()): ?> +<? if ($this->layout()->account->isLoggedIn()): ?> <div data-role="navbar"> <ul> <li><a rel="external" <?=$this->action=="mylist" ? ' class="ui-btn-active"' : ''?> href="<?=$this->url('myresearch-favorites')?>"><?=$this->transEsc('Favorites')?></a></li> diff --git a/themes/vufind/jquerymobile/templates/myresearch/login.phtml b/themes/vufind/jquerymobile/templates/myresearch/login.phtml index b4be6532380baf166de3abb962ea1fd61e558fb0..2be28f8952ea751aa32b89497540dd29794f37e8 100644 --- a/themes/vufind/jquerymobile/templates/myresearch/login.phtml +++ b/themes/vufind/jquerymobile/templates/myresearch/login.phtml @@ -3,7 +3,8 @@ $this->headTitle($this->translate('Login')); // Convenience variables: - $hideLogin = !(is_object($this->account) && $this->account->loginEnabled()); + $account = $this->layout()->account; + $hideLogin = !(is_object($account) && $account->loginEnabled()); $offlineMode = VF_Connection_Manager::connectToCatalog()->getOfflineMode(); ?> <div data-role="page" id="MyResearch-login"> @@ -24,7 +25,7 @@ <? if (!$hideLogin): ?> <h3><?=$this->transEsc('Login')?></h3> <?=$this->flashmessages()?> - <? if (!$this->account->getSessionInitiator()): // display default login form if no login URL provided ?> + <? if (!$account->getSessionInitiator()): // display default login form if no login URL provided ?> <form method="post" action="<?=$this->url('myresearch-home')?>" name="loginForm" data-ajax="false"> <div data-role="fieldcontain"> <?=$this->auth()->getLoginFields()?> @@ -33,11 +34,11 @@ <input type="submit" name="processLogin" value="<?=$this->transEsc('Login')?>"/> </div> </form> - <? if ($this->account->supportsCreation()): ?> + <? if ($account->supportsCreation()): ?> <a rel="external" data-role="button" class="new_account" href="<?=$this->url('myresearch-account')?>"><?=$this->transEsc('Create New Account')?></a> <? endif; ?> <? else: ?> - <a rel="external" data-role="button" href="<?=$this->escape($this->account->getSessionInitiator())?>"><?=$this->transEsc("Institutional Login")?></a> + <a rel="external" data-role="button" href="<?=$this->escape($account->getSessionInitiator())?>"><?=$this->transEsc("Institutional Login")?></a> <? endif; ?> <? endif; ?> </div>