Skip to content
Snippets Groups Projects
Commit 21ddfc61 authored by Demian Katz's avatar Demian Katz
Browse files

Do not open OPAC hold links in a lightbox.

- Resolves VUFIND-1242.
parent cc212b2a
No related merge requests found
......@@ -283,6 +283,7 @@ class Holds
$copy['link'] = $this->getRequestDetails(
$copy, $holdConfig['HMACKeys'], 'Hold'
);
$copy['allowLightbox'] = true;
// If we are unsure whether hold options are available,
// set a flag so we can check later via AJAX:
$copy['check'] = $copy['addLink'] === 'check';
......@@ -369,12 +370,16 @@ class Holds
= $this->catalog->getHoldLink(
$copy['id'], $copy
);
$holdings[$location_key][$copy_key]['allowLightbox']
= false;
} else {
/* Build non-opac link */
$holdings[$location_key][$copy_key]['link']
= $this->getRequestDetails(
$copy, $holdConfig['HMACKeys'], 'Hold'
);
$holdings[$location_key][$copy_key]['allowLightbox']
= true;
}
}
}
......
......@@ -109,7 +109,7 @@
<? /* Begin Available Items (Holds) */ ?>
<span class="text-success"><?=$this->transEsc("Available")?><link property="availability" href="http://schema.org/InStock" /></span>
<? if (isset($row['link']) && $row['link']): ?>
<a class="<?=$check ? 'checkRequest ' : ''?>placehold" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['link'])?>"><i class="fa fa-flag" aria-hidden="true"></i>&nbsp;<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?></a>
<a class="<?=$check ? 'checkRequest ' : ''?>placehold" <? if (!empty($row['allowLightbox'])): ?>data-lightbox <? endif; ?>href="<?=$this->recordLink()->getRequestUrl($row['link'])?>"><i class="fa fa-flag" aria-hidden="true"></i>&nbsp;<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?></a>
<? endif; ?>
<? if (isset($row['storageRetrievalRequestLink']) && $row['storageRetrievalRequestLink']): ?>
<a class="<?=$checkStorageRetrievalRequest ? 'checkStorageRetrievalRequest ' : ''?> placeStorageRetrievalRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['storageRetrievalRequestLink'])?>"><i class="fa fa-flag" aria-hidden="true"></i>&nbsp;<?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?></a>
......@@ -128,7 +128,7 @@
<span><?=$this->transEsc("Requests")?>: <?=$this->escapeHtml($row['requests_placed'])?></span>
<? endif; ?>
<? if (isset($row['link']) && $row['link']): ?>
<a class="<?=$check ? 'checkRequest' : ''?> placehold" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['link'])?>"><i class="fa fa-flag" aria-hidden="true"></i>&nbsp;<?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a>
<a class="<?=$check ? 'checkRequest' : ''?> placehold" <? if (!empty($row['allowLightbox'])): ?>data-lightbox <? endif; ?>href="<?=$this->recordLink()->getRequestUrl($row['link'])?>"><i class="fa fa-flag" aria-hidden="true"></i>&nbsp;<?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a>
<? endif; ?>
<? endif; ?>
<? if (isset($row['item_notes'])): ?>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment