Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…iscovery into 24.07.00
  • Loading branch information
mdnoble73 committed Jun 10, 2024
2 parents a43640f + c78cf1f commit 2e8d431
Show file tree
Hide file tree
Showing 46 changed files with 283 additions and 212 deletions.
5 changes: 4 additions & 1 deletion code/web/RecordDrivers/Axis360RecordDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down
5 changes: 4 additions & 1 deletion code/web/RecordDrivers/CloudLibraryRecordDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion code/web/RecordDrivers/HooplaRecordDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions code/web/RecordDrivers/OverDriveRecordDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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([
Expand Down
6 changes: 4 additions & 2 deletions code/web/RecordDrivers/PalaceProjectRecordDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
8 changes: 6 additions & 2 deletions code/web/interface/themes/responsive/Assabet/event.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,13 @@
{else}
<a href="{$recordDriver->getExternalUrl()}" class="btn btn-sm btn-action btn-register btn-wrap" target="_blank" style="width:70%" aria-label="{translate text="Registration Information" isPublicFacing=true inAttribute=true} ({translate text="opens in a new window" isPublicFacing=true inAttribute=true})"><i class="fas fa-external-link-alt" role="presentation"></i> {translate text="Registration Information" isPublicFacing=true}</a>
{/if}
<a onclick="return AspenDiscovery.Account.saveEvent(this, 'Events', '{$recordDriver->getUniqueID()|escape}', 'assabet');" class="btn btn-sm btn-action btn-wrap addToYourEventsBtn" style="width:70%">{translate text="Add to Your Events" isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a onclick="return AspenDiscovery.Account.saveEvent(this, 'Events', '{$recordDriver->getUniqueID()|escape}', 'assabet');"
class="btn btn-sm btn-action btn-wrap addToYourEventsBtn"
style="width:70%">{translate text="Add to Your Events" isPublicFacing=true}</a>
{/if}
</div>
{else}
{elseif empty($offline) || $enableEContentWhileOffline}
<a class="btn btn-sm btn-action btn-wrap addToYourEventsBtn" style="width:70%" onclick="return AspenDiscovery.Account.saveEvent(this, 'Events', '{$recordDriver->getUniqueID()|escape}', 'assabet');">{translate text="Add to Your Events" isPublicFacing=true}</a>
{/if}
{/if}
Expand Down
4 changes: 2 additions & 2 deletions code/web/interface/themes/responsive/Author/home.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
{if !empty($pageLinks.all)}<div class="text-center">{$pageLinks.all}</div>{/if}
{/if}

{if !empty($showSearchTools) && !$showSearchToolsAtTop}
{if !empty($showSearchTools) && !$showSearchToolsAtTop && (empty($offline) || $enableEContentWhileOffline)}
<div class="well small">
<strong>{translate text='Search Tools' isPublicFacing=true} </strong> &nbsp;
<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a> &nbsp;
{if !empty($rssLink)}<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a> &nbsp;{/if}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
</div>
{/if}
Expand Down
6 changes: 4 additions & 2 deletions code/web/interface/themes/responsive/Communico/event.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,11 @@
{else}
<a href="{$recordDriver->getExternalUrl()}" class="btn btn-sm btn-action btn-register btn-wrap" target="_blank" style="width:100%" aria-label="{translate text="Registration Information" isPublicFacing=true inAttribute=true} ({translate text="opens in a new window" isPublicFacing=true inAttribute=true})"><i class="fas fa-external-link-alt" role="presentation"></i> {translate text="Registration Information" isPublicFacing=true}</a>
{/if}
<a onclick="return AspenDiscovery.Account.saveEvent(this, 'Events', '{$recordDriver->getUniqueID()|escape}', 'communico');" class="btn btn-sm btn-action btn-wrap addToYourEventsBtn" style="width:100%">{translate text="Add to Your Events" isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a onclick="return AspenDiscovery.Account.saveEvent(this, 'Events', '{$recordDriver->getUniqueID()|escape}', 'communico');" class="btn btn-sm btn-action btn-wrap addToYourEventsBtn" style="width:100%">{translate text="Add to Your Events" isPublicFacing=true}</a>
{/if}
</div>
{else}
{else empty($offline) || $enableEContentWhileOffline}
<a class="btn btn-sm btn-action btn-wrap addToYourEventsBtn" style="width:70%" onclick="return AspenDiscovery.Account.saveEvent(this, 'Events', '{$recordDriver->getUniqueID()|escape}', 'communico');">{translate text="Add to Your Events" isPublicFacing=true}</a>
{/if}
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@
<strong>{translate text='Search Tools' isPublicFacing=true} </strong>
{if !empty($showSearchTools)}
<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a>
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{/if}
{/if}
{/if}
{*<a href="{$excelLink|escape}">{translate text='Export To CSV' isPublicFacing=true}</a>*}
Expand Down
14 changes: 8 additions & 6 deletions code/web/interface/themes/responsive/CourseReserves/list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@
<strong>{translate text='Search Tools' isPublicFacing=true} </strong>
{if !empty($showSearchTools)}
<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a>
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{/if}
{/if}
{/if}
{*<a href="{$excelLink|escape}">{translate text='Export To CSV' isPublicFacing=true}</a>*}
Expand Down
14 changes: 8 additions & 6 deletions code/web/interface/themes/responsive/EBSCO/list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@
<div class="search_tools well small">
<strong>{translate text='Search Tools' isPublicFacing=true} </strong>
<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a>
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true); ">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true); ">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{/if}
{/if}
{/if}
{*<a href="{$excelLink|escape}">{translate text='Export To CSV' isPublicFacing=true}</a>*}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="{if !empty($summUrl)}{$summUrl}{else}{$recordDriver->getLinkUrl()}{/if}" class="btn btn-sm btn-tools" onclick="AspenDiscovery.EBSCO.trackEdsUsage('{$recordDriver->getPermanentId()}')" target="_blank" aria-label="{translate text="More Info" isPublicFacing=true inAttribute=true} ({translate text="opens in a new window" isPublicFacing=true inAttribute=true})"><i class="fas fa-external-link-alt" role="presentation"></i> {translate text="More Info" isPublicFacing=true}</a>
</div>
{/if}
{if $showFavorites == 1}
{if $showFavorites == 1 && (empty($offline) || $enableEContentWhileOffline)}
<div class="btn-group btn-group-sm">
<button onclick="return AspenDiscovery.Account.showSaveToListForm(this, 'EbscoEds', '{$recordDriver->getPermanentId()|escape}');" class="btn btn-sm btn-tools addToListBtn">{translate text="Add to List" isPublicFacing=true}</button>
</div>
Expand Down
14 changes: 8 additions & 6 deletions code/web/interface/themes/responsive/EBSCOhost/list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@
<div class="search_tools well small">
<strong>{translate text='Search Tools' isPublicFacing=true} </strong>
{if !empty($rssLink)}<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a>{/if}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true); ">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true); ">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{/if}
{/if}
{/if}
{*<a href="{$excelLink|escape}">{translate text='Export To CSV' isPublicFacing=true}</a>*}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="{if !empty($summUrl)}{$summUrl}{else}{$recordDriver->getLinkUrl()}{/if}" class="btn btn-sm btn-tools" onclick="AspenDiscovery.EBSCO.trackEdsUsage('{$recordDriver->getPermanentId()}')" target="_blank" aria-label="{translate text="More Info" isPublicFacing=true inAttribute=true} ({translate text="opens in a new window" isPublicFacing=true inAttribute=true})"><i class="fas fa-external-link-alt" role="presentation"></i> {translate text="More Info" isPublicFacing=true}</a>
</div>
{/if}
{if $showFavorites == 1}
{if $showFavorites == 1 && (empty($offline) || $enableEContentWhileOffline)}
<div class="btn-group btn-group-sm">
<button onclick="return AspenDiscovery.Account.showSaveToListForm(this, 'Ebscohost', '{$recordDriver->getPermanentId()|escape}');" class="btn btn-sm btn-tools addToListBtn">{translate text="Add to List" isPublicFacing=true}</button>
</div>
Expand Down
14 changes: 8 additions & 6 deletions code/web/interface/themes/responsive/Events/list-none.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@
<strong>{translate text='Search Tools' isPublicFacing=true} </strong>
{if !empty($showSearchTools)}
<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a>
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{/if}
{/if}
{/if}
{*<a href="{$excelLink|escape}">{translate text='Export To CSV' isPublicFacing=true}</a>*}
Expand Down
14 changes: 8 additions & 6 deletions code/web/interface/themes/responsive/Events/list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@
<strong>{translate text='Search Tools' isPublicFacing=true} </strong>
{if !empty($showSearchTools)}
<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a>
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true);">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{/if}
{/if}
{/if}
{*<a href="{$excelLink|escape}">{translate text='Export To CSV' isPublicFacing=true}</a>*}
Expand Down
14 changes: 8 additions & 6 deletions code/web/interface/themes/responsive/Genealogy/list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@
<div class="search_tools well small">
<strong>{translate text='Search Tools' isPublicFacing=true} </strong>
<a href="{$rssLink|escape}">{translate text='Get RSS Feed' isPublicFacing=true}</a>
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true); ">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{if empty($offline) || $enableEContentWhileOffline}
<a href="#" onclick="return AspenDiscovery.Account.ajaxLightbox('/Search/AJAX?method=getEmailForm', true); ">{translate text='Email this Search' isPublicFacing=true}</a>
{if !empty($enableSavedSearches)}
{if !empty($savedSearch)}
<a href="/MyAccount/SaveSearch?delete={$searchId}">{translate text="Remove Saved Search" isPublicFacing=true}</a>
{else}
<a href="#" onclick="return AspenDiscovery.Account.showSaveSearchForm('{$searchId}')">{translate text='Save Search' isPublicFacing=true}</a>
{/if}
{/if}
{/if}
{if !empty($excelLink)}<a href="{$excelLink|escape}">{translate text='Export To CSV' isPublicFacing=true}</a>{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a href="{if !empty($summUrl)}{$summUrl}{else}{$recordDriver->getLinkUrl()}{/if}" class="btn btn-sm btn-tools">{translate text="More Info" isPublicFacing=true}</a>
</div>
{/if}
{if $showFavorites == 1}
{if $showFavorites == 1 && (empty($offline) || $enableEContentWhileOffline)}
<div class="btn-group btn-group-sm">
<button onclick="return AspenDiscovery.Account.showSaveToListForm(this, 'Genealogy', '{$recordDriver->getPermanentId()|escape}');" class="btn btn-sm btn-tools addToListBtn">{translate text="Add to List" isPublicFacing=true}</button>
</div>
Expand Down
Loading

0 comments on commit 2e8d431

Please sign in to comment.