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)}
{$pageLinks.all}
{/if} {/if} - {if !empty($showSearchTools) && !$showSearchToolsAtTop} + {if !empty($showSearchTools) && !$showSearchToolsAtTop && (empty($offline) || $enableEContentWhileOffline)}
{translate text='Search Tools' isPublicFacing=true}   - {translate text='Get RSS Feed' isPublicFacing=true}   + {if !empty($rssLink)}{translate text='Get RSS Feed' isPublicFacing=true}  {/if} {translate text='Email this Search' isPublicFacing=true}
{/if} diff --git a/code/web/interface/themes/responsive/Communico/event.tpl b/code/web/interface/themes/responsive/Communico/event.tpl index f523337ba5..0fe5a46890 100644 --- a/code/web/interface/themes/responsive/Communico/event.tpl +++ b/code/web/interface/themes/responsive/Communico/event.tpl @@ -101,9 +101,11 @@ {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} + {else empty($offline) || $enableEContentWhileOffline} {translate text="Add to Your Events" isPublicFacing=true} {/if} {/if} diff --git a/code/web/interface/themes/responsive/CourseReserves/list-none.tpl b/code/web/interface/themes/responsive/CourseReserves/list-none.tpl index 506f402b0b..4833e8abda 100644 --- a/code/web/interface/themes/responsive/CourseReserves/list-none.tpl +++ b/code/web/interface/themes/responsive/CourseReserves/list-none.tpl @@ -51,12 +51,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/CourseReserves/list.tpl b/code/web/interface/themes/responsive/CourseReserves/list.tpl index 4b66f963e0..0018c98872 100644 --- a/code/web/interface/themes/responsive/CourseReserves/list.tpl +++ b/code/web/interface/themes/responsive/CourseReserves/list.tpl @@ -74,12 +74,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/EBSCO/list.tpl b/code/web/interface/themes/responsive/EBSCO/list.tpl index 7ac62ffd77..85c19a5ac9 100644 --- a/code/web/interface/themes/responsive/EBSCO/list.tpl +++ b/code/web/interface/themes/responsive/EBSCO/list.tpl @@ -30,12 +30,14 @@
{translate text='Search Tools' isPublicFacing=true} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/EBSCO/result-tools-horizontal.tpl b/code/web/interface/themes/responsive/EBSCO/result-tools-horizontal.tpl index be7db97197..62013309b0 100644 --- a/code/web/interface/themes/responsive/EBSCO/result-tools-horizontal.tpl +++ b/code/web/interface/themes/responsive/EBSCO/result-tools-horizontal.tpl @@ -8,7 +8,7 @@ {translate text="More Info" isPublicFacing=true}
{/if} - {if $showFavorites == 1} + {if $showFavorites == 1 && (empty($offline) || $enableEContentWhileOffline)}
diff --git a/code/web/interface/themes/responsive/EBSCOhost/list.tpl b/code/web/interface/themes/responsive/EBSCOhost/list.tpl index d0844e1e2b..83483eb2b1 100644 --- a/code/web/interface/themes/responsive/EBSCOhost/list.tpl +++ b/code/web/interface/themes/responsive/EBSCOhost/list.tpl @@ -30,12 +30,14 @@
{translate text='Search Tools' isPublicFacing=true} {if !empty($rssLink)}{translate text='Get RSS Feed' isPublicFacing=true}{/if} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/EBSCOhost/result-tools-horizontal.tpl b/code/web/interface/themes/responsive/EBSCOhost/result-tools-horizontal.tpl index a896943878..a74bbea439 100644 --- a/code/web/interface/themes/responsive/EBSCOhost/result-tools-horizontal.tpl +++ b/code/web/interface/themes/responsive/EBSCOhost/result-tools-horizontal.tpl @@ -8,7 +8,7 @@ {translate text="More Info" isPublicFacing=true}
{/if} - {if $showFavorites == 1} + {if $showFavorites == 1 && (empty($offline) || $enableEContentWhileOffline)}
diff --git a/code/web/interface/themes/responsive/Events/list-none.tpl b/code/web/interface/themes/responsive/Events/list-none.tpl index 89a3266947..0080299f00 100644 --- a/code/web/interface/themes/responsive/Events/list-none.tpl +++ b/code/web/interface/themes/responsive/Events/list-none.tpl @@ -62,12 +62,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/Events/list.tpl b/code/web/interface/themes/responsive/Events/list.tpl index 367ed9b3e0..073a625677 100644 --- a/code/web/interface/themes/responsive/Events/list.tpl +++ b/code/web/interface/themes/responsive/Events/list.tpl @@ -72,12 +72,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/Genealogy/list.tpl b/code/web/interface/themes/responsive/Genealogy/list.tpl index cc0cc20d21..a0d7ee4cab 100644 --- a/code/web/interface/themes/responsive/Genealogy/list.tpl +++ b/code/web/interface/themes/responsive/Genealogy/list.tpl @@ -52,12 +52,14 @@
{translate text='Search Tools' isPublicFacing=true} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {if !empty($excelLink)}{translate text='Export To CSV' isPublicFacing=true}{/if} diff --git a/code/web/interface/themes/responsive/Genealogy/result-tools-horizontal.tpl b/code/web/interface/themes/responsive/Genealogy/result-tools-horizontal.tpl index 31e0f2537e..2a1000ed06 100644 --- a/code/web/interface/themes/responsive/Genealogy/result-tools-horizontal.tpl +++ b/code/web/interface/themes/responsive/Genealogy/result-tools-horizontal.tpl @@ -8,7 +8,7 @@ {translate text="More Info" isPublicFacing=true}
{/if} - {if $showFavorites == 1} + {if $showFavorites == 1 && (empty($offline) || $enableEContentWhileOffline)}
diff --git a/code/web/interface/themes/responsive/GroupedWork/result-tools-horizontal.tpl b/code/web/interface/themes/responsive/GroupedWork/result-tools-horizontal.tpl index 296e730dc6..9b1886d654 100644 --- a/code/web/interface/themes/responsive/GroupedWork/result-tools-horizontal.tpl +++ b/code/web/interface/themes/responsive/GroupedWork/result-tools-horizontal.tpl @@ -17,14 +17,16 @@ {if $showMoreInfo !== false} getPermanentId() isPublicFacing=true inAttribute=true}">{translate text="More Info" isPublicFacing=true} {/if} - {if $showComments == 1} - {* Hide Review Button for xs views in Search Results & User Lists *} - - {/if} - {if $showFavorites == 1} - + {if empty($offline) || $enableEContentWhileOffline} + {if $showComments == 1} + {* Hide Review Button for xs views in Search Results & User Lists *} + + {/if} + {if $showFavorites == 1} + + {/if} {/if} {if !empty($loggedIn) && $module == 'Search' && in_array('Manually Group and Ungroup Works', $userPermissions)} diff --git a/code/web/interface/themes/responsive/GroupedWork/result-tools.tpl b/code/web/interface/themes/responsive/GroupedWork/result-tools.tpl index a6ef4fae34..98ad38295a 100644 --- a/code/web/interface/themes/responsive/GroupedWork/result-tools.tpl +++ b/code/web/interface/themes/responsive/GroupedWork/result-tools.tpl @@ -1,5 +1,5 @@ {strip} - {if $showFavorites == 1} + {if $showFavorites == 1 && (empty($offline) || $enableEContentWhileOffline)}
{translate text="Add to List" isPublicFacing=true} diff --git a/code/web/interface/themes/responsive/LibraryMarket/event.tpl b/code/web/interface/themes/responsive/LibraryMarket/event.tpl index dd23e2bfda..f6cdc47c09 100644 --- a/code/web/interface/themes/responsive/LibraryMarket/event.tpl +++ b/code/web/interface/themes/responsive/LibraryMarket/event.tpl @@ -66,10 +66,12 @@ {else} {translate text="Registration Information" isPublicFacing=true} {/if} - {translate text="Go To Your Events" isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text="Go To Your Events" isPublicFacing=true} + {/if}

- {else} + {elseif empty($offline) || $enableEContentWhileOffline} {translate text="In Your Events" isPublicFacing=true} {/if} {else} @@ -81,9 +83,11 @@ {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/Lists/list-none.tpl b/code/web/interface/themes/responsive/Lists/list-none.tpl index 7aa4709451..8f5afce1de 100644 --- a/code/web/interface/themes/responsive/Lists/list-none.tpl +++ b/code/web/interface/themes/responsive/Lists/list-none.tpl @@ -51,12 +51,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {if !empty($excelLink)}{translate text='Export To CSV' isPublicFacing=true}{/if} diff --git a/code/web/interface/themes/responsive/Lists/list.tpl b/code/web/interface/themes/responsive/Lists/list.tpl index a9ccc4fcf2..d38b2f89e0 100644 --- a/code/web/interface/themes/responsive/Lists/list.tpl +++ b/code/web/interface/themes/responsive/Lists/list.tpl @@ -74,12 +74,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {if !empty($excelLink)}{translate text='Export To CSV' isPublicFacing=true}{/if} diff --git a/code/web/interface/themes/responsive/OpenArchives/list-none.tpl b/code/web/interface/themes/responsive/OpenArchives/list-none.tpl index 01d726fa6c..d3039f231e 100644 --- a/code/web/interface/themes/responsive/OpenArchives/list-none.tpl +++ b/code/web/interface/themes/responsive/OpenArchives/list-none.tpl @@ -62,12 +62,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/OpenArchives/list.tpl b/code/web/interface/themes/responsive/OpenArchives/list.tpl index 1efb696418..1f2912e5c9 100644 --- a/code/web/interface/themes/responsive/OpenArchives/list.tpl +++ b/code/web/interface/themes/responsive/OpenArchives/list.tpl @@ -77,12 +77,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/OpenArchives/result-tools-horizontal.tpl b/code/web/interface/themes/responsive/OpenArchives/result-tools-horizontal.tpl index 2ba9426861..4ed6b33bf1 100644 --- a/code/web/interface/themes/responsive/OpenArchives/result-tools-horizontal.tpl +++ b/code/web/interface/themes/responsive/OpenArchives/result-tools-horizontal.tpl @@ -8,7 +8,7 @@ {translate text="More Info" isPublicFacing=true} {/if} - {if $showFavorites == 1} + {if $showFavorites == 1 && (empty($offline) || $enableEContentWhileOffline)}
diff --git a/code/web/interface/themes/responsive/RecordDrivers/Events/assabet_result.tpl b/code/web/interface/themes/responsive/RecordDrivers/Events/assabet_result.tpl index 37861b773f..387fe8f174 100644 --- a/code/web/interface/themes/responsive/RecordDrivers/Events/assabet_result.tpl +++ b/code/web/interface/themes/responsive/RecordDrivers/Events/assabet_result.tpl @@ -85,11 +85,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}
diff --git a/code/web/interface/themes/responsive/RecordDrivers/Events/communico_result.tpl b/code/web/interface/themes/responsive/RecordDrivers/Events/communico_result.tpl index 6ee31ca1d8..e713083584 100644 --- a/code/web/interface/themes/responsive/RecordDrivers/Events/communico_result.tpl +++ b/code/web/interface/themes/responsive/RecordDrivers/Events/communico_result.tpl @@ -85,11 +85,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}
diff --git a/code/web/interface/themes/responsive/RecordDrivers/Events/library_calendar_result.tpl b/code/web/interface/themes/responsive/RecordDrivers/Events/library_calendar_result.tpl index 6a24a2292f..c0ba77e9e8 100644 --- a/code/web/interface/themes/responsive/RecordDrivers/Events/library_calendar_result.tpl +++ b/code/web/interface/themes/responsive/RecordDrivers/Events/library_calendar_result.tpl @@ -76,11 +76,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}
diff --git a/code/web/interface/themes/responsive/RecordDrivers/Events/listEntry.tpl b/code/web/interface/themes/responsive/RecordDrivers/Events/listEntry.tpl index 1b9373a25b..d2450fe5db 100644 --- a/code/web/interface/themes/responsive/RecordDrivers/Events/listEntry.tpl +++ b/code/web/interface/themes/responsive/RecordDrivers/Events/listEntry.tpl @@ -60,13 +60,15 @@ {if $recordDriver->isRegistrationRequired()}
{translate text="Registration Information" isPublicFacing=true} - {translate text="Add to Your Events" isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text="Add to Your Events" isPublicFacing=true} + {/if}
{* {translate text="Add to Your Events and Register" isPublicFacing=true} *} - {else} + {elseif empty($offline) || $enableEContentWhileOffline} {translate text="Add to Your Events" isPublicFacing=true} {/if} {/if} diff --git a/code/web/interface/themes/responsive/RecordDrivers/Events/springshare_libcal_result.tpl b/code/web/interface/themes/responsive/RecordDrivers/Events/springshare_libcal_result.tpl index 06b26910e7..d1ff3f358f 100644 --- a/code/web/interface/themes/responsive/RecordDrivers/Events/springshare_libcal_result.tpl +++ b/code/web/interface/themes/responsive/RecordDrivers/Events/springshare_libcal_result.tpl @@ -95,11 +95,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} diff --git a/code/web/interface/themes/responsive/RecordDrivers/GroupedWork/browse_result.tpl b/code/web/interface/themes/responsive/RecordDrivers/GroupedWork/browse_result.tpl index 39f79d7fcd..706c80a7c6 100644 --- a/code/web/interface/themes/responsive/RecordDrivers/GroupedWork/browse_result.tpl +++ b/code/web/interface/themes/responsive/RecordDrivers/GroupedWork/browse_result.tpl @@ -30,7 +30,7 @@ {if !empty($showRatings) && $browseCategoryRatingsMode != 0}
{/if} - {if $displayMaterialsRequest} + {if $displayMaterialsRequest && empty($offline)} {if $materialRequestType == 1} {* End Listing Options *} - {if !empty($placard)} {include file="Search/placard.tpl"} {/if} @@ -101,7 +100,7 @@
{/if} - {if $displayMaterialsRequest} + {if $displayMaterialsRequest && empty($offline)} {if $materialRequestType == 1}
-
diff --git a/code/web/interface/themes/responsive/Search/search-toolbar-popup.tpl b/code/web/interface/themes/responsive/Search/search-toolbar-popup.tpl index 262d510b45..f46be78103 100644 --- a/code/web/interface/themes/responsive/Search/search-toolbar-popup.tpl +++ b/code/web/interface/themes/responsive/Search/search-toolbar-popup.tpl @@ -38,14 +38,16 @@
{if !empty($showSearchTools)} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text='Remove Saved Search' isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} - {/if} - {/if} - {translate text='Email this Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text='Remove Saved Search' isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} + {/if} + {translate text='Email this Search' isPublicFacing=true} + {/if} {translate text='Get RSS Feed' isPublicFacing=true} {if !empty($excelLink)}{translate text='Export To CSV' isPublicFacing=true}{/if} {if !empty($risLink)}{translate text="Export To RIS" isPublicFacing=true}{/if} diff --git a/code/web/interface/themes/responsive/Search/search-toolbar.tpl b/code/web/interface/themes/responsive/Search/search-toolbar.tpl index 92c7a9b3b3..b0a7509d09 100644 --- a/code/web/interface/themes/responsive/Search/search-toolbar.tpl +++ b/code/web/interface/themes/responsive/Search/search-toolbar.tpl @@ -33,15 +33,19 @@
-
diff --git a/code/web/interface/themes/responsive/Springshare/event.tpl b/code/web/interface/themes/responsive/Springshare/event.tpl index 1b6281e5cf..21922b09aa 100644 --- a/code/web/interface/themes/responsive/Springshare/event.tpl +++ b/code/web/interface/themes/responsive/Springshare/event.tpl @@ -104,9 +104,11 @@ {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/Summon/list.tpl b/code/web/interface/themes/responsive/Summon/list.tpl index 983deeab48..f4dcb947bf 100644 --- a/code/web/interface/themes/responsive/Summon/list.tpl +++ b/code/web/interface/themes/responsive/Summon/list.tpl @@ -66,7 +66,7 @@ {if $showSearchTools || ($loggedIn && count($userPermissions) > 0)}
{translate text='Search Tools' isPublicFacing=true} - {if !empty($showSearchTools)} + {if !empty($showSearchTools) && (empty($offline) || $enableEContentWhileOffline)} {translate text='Email this Search' isPublicFacing=true} {if !empty($enableSavedSearches)} {if !empty($savedSearch)} diff --git a/code/web/interface/themes/responsive/Summon/result-tools-horizontal.tpl b/code/web/interface/themes/responsive/Summon/result-tools-horizontal.tpl index 2f44603abe..faa7821b90 100644 --- a/code/web/interface/themes/responsive/Summon/result-tools-horizontal.tpl +++ b/code/web/interface/themes/responsive/Summon/result-tools-horizontal.tpl @@ -8,7 +8,7 @@ {translate text="More Info" isPublicFacing=true}
{/if} - {if $showFavorites == 1} + {if $showFavorites == 1 && empty($offline) || $enableEContentWhileOffline}
diff --git a/code/web/interface/themes/responsive/Websites/list-none.tpl b/code/web/interface/themes/responsive/Websites/list-none.tpl index 445205bc07..a5efa83eb3 100644 --- a/code/web/interface/themes/responsive/Websites/list-none.tpl +++ b/code/web/interface/themes/responsive/Websites/list-none.tpl @@ -62,12 +62,14 @@ {translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{if !empty($excelLink)} diff --git a/code/web/interface/themes/responsive/Websites/list.tpl b/code/web/interface/themes/responsive/Websites/list.tpl index 44db39f52e..714284ffba 100644 --- a/code/web/interface/themes/responsive/Websites/list.tpl +++ b/code/web/interface/themes/responsive/Websites/list.tpl @@ -71,13 +71,17 @@
{translate text='Search Tools' isPublicFacing=true} {if !empty($showSearchTools)} - {translate text='Get RSS Feed' isPublicFacing=true} - {translate text='Email this Search' isPublicFacing=true} - {if !empty($enableSavedSearches)} - {if !empty($savedSearch)} - {translate text="Remove Saved Search" isPublicFacing=true} - {else} - {translate text='Save Search' isPublicFacing=true} + {if !empty($rssLink)} + {translate text='Get RSS Feed' isPublicFacing=true} + {/if} + {if empty($offline) || $enableEContentWhileOffline} + {translate text='Email this Search' isPublicFacing=true} + {if !empty($enableSavedSearches)} + {if !empty($savedSearch)} + {translate text="Remove Saved Search" isPublicFacing=true} + {else} + {translate text='Save Search' isPublicFacing=true} + {/if} {/if} {/if} {*{translate text='Export To CSV' isPublicFacing=true}*} diff --git a/code/web/interface/themes/responsive/js/aspen.js b/code/web/interface/themes/responsive/js/aspen.js index f2a2bcd502..d8d4df353e 100644 --- a/code/web/interface/themes/responsive/js/aspen.js +++ b/code/web/interface/themes/responsive/js/aspen.js @@ -7538,28 +7538,22 @@ AspenDiscovery.Account = (function () { }, regInfoModal: function (trigger, source, id, vendor, regLink) { - if (Globals.loggedIn) { - var url = Globals.path + "/MyAccount/AJAX"; - var params = { - 'method': 'eventRegistrationModal', - sourceId: id, - source: source, - regLink: regLink, - vendor: vendor - }; - // noinspection JSUnresolvedFunction - $.getJSON(url, params, function (data) { - if (data.success) { - AspenDiscovery.showMessageWithButtons(data.title, data.body, data.buttons, false); - } else { - AspenDiscovery.showMessage("Error", data.message); - } - }).fail(AspenDiscovery.ajaxFail); - }else { - AspenDiscovery.Account.ajaxLogin(null, function () { - return AspenDiscovery.Account.regInfoModal(trigger, source, id, vendor, regLink); - }, false); - } + var url = Globals.path + "/MyAccount/AJAX"; + var params = { + 'method': 'eventRegistrationModal', + sourceId: id, + source: source, + regLink: regLink, + vendor: vendor + }; + // noinspection JSUnresolvedFunction + $.getJSON(url, params, function (data) { + if (data.success) { + AspenDiscovery.showMessageWithButtons(data.title, data.body, data.buttons, false); + } else { + AspenDiscovery.showMessage("Error", data.message); + } + }).fail(AspenDiscovery.ajaxFail); return false; }, diff --git a/code/web/interface/themes/responsive/js/aspen/account.js b/code/web/interface/themes/responsive/js/aspen/account.js index c51d76cec4..f4afe08f44 100644 --- a/code/web/interface/themes/responsive/js/aspen/account.js +++ b/code/web/interface/themes/responsive/js/aspen/account.js @@ -2041,28 +2041,22 @@ AspenDiscovery.Account = (function () { }, regInfoModal: function (trigger, source, id, vendor, regLink) { - if (Globals.loggedIn) { - var url = Globals.path + "/MyAccount/AJAX"; - var params = { - 'method': 'eventRegistrationModal', - sourceId: id, - source: source, - regLink: regLink, - vendor: vendor - }; - // noinspection JSUnresolvedFunction - $.getJSON(url, params, function (data) { - if (data.success) { - AspenDiscovery.showMessageWithButtons(data.title, data.body, data.buttons, false); - } else { - AspenDiscovery.showMessage("Error", data.message); - } - }).fail(AspenDiscovery.ajaxFail); - }else { - AspenDiscovery.Account.ajaxLogin(null, function () { - return AspenDiscovery.Account.regInfoModal(trigger, source, id, vendor, regLink); - }, false); - } + var url = Globals.path + "/MyAccount/AJAX"; + var params = { + 'method': 'eventRegistrationModal', + sourceId: id, + source: source, + regLink: regLink, + vendor: vendor + }; + // noinspection JSUnresolvedFunction + $.getJSON(url, params, function (data) { + if (data.success) { + AspenDiscovery.showMessageWithButtons(data.title, data.body, data.buttons, false); + } else { + AspenDiscovery.showMessage("Error", data.message); + } + }).fail(AspenDiscovery.ajaxFail); return false; }, diff --git a/code/web/release_notes/24.07.00.MD b/code/web/release_notes/24.07.00.MD index 0250d011c0..f1cc2e2300 100644 --- a/code/web/release_notes/24.07.00.MD +++ b/code/web/release_notes/24.07.00.MD @@ -9,6 +9,8 @@ // kodi // katherine +### General Updates +- In offline mode, don't show buttons like Add a Review and Add to List that prompt a login. (Ticket 132443) (*KP*) // alexander diff --git a/code/web/services/GroupedWork/AJAX.php b/code/web/services/GroupedWork/AJAX.php index 615f4a48e5..db53e14dd6 100644 --- a/code/web/services/GroupedWork/AJAX.php +++ b/code/web/services/GroupedWork/AJAX.php @@ -521,7 +521,8 @@ function getWorkInfo() : array { 'text' => "More Info", 'isPublicFacing' => true, ]) . ""; - if(!$showFavorites) { + global $offlineMode; + if(!$showFavorites || $offlineMode) { $buttons = "