diff --git a/code/web/RecordDrivers/Axis360RecordDriver.php b/code/web/RecordDrivers/Axis360RecordDriver.php index 84670083c2..77ab63a1b5 100644 --- a/code/web/RecordDrivers/Axis360RecordDriver.php +++ b/code/web/RecordDrivers/Axis360RecordDriver.php @@ -201,7 +201,10 @@ public function getRecordActions($relatedRecord, $variationId, $isAvailable, $is $loadDefaultActions = count($this->_actions) == 0; } - if ($loadDefaultActions) { + //Check if catalog is offline and login for eResources should be allowed for offline + global $offlineMode; + global $loginAllowedWhileOffline; + if ($loadDefaultActions && (!$offlineMode || $loginAllowedWhileOffline)) { if ($isAvailable) { $this->_actions[] = [ 'title' => translate([ diff --git a/code/web/RecordDrivers/CloudLibraryRecordDriver.php b/code/web/RecordDrivers/CloudLibraryRecordDriver.php index abc96ca43d..80e71124c8 100644 --- a/code/web/RecordDrivers/CloudLibraryRecordDriver.php +++ b/code/web/RecordDrivers/CloudLibraryRecordDriver.php @@ -182,7 +182,10 @@ public function getRecordActions($relatedRecord, $variationId, $isAvailable, $is $loadDefaultActions = count($this->_actions) == 0; } - if ($loadDefaultActions) { + //Check if catalog is offline and login for eResources should be allowed for offline + global $offlineMode; + global $loginAllowedWhileOffline; + if ($loadDefaultActions && (!$offlineMode || $loginAllowedWhileOffline)) { if ($isAvailable) { $userId = UserAccount::getActiveUserId(); if ($userId == false) { diff --git a/code/web/RecordDrivers/HooplaRecordDriver.php b/code/web/RecordDrivers/HooplaRecordDriver.php index 7c4ad5131e..cfe69da410 100644 --- a/code/web/RecordDrivers/HooplaRecordDriver.php +++ b/code/web/RecordDrivers/HooplaRecordDriver.php @@ -238,7 +238,10 @@ function getRecordActions($relatedRecord, $variationId, $recordAvailable, $recor $loadDefaultActions = count($this->_actions) == 0; } - if ($loadDefaultActions) { + //Check if catalog is offline and login for eResources should be allowed for offline + global $offlineMode; + global $loginAllowedWhileOffline; + if ($loadDefaultActions && (!$offlineMode || $loginAllowedWhileOffline)) { /** @var Library $searchLibrary */ $searchLibrary = Library::getSearchLibrary(); if ($searchLibrary->hooplaLibraryID > 0) { // Library is enabled for Hoopla patron action integration diff --git a/code/web/RecordDrivers/OverDriveRecordDriver.php b/code/web/RecordDrivers/OverDriveRecordDriver.php index 431db42c76..94b8db4a3d 100644 --- a/code/web/RecordDrivers/OverDriveRecordDriver.php +++ b/code/web/RecordDrivers/OverDriveRecordDriver.php @@ -844,7 +844,11 @@ public function getRecordActions($relatedRecord, $variationId, $isAvailable, $is require_once ROOT_DIR . '/Drivers/OverDriveDriver.php'; $overDriveDriver = OverDriveDriver::getOverDriveDriver(); $readerName = $overDriveDriver->getReaderName(); - if (!$overDriveDriver->isCirculationEnabled()) { + //Check if catalog is offline and login for eResources should be allowed for offline + global $offlineMode; + global $loginAllowedWhileOffline; + //Show link to OverDrive record when the catalog is offline and can't do logins + if (!$overDriveDriver->isCirculationEnabled() || ($offlineMode && !$loginAllowedWhileOffline)) { $overDriveMetadata = $this->getOverDriveMetaData(); $crossRefId = $overDriveMetadata->getDecodedRawData()->crossRefId; $productUrl = $overDriveDriver->getProductUrl($crossRefId); @@ -869,7 +873,7 @@ public function getRecordActions($relatedRecord, $variationId, $isAvailable, $is $loadDefaultActions = count($this->_actions) == 0; } - if ($loadDefaultActions) { + if ($loadDefaultActions && (!$offlineMode || $loginAllowedWhileOffline)) { if ($isAvailable) { $this->_actions[] = [ 'title' => translate([ diff --git a/code/web/RecordDrivers/PalaceProjectRecordDriver.php b/code/web/RecordDrivers/PalaceProjectRecordDriver.php index 238e5e6dc5..f218040103 100644 --- a/code/web/RecordDrivers/PalaceProjectRecordDriver.php +++ b/code/web/RecordDrivers/PalaceProjectRecordDriver.php @@ -209,8 +209,10 @@ public function getRecordActions($relatedRecord, $variationId, $isAvailable, $is $this->_actions = array_merge($this->_actions, $user->getCirculatedRecordActions('palace_project', $this->id)); $loadDefaultActions = count($this->_actions) == 0; } - - if ($loadDefaultActions) { + //Check if catalog is offline and login for eResources should be allowed for offline + global $offlineMode; + global $loginAllowedWhileOffline; + if ($loadDefaultActions && (!$offlineMode || $loginAllowedWhileOffline)) { if (!empty($this->palaceProjectRawMetadata)) { foreach ($this->palaceProjectRawMetadata->links as $link) { if ($link->rel == 'http://opds-spec.org/acquisition/borrow') { diff --git a/code/web/interface/themes/responsive/Assabet/event.tpl b/code/web/interface/themes/responsive/Assabet/event.tpl index d958bc8e10..9153a75093 100644 --- a/code/web/interface/themes/responsive/Assabet/event.tpl +++ b/code/web/interface/themes/responsive/Assabet/event.tpl @@ -101,9 +101,13 @@ {else} {translate text="Registration Information" isPublicFacing=true} {/if} - {translate text="Add to Your Events" isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text="Add to Your Events" isPublicFacing=true} + {/if} - {else} + {elseif empty($offline) || $enableEContentWhileOffline} {translate text="Add to Your Events" isPublicFacing=true} {/if} {/if} diff --git a/code/web/interface/themes/responsive/Author/home.tpl b/code/web/interface/themes/responsive/Author/home.tpl index 9235db055b..aba2d4b8cd 100644 --- a/code/web/interface/themes/responsive/Author/home.tpl +++ b/code/web/interface/themes/responsive/Author/home.tpl @@ -39,10 +39,10 @@ {if !empty($pageLinks.all)}