From 60fe93ad6d5b0a496a9a56cf9fca8635712cc4eb Mon Sep 17 00:00:00 2001
From: Claas Kazzer <kazzer@uni-leipzig.de>
Date: Thu, 31 Mar 2016 14:45:40 +0200
Subject: [PATCH] refs #7169: * inclusion of core update-related fixes in finc

---
 .../templates/RecordDriver/SolrAI/core.phtml  |  13 +-
 .../RecordDriver/SolrAI/result-list.phtml     |  19 ++-
 .../RecordDriver/SolrDefault/core.phtml       |  13 +-
 .../SolrDefault/result-list.phtml             |  28 ++--
 .../templates/RecordTab/holdingsils.phtml     |  49 ++++--
 themes/finc/templates/collection/view.phtml   | 156 +++++++++---------
 themes/finc/templates/footer.phtml            |   2 +-
 themes/finc/templates/header.phtml            | 147 +++++++++--------
 themes/finc/templates/record/view.phtml       |  17 +-
 themes/finc/templates/search/searchbox.phtml  |  31 +++-
 10 files changed, 267 insertions(+), 208 deletions(-)

diff --git a/themes/finc/templates/RecordDriver/SolrAI/core.phtml b/themes/finc/templates/RecordDriver/SolrAI/core.phtml
index 333ade8e09a..2f83e1d7c8e 100644
--- a/themes/finc/templates/RecordDriver/SolrAI/core.phtml
+++ b/themes/finc/templates/RecordDriver/SolrAI/core.phtml
@@ -65,8 +65,11 @@ if($loggedin = $this->auth()->isLoggedIn()) {
       <tr>
         <th><?=$this->transEsc('Journal Title')?>:</th>
         <td>
-          <? $containerID = $this->driver->getContainerRecordID(); ?>
-          <a href="<?=($containerID ? $this->recordLink()->getUrl("VuFind|$containerID") : $this->record($this->driver)->getLink('journaltitle', $journalTitle))?>"><?=$this->escapeHtml($journalTitle)?></a>
+          <?
+          $containerSource = $this->driver->getSourceIdentifier();
+          $containerID = $this->driver->getContainerRecordID();
+          ?>
+          <a href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', $journalTitle))?>"><?=$this->escapeHtml($journalTitle)?></a>
           <? $ref = $this->driver->getContainerReference(); if (!empty($ref)) { echo $this->escapeHtml($ref); } ?>
         </td>
       </tr>
@@ -204,13 +207,13 @@ if($loggedin = $this->auth()->isLoggedIn()) {
         <th><?=$this->transEsc('Subjects')?>: </th>
         <td>
           <? foreach ($subjects as $field): ?>
-          <div class="subjectLine" property="keywords">
+          <div class="subject-line" property="keywords">
             <? $subject = ''; ?>
             <? if(count($field) == 1) $field = explode('--', $field[0]); ?>
             <? $i = 0; foreach ($field as $subfield): ?>
               <?=($i++ == 0) ? '' : ' &gt; '?>
               <? $subject = trim($subject . ' ' . $subfield); ?>
-              <a class="backlink" title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"><?=trim($this->escapeHtml($subfield))?></a>
+              <a title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"><?=trim($this->escapeHtml($subfield))?></a>
             <? endforeach; ?>
           </div>
           <? endforeach; ?>
@@ -273,7 +276,7 @@ if($loggedin = $this->auth()->isLoggedIn()) {
           <th><?=$this->transEsc('Tags')?>: </th>
           <td>
             <span class="right hide-for-print">
-              <a class="tagRecord modal-link right" href="<?=$this->recordLink()->getActionUrl($this->driver, 'AddTag')?>" title="<?=$this->transEsc('Add Tag')?>"><i class="fa fa-plus"></i><?=$this->transEsc('Add Tag')?></a>
+              <a class="tagRecord right" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'AddTag')?>" title="<?=$this->transEsc('Add Tag')?>"><i class="fa fa-plus"></i><?=$this->transEsc('Add Tag')?></a>
             </span>
             <?=$this->context($this)->renderInContext('record/taglist', array('tagList'=>$tagList, 'loggedin'=>$loggedin)) ?>
           </td>
diff --git a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml
index f2944e34703..885af255d86 100644
--- a/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml
+++ b/themes/finc/templates/RecordDriver/SolrAI/result-list.phtml
@@ -3,7 +3,7 @@
   <div class="row">
     <div>
       <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueID())?>" class="hiddenId" />
-      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" class="hiddenSource" />
+      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/>
     </div>
     <? if ($cover = $this->record($this->driver)->getCover('result-list', 'medium', $this->recordLink()->getUrl($this->driver))): ?>
     <div class="small-3 medium-2 columns left"><?=$cover?></div>
@@ -25,6 +25,7 @@
         <? if ($this->driver->isCollection()): ?>
           <?=implode('<br>', array_map(array($this, 'escapeHtml'), $this->driver->getSummary()));?>
         <? else: ?>
+          <?/* getCombinedAuthors etc below is ok - 04.16 - CK */?>
           <? $summAuthors = $this->driver->getCombinedAuthors(); if (!empty($summAuthors)): ?>
           <? foreach($summAuthors as $summAuthor) : ?>
             <a href="<?=$this->record($this->driver)->getLink('author', $summAuthor)?>" class="author"><?
@@ -36,24 +37,25 @@
             </a>
           <? endforeach; ?>
           <? endif; ?>
-
+          <?/* getPublishDateSort etc below is ok - 04.16 - CK */?>
           <? $journalTitle = $this->driver->getContainerTitle();
           $summDate = $this->driver->getPublishDateSort(); $placesOfPublication = $this->driver->getPlacesOfPublication(); ?>
           <? if (!empty($journalTitle)): ?>
             <?=!empty($summAuthor) ? '<br />' : ''?>
             <?=$this->transEsc('Published in')?>
+            <? $containerSource = $this->driver->getSourceIdentifier(); ?>
             <? $containerID = $this->driver->getContainerRecordID(); ?>
             <? /* TODO: handle highlighting more elegantly here: */ ?>
-            <a href="<?=($containerID ? $this->recordLink()->getUrl("VuFind|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)))?>"><?=$this->highlight($journalTitle)?></a>
-            <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate) . ')' : ''?>
+            <a href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)))?>"><?=$this->highlight($journalTitle) ?></a>
+                <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?>
           <? elseif (!empty($summDate)): ?>
             <?=!empty($summAuthor) ? '<br />' : ''?>
-            <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate)?>
+                <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?>
           <? endif; ?>
           <? $summInCollection = $this->driver->getContainingCollections(); if (!empty($summInCollection)): ?>
             <? foreach ($summInCollection as $collId => $collText): ?>
               <div>
-                <b><?=$this->transEsc("in_collection_label")?></b>
+                <strong><?=$this->transEsc("in_collection_label")?></strong>
                 <a class="collectionLinkText" href="<?=$this->url('collection', array('id' => $collId))?>?recordID=<?=urlencode($this->driver->getUniqueID())?>">
                   <?=$this->escapeHtml($collText)?>
                 </a>
@@ -179,8 +181,7 @@
 
       <? if ($this->userlist()->getMode() !== 'disabled'): ?>
         <? /* Add to favorites */ ?>
-        <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" class="save-record modal-link" id="<?=$this->driver->getUniqueId()?>" title="<?=$this->transEsc('Add to favorites')?>"><i class="fa fa-fw fa-star"></i><?=$this->transEsc('Add to favorites')?></a><br/>
-
+           <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId()) ?>" title="<?=$this->transEsc('Add to favorites')?>"><i class="fa fa-fw fa-star"></i> <?=$this->transEsc('Add to favorites')?></a><br/>
         <? /* Saved lists */ ?>
         <div class="savedLists hide alert-box info" data-alert tabindex="0" aria-live="assertive" role="dialogalert">
           <strong><?=$this->transEsc("Saved in")?>:</strong>
@@ -194,7 +195,7 @@
           <div class="hierarchyTreeLink">
             <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId" />
             <i class="fa fa-fw fa-sitemap"></i>
-            <a class="hierarchyTreeLinkText modal-link" href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>" title="<?=$this->transEsc('hierarchy_tree')?>">
+            <a class="hierarchyTreeLinkText" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>" title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree">
               <?=$this->transEsc('hierarchy_view_context')?><? if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><? endif; ?>
             </a>
           </div>
diff --git a/themes/finc/templates/RecordDriver/SolrDefault/core.phtml b/themes/finc/templates/RecordDriver/SolrDefault/core.phtml
index af7e778125e..37802516574 100644
--- a/themes/finc/templates/RecordDriver/SolrDefault/core.phtml
+++ b/themes/finc/templates/RecordDriver/SolrDefault/core.phtml
@@ -67,8 +67,11 @@ if($loggedin = $this->auth()->isLoggedIn()) {
       <tr>
         <th><?=$this->transEsc('Published in')?>:</th>
         <td>
-          <? $containerID = $this->driver->getContainerRecordID(); ?>
-          <a href="<?=($containerID ? $this->recordLink()->getUrl("VuFind|$containerID") : $this->record($this->driver)->getLink('journaltitle', $journalTitle))?>"><?=$this->escapeHtml($journalTitle)?></a>
+          <?
+          $containerSource = $this->driver->getSourceIdentifier();
+          $containerID = $this->driver->getContainerRecordID();
+          ?>
+          <a href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', $journalTitle))?>"><?=$this->escapeHtml($journalTitle)?></a>
           <? $ref = $this->driver->getContainerReference(); if (!empty($ref)) { echo $this->escapeHtml($ref); } ?>
         </td>
       </tr>
@@ -194,13 +197,13 @@ if($loggedin = $this->auth()->isLoggedIn()) {
         <th><?=$this->transEsc('Subjects')?>: </th>
         <td>
           <? foreach ($subjects as $field): ?>
-          <div class="subjectLine" property="keywords">
+          <div class="subject-line" property="keywords">
             <? $subject = ''; ?>
             <? if(count($field) == 1) $field = explode('--', $field[0]); ?>
             <? $i = 0; foreach ($field as $subfield): ?>
               <?=($i++ == 0) ? '' : ' &gt; '?>
               <? $subject = trim($subject . ' ' . $subfield); ?>
-              <a class="backlink" title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"><?=trim($this->escapeHtml($subfield))?></a>
+              <a title="<?=$this->escapeHtmlAttr($subject)?>" href="<?=$this->record($this->driver)->getLink('subject', $subject)?>" rel="nofollow"><?=trim($this->escapeHtml($subfield))?></a>
             <? endforeach; ?>
           </div>
           <? endforeach; ?>
@@ -263,7 +266,7 @@ if($loggedin = $this->auth()->isLoggedIn()) {
           <th><?=$this->transEsc('Tags')?>: </th>
           <td>
             <span class="right hide-for-print">
-              <a class="tagRecord modal-link right" href="<?=$this->recordLink()->getActionUrl($this->driver, 'AddTag')?>" title="<?=$this->transEsc('Add Tag')?>"><i class="fa fa-plus"></i><?=$this->transEsc('Add Tag')?></a>
+              <a class="tagRecord right" data-lightbox href="<?=$this->recordLink()->getActionUrl($this->driver, 'AddTag')?>" title="<?=$this->transEsc('Add Tag')?>"><i class="fa fa-plus"></i><?=$this->transEsc('Add Tag')?></a>
             </span>
             <?=$this->context($this)->renderInContext('record/taglist', array('tagList'=>$tagList, 'loggedin'=>$loggedin)) ?>
           </td>
diff --git a/themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml b/themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml
index 33d76738124..7190ce2aac4 100644
--- a/themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml
+++ b/themes/finc/templates/RecordDriver/SolrDefault/result-list.phtml
@@ -2,8 +2,8 @@
 <div class="<?=$this->driver->supportsAjaxStatus() ? 'ajaxItem ' : ''?> small-11 columns">
   <div class="row">
     <div>
-      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueID())?>" class="hiddenId" />
-      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" class="hiddenSource" />
+      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueID())?>" class="hiddenId"/>
+      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/>
     </div>
     <? if ($cover = $this->record($this->driver)->getCover('result-list', 'medium', $this->recordLink()->getUrl($this->driver))): ?>
     <div class="small-3 medium-2 columns left"><?=$cover?></div>
@@ -14,7 +14,7 @@
       <div class="small-6 medium-7 columns middle">
         <? else : ?>
         <div class="small-9 columns middle">
-    <? /* EOF - finc-specific StyleBasedIcons */ ?>
+          <? /* EOF - finc-specific StyleBasedIcons */ ?>
           <? endif ?>
           <div>
             <a href="<?=$this->recordLink()->getUrl($this->driver)?>" class="title">
@@ -32,8 +32,8 @@
                 <a href="<?=$this->record($this->driver)->getLink('author', $summAuthor)?>" class="author"><?
                   $summHighlightedAuthor = $this->driver->getHighlightedAuthor();
                   echo !empty($summHighlightedAuthor)
-                      ? $this->highlight($summHighlightedAuthor)
-                      : $this->escapeHtml($summAuthor);
+                    ? $this->highlight($summHighlightedAuthor)
+                    : $this->escapeHtml($summAuthor);
                   ?>
                 </a>
               <? endif; ?>
@@ -43,18 +43,20 @@
               <? if (!empty($journalTitle)): ?>
                 <?=!empty($summAuthor) ? '<br />' : ''?>
                 <?=$this->transEsc('Published in')?>
+            <? $containerSource = $this->driver->getSourceIdentifier(); ?>
                 <? $containerID = $this->driver->getContainerRecordID(); ?>
                 <? /* TODO: handle highlighting more elegantly here: */ ?>
-                <a href="<?=($containerID ? $this->recordLink()->getUrl("VuFind|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)))?>"><?=$this->highlight($journalTitle)?></a>
+            <a href="<?=($containerID ? $this->recordLink()->getUrl("$containerSource|$containerID") : $this->record($this->driver)->getLink('journaltitle', str_replace(array('{{{{START_HILITE}}}}', '{{{{END_HILITE}}}}'), '', $journalTitle)))?>"><?=$this->highlight($journalTitle) ?></a>
                 <?=!empty($summDate) ? ' (' . $this->escapeHtml($summDate[0]) . ')' : ''?>
               <? elseif (!empty($summDate)): ?>
                 <?=!empty($summAuthor) ? '<br />' : ''?>
                 <?=$this->transEsc('Published') . ' ' . $this->escapeHtml($summDate[0])?>
               <? endif; ?>
-              <? $summInCollection = $this->driver->getContainingCollections(); if (!empty($summInCollection)): ?>
+              <? $summInCollection = $this->driver->getContainingCollections();
+              if (!empty($summInCollection)): ?>
                 <? foreach ($summInCollection as $collId => $collText): ?>
                   <div>
-                    <b><?=$this->transEsc("in_collection_label")?></b>
+                <strong><?=$this->transEsc("in_collection_label")?></strong>
                     <a class="collectionLinkText" href="<?=$this->url('collection', array('id' => $collId))?>?recordID=<?=urlencode($this->driver->getUniqueID())?>">
                       <?=$this->escapeHtml($collText)?>
                     </a>
@@ -111,7 +113,8 @@
           </span>
               <div class="locationDetails"></div>
             <? else: ?>
-              <? $summCallNo = $this->driver->getCallNumber(); if (!empty($summCallNo)): ?>
+              <? $summCallNo = $this->driver->getCallNumber();
+              if (!empty($summCallNo)): ?>
                 <strong><?=$this->transEsc('Call Number')?>:</strong> <?=$this->escapeHtml($summCallNo)?>
               <? endif; ?>
             <? endif; ?>
@@ -175,8 +178,7 @@
 
           <? if ($this->userlist()->getMode() !== 'disabled'): ?>
             <? /* Add to favorites */ ?>
-            <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" class="save-record modal-link" id="<?=$this->driver->getUniqueId()?>" title="<?=$this->transEsc('Add to favorites')?>"><i class="fa fa-fw fa-star"></i><?=$this->transEsc('Add to favorites')?></a><br/>
-
+           <a href="<?=$this->recordLink()->getActionUrl($this->driver, 'Save')?>" data-lightbox class="save-record" data-id="<?=$this->escapeHtmlAttr($this->driver->getUniqueId()) ?>" title="<?=$this->transEsc('Add to favorites')?>"><i class="fa fa-fw fa-star"></i> <?=$this->transEsc('Add to favorites')?></a><br/>
             <? /* Saved lists */ ?>
             <div class="savedLists hide alert-box info" data-alert tabindex="0" aria-live="assertive" role="dialogalert">
               <strong><?=$this->transEsc("Saved in")?>:</strong>
@@ -188,9 +190,9 @@
           if (!empty($trees)): ?>
             <? foreach ($trees as $hierarchyID => $hierarchyTitle): ?>
               <div class="hierarchyTreeLink">
-                <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId" />
+                <input type="hidden" value="<?=$this->escapeHtmlAttr($hierarchyID)?>" class="hiddenHierarchyId"/>
                 <i class="fa fa-fw fa-sitemap"></i>
-                <a class="hierarchyTreeLinkText modal-link" href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>" title="<?=$this->transEsc('hierarchy_tree')?>">
+            <a class="hierarchyTreeLinkText" data-lightbox href="<?=$this->recordLink()->getTabUrl($this->driver, 'HierarchyTree')?>?hierarchy=<?=urlencode($hierarchyID)?>" title="<?=$this->transEsc('hierarchy_tree')?>" data-lightbox-href="<?=$this->recordLink()->getTabUrl($this->driver, 'AjaxTab')?>?hierarchy=<?=urlencode($hierarchyID)?>" data-lightbox-post="tab=hierarchytree">
                   <?=$this->transEsc('hierarchy_view_context')?><? if (count($trees) > 1): ?>: <?=$this->escapeHtml($hierarchyTitle)?><? endif; ?>
                 </a>
               </div>
diff --git a/themes/finc/templates/RecordTab/holdingsils.phtml b/themes/finc/templates/RecordTab/holdingsils.phtml
index 2fbb8267d4a..1e071d2cccc 100644
--- a/themes/finc/templates/RecordTab/holdingsils.phtml
+++ b/themes/finc/templates/RecordTab/holdingsils.phtml
@@ -28,7 +28,7 @@
   <? if ($account->loginEnabled() && $offlineMode != 'ils-offline'): ?>
     <? if (!$user): ?>
       <div data-alert class="alert-box info" tabindex="0" aria-live="assertive" role="dialogalert">
-        <a href="<?=$this->recordLink()->getTabUrl($this->driver, 'Holdings')?>?login=true&amp;catalogLogin=true"><?=$this->transEsc("Login")?></a> <?=$this->transEsc("hold_login")?>
+        <a href="<?=$this->recordLink()->getTabUrl($this->driver, 'Holdings')?>?login=true&amp;catalogLogin=true" data-lightbox><?=$this->transEsc("Login")?></a> <?=$this->transEsc("hold_login")?>
       </div>
     <? elseif (!$user->cat_username): ?>
       <div data-alert class="alert-box info" tabindex="0" aria-live="assertive" role="dialogalert">
@@ -38,7 +38,7 @@
   <? endif; ?>
 <? endif; ?>
 <? $holdingTitleHold = $this->driver->tryMethod('getRealTimeTitleHold'); if (!empty($holdingTitleHold)): ?>
-    <a class="placehold modal-link button small" title="<?=$this->transEsc('request_place_text')?>" href="<?=$this->recordLink()->getRequestUrl($holdingTitleHold)?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc('title_hold_place')?></a>
+    <a class="placehold" data-lightbox title="<?=$this->transEsc('request_place_text')?>" href="<?=$this->recordLink()->getRequestUrl($holdingTitleHold)?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc('title_hold_place')?></a>
 <? endif; ?>
 <? if (!empty($urls) || $openUrlActive): ?>
   <h3><?=$this->transEsc("Internet")?></h3>
@@ -59,16 +59,27 @@
     <? endif; ?>
   </h3>
 <table class="table" summary="<?=$this->transEsc('Holdings details from')?> <?=$this->transEsc($holding['location'])?>">
+  <? /* WE USE NO callNos here, next are th for availability and details - 04.16. CK */ ?>
   <tr>
     <th><?=$this->transEsc("Availability")?></th>
     <th><?=$this->transEsc("Details")?></th>
   </tr>
+  <? /* WE USE NO callNos here - 04.16. CK */ ?>
+  <? /* WE USE NO textFields, see rev #6237 - 04.16. CK */ ?>
   <? foreach ($holding['items'] as $row): ?>
-    <? $check = (isset($row['check']) && $row['check']); ?>
-    <? $checkStorageRetrievalRequest = (isset($row['checkStorageRetrievalRequest']) && $row['checkStorageRetrievalRequest']); ?>
-    <? $checkILLRequest = (isset($row['checkILLRequest']) && $row['checkILLRequest']); ?>
+    <?
+    // AJAX Check record?
+    $check = isset($row['check']) && $row['check'];
+    $checkStorageRetrievalRequest = isset($row['checkStorageRetrievalRequest']) && $row['checkStorageRetrievalRequest'];
+    $checkILLRequest = isset($row['checkILLRequest']) && $row['checkILLRequest'];
+    // AJAX block record?
+    $block = !$check && isset($row['addLink']) && $row['addLink'] === 'block';
+    $blockStorageRetrievalRequest = !$checkStorageRetrievalRequest && isset($row['addStorageRetrievalRequestLink']) && $row['addStorageRetrievalRequestLink'];
+    $blockILLRequest = !$checkILLRequest && isset($row['addILLRequestLink']) && $row['addILLRequestLink'];
+    ?>
     <? if (isset($row['barcode']) && $row['barcode'] != ""): ?>
     <tr vocab="http://schema.org/" typeof="Offer">
+      <? /* WE USE NO Copy NOR on Reserve here but below, see rev #6237 - 04.16. CK */ ?>
       <td>
         <? if ($row['availability']): ?>
         <? /* Begin Available Items (Holds) */ ?>
@@ -86,6 +97,7 @@
         <? if (isset($row['use_unknown_message']) && $row['use_unknown_message']): ?>
           <span class="label secondary"><?=$this->transEsc("status_unknown_message")?></span>
         <? else: ?>
+          <? /* WE USE callnumber here, rev #6237 - 04.16. CK */ ?>
           <? if (isset($row['callnumber'])): ?>
             <span class="callnumber"><?=$this->transEsc("Call Number")?>: <?=$row['callnumber']?></span>
           <? endif; ?>
@@ -94,6 +106,7 @@
           <? endif; ?>
           <? if ($row['availability']): ?>
             <? /* Begin Available Items (Holds) */ ?>
+            <? /* WE USE notes here, rev #6237 - 04.16. CK */ ?>
             <? if (isset($row['notes'])): ?>
               <span class="notes"><?=$this->transEsc("Notes")?>:</span>
               <ul class="notes">
@@ -102,14 +115,14 @@
                 <? endforeach; ?>
               </ul>
             <? endif; ?>
-            <? if (isset($row['link']) && $row['link']): ?>
-                <a class="<?=$check ? 'checkRequest ' : ''?>inlineblock modal-link placehold hide-for-print" href="<?=$this->recordLink()->getRequestUrl($row['link'])?>" title="<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?></a>
+            <? if (!$block && isset($row['link']) && $row['link']): ?>
+                <a class="<?=$check ? 'checkRequest ' : ''?>inlineblock placehold hide-for-print" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['link'])?>" title="<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?></a>
             <? endif; ?>
-            <? if (isset($row['storageRetrievalRequestLink']) && $row['storageRetrievalRequestLink']): ?>
-                <a class="<?=$checkStorageRetrievalRequest ? 'checkStorageRetrievalRequest ' : ''?>modal-link placeStorageRetrievalRequest" href="<?=$this->recordLink()->getRequestUrl($row['storageRetrievalRequestLink'])?>" title="<?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?></a>
+            <? if (!$blockStorageRetrievalRequest && isset($row['storageRetrievalRequestLink']) && $row['storageRetrievalRequestLink']): ?>
+                <a class="<?=$checkStorageRetrievalRequest ? 'checkStorageRetrievalRequest ' : ''?> placeStorageRetrievalRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['storageRetrievalRequestLink'])?>" title="<?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?></a>
             <? endif; ?>
-            <? if (isset($row['ILLRequestLink']) && $row['ILLRequestLink']): ?>
-                <a class="<?=$checkILLRequest ? 'checkILLRequest ' : ''?>inlineblock modal-link placeILLRequest" href="<?=$this->recordLink()->getRequestUrl($row['ILLRequestLink'])?>"  title="<?=$this->transEsc($checkILLRequest ? "ill_request_check_text" : "ill_request_place_text")?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc($checkILLRequest ? "ill_request_check_text" : "ill_request_place_text")?></a>
+              <? if (!$blockILLRequest && isset($row['ILLRequestLink']) && $row['ILLRequestLink']): ?>
+                <a class="<?=$checkILLRequest ? 'checkILLRequest ' : ''?>placeILLRequest" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['ILLRequestLink'])?>"  title="<?=$this->transEsc($checkILLRequest ? "ill_request_check_text" : "ill_request_place_text")?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc($checkILLRequest ? "ill_request_check_text" : "ill_request_place_text")?></a>
             <? endif; ?>
           <? else: ?>
             <? /* Begin Unavailable Items (Recalls) */ ?>
@@ -121,9 +134,19 @@
             <? if (isset($row['requests_placed']) && $row['requests_placed'] > 0): ?>
               <span><?=$this->transEsc("Requests")?>: <?=$this->escapeHtml($row['requests_placed'])?></span>
             <? endif; ?>
-            <? if (isset($row['link']) && $row['link']): ?>
-                <a class="<?=$check ? 'checkRequest' : ''?> modal-link inlineblock placehold hide-for-print" href="<?=$this->recordLink()->getRequestUrl($row['link'])?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a>
+            <? if (!$block && isset($row['link']) && $row['link']): ?>
+                <a class="<?=$check ? 'checkRequest' : ''?> inlineblock placehold hide-for-print" data-lightbox href="<?=$this->recordLink()->getRequestUrl($row['link'])?>"><i class="fa fa-flag"></i>&nbsp;<?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a>
             <? endif; ?>
+            <? endif; ?>
+            <? if (isset($row['item_notes'])): ?>
+              <div class="item-notes">
+                <strong><?=$this->transEsc("Item Notes")?>:</strong>
+                <ul>
+                  <? foreach ($row['item_notes'] as $item_note): ?>
+                    <li><?=$this->escapeHtml($item_note) ?></li>
+                  <? endforeach; ?>
+                </ul>
+              </div>
           <? endif; ?>
         <? endif; ?>
         <? /* Embed item structured data: library, barcode, call number */ ?>
diff --git a/themes/finc/templates/collection/view.phtml b/themes/finc/templates/collection/view.phtml
index 95d163704e2..d99baffa881 100644
--- a/themes/finc/templates/collection/view.phtml
+++ b/themes/finc/templates/collection/view.phtml
@@ -1,47 +1,47 @@
 <!-- collection - VIEW.phtml -->
 <?
-  // Set up standard record scripts:
-  $this->headScript()->appendFile("record.js");
-  $this->headScript()->appendFile("check_save_statuses.js");
-  // Activate Syndetics Plus if necessary:
-  if ($this->syndeticsPlus()->isActive()) {
-	echo $this->headScript()->appendFile($this->syndeticsPlus()->getScript());
-  }
+// Set up standard record scripts:
+$this->headScript()->appendFile("record.js");
+$this->headScript()->appendFile("check_save_statuses.js");
+// Activate Syndetics Plus if necessary:
+if ($this->syndeticsPlus()->isActive()) {
+  $this->headScript()->appendFile($this->syndeticsPlus()->getScript());
+}
 
-  // Add RDF header link if applicable:
-  if ($this->export()->recordSupportsFormat($this->driver, 'RDF')) {
-	  $this->headLink()->appendAlternate($this->recordLink()->getActionUrl($this->driver, 'RDF'), 'application/rdf+xml', 'RDF Representation');
-  }
+// Add RDF header link if applicable:
+if ($this->export()->recordSupportsFormat($this->driver, 'RDF')) {
+  $this->headLink()->appendAlternate($this->recordLink()->getActionUrl($this->driver, 'RDF'), 'application/rdf+xml', 'RDF Representation');
+}
 
-  // Set flag for special cases relating to full-width hierarchy tree tab:
-  $tree = (strtolower($this->activeTab) == 'hierarchytree');
+// Set flag for special cases relating to full-width hierarchy tree tab:
+$tree = (strtolower($this->activeTab) == 'hierarchytree');
 
-  // Set up breadcrumbs:
-  $lastSearch = $this->getLastSearchLink($this->transEsc('Search'));
-  if (!empty($lastSearch)) {
-	$this->layout()->breadcrumbs = '<li>' . $lastSearch . '</li> ';
-  }
-  $this->layout()->breadcrumbs .= '<li><a href="' . $this->url('collections-home') . '">' . $this->transEsc('Collections') . '</a></li> '
-	 . '<li class="active">' . $this->recordLink()->getBreadcrumb($this->driver) . '</li>';
+// Set up breadcrumbs:
+$lastSearch = $this->searchMemory()->getLastSearchLink($this->transEsc('Search'));
+if (!empty($lastSearch)) {
+  $this->layout()->breadcrumbs = '<li>' . $lastSearch . '</li> ';
+}
+$this->layout()->breadcrumbs .= '<li><a href="' . $this->url('collections-home') . '">' . $this->transEsc('Collections') . '</a></li> '
+  . '<li class="active">' . $this->recordLink()->getBreadcrumb($this->driver) . '</li>';
 ?>
 
 <? if (isset($this->scrollData) && ($this->scrollData['previousRecord'] || $this->scrollData['nextRecord'])): ?>
   <ul class="pager">
-	<? if ($this->scrollData['previousRecord']): ?>
-	  <li>
-		<a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>" title="<?=$this->transEsc('Previous Search Result')?>">&laquo; <?=$this->transEsc('Prev')?></a>
-	  </li>
-	<? else: ?>
-	  <li class="disabled"><a href="#">&laquo; <?=$this->transEsc('Prev')?></a></li>
-	<? endif; ?>
+    <? if ($this->scrollData['previousRecord']): ?>
+      <li>
+        <a href="<?=$this->recordLink()->getUrl($this->scrollData['previousRecord'])?>" title="<?=$this->transEsc('Previous Search Result')?>">&laquo; <?=$this->transEsc('Prev')?></a>
+      </li>
+    <? else: ?>
+      <li class="disabled"><a href="#">&laquo; <?=$this->transEsc('Prev')?></a></li>
+    <? endif; ?>
     #<?=$this->localizedNumber($this->scrollData['currentPosition']) . ' ' . $this->transEsc('of') . ' ' . $this->localizedNumber($this->scrollData['resultTotal']) . ' ' . $this->transEsc('results')?>
-	<? if ($this->scrollData['nextRecord']): ?>
-	  <li>
-		<a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>"><?=$this->transEsc('Next')?> &raquo;</a>
-	  </li>
-	<? else: ?>
-	  <li class="disabled"><a href="#"><?=$this->transEsc('Next')?> &raquo;</a></li>
-	<? endif; ?>
+    <? if ($this->scrollData['nextRecord']): ?>
+      <li>
+        <a href="<?=$this->recordLink()->getUrl($this->scrollData['nextRecord'])?>" title="<?=$this->transEsc('Next Search Result')?>"><?=$this->transEsc('Next')?> &raquo;</a>
+      </li>
+    <? else: ?>
+      <li class="disabled"><a href="#"><?=$this->transEsc('Next')?> &raquo;</a></li>
+    <? endif; ?>
   </ul>
 <? endif; ?>
 
@@ -49,57 +49,61 @@
 
 <div class="row">
   <div class="<?=$tree ? 'medium-12 columns' : $this->layoutClass('mainbody')?>">
-	<div class="record">
-	  <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" id="record_id" />
-	  <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" class="hiddenSource" />
-	  <?=$this->flashmessages()?>
-	  <?=$this->record($this->driver)->getCollectionMetadata()?>
-	</div>
+    <div class="record">
+      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" id="record_id"/>
+      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource"/>
+      <?=$this->flashmessages()?>
+      <?=$this->record($this->driver)->getCollectionMetadata()?>
+    </div>
 
-	<? if (count($this->tabs) > 0): ?>
-	  <a name="tabnavi"></a><? /* Renamed, no typo, to render jump to tab ineffective */?>
-	  <div class="record-tabs">
-		<ul class="recordTabs tabs"><? /*<!-- DO NOT use standard data-tab option here as it triggers Foundation's normal tab behaviour while Vufind only uses tab appearance! FIXME CK */ ?>
-		<? foreach ($this->tabs as $tab => $obj): ?>
-		<? // add current tab to breadcrumbs if applicable:
-		  $desc = $obj->getDescription();
-          $tab_classes = array();
-          if (0 === strcasecmp($this->activeTab, $tab)) {
-            if (!$this->ajaxTabs || !$obj->supportsAjax()) {
-              $tab_classes[] = 'active';
+    <? if (count($this->tabs) > 0): ?>
+      <a name="tabnavi"></a><? /* Renamed, no typo, to render jump to tab ineffective */ ?>
+      <div class="record-tabs">
+        <ul class="recordTabs tabs"><? /*<!-- DO NOT use standard data-tab option here as it triggers Foundation's normal tab behaviour while Vufind only uses tab appearance! FIXME CK */ ?>
+          <? foreach ($this->tabs as $tab => $obj): ?>
+            <? // add current tab to breadcrumbs if applicable:
+            $desc = $obj->getDescription();
+            $tab_classes = array();
+            if (0 === strcasecmp($this->activeTab, $tab)) {
+              if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) {
+                $tab_classes[] = 'active';
+              }
+              $tab_classes[] = 'initiallyActive';
+              $this->layout()->breadcrumbs .= ' <li class="active">' . $this->transEsc($desc) . '</li>';
+              $activeTabObj = $obj;
             }
-            $tab_classes[] = 'initiallyActive';
-			$this->layout()->breadcrumbs .= ' <li class="active">' . $this->transEsc($desc) . '</li>';
-			$activeTabObj = $obj;
-		  }
-          if (!$obj->isVisible()) { $tab_classes[] = 'hide'; }
-          if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; }
-		?>
-        <li<?=count($tab_classes) > 0 ? ' class="tab-title ' . implode(' ', $tab_classes) . '"' : ''?>>
-          <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>"><?=$this->transEsc($desc)?></a>
-		</li>
-		<? endforeach; ?>
-	  </ul>
-
-      <div class="tabs-content collectionDetails<?=$tree ? 'Tree' : ''?>" id="record-tabs">
-		<? if (!$this->ajaxTabs || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
-	    <div class="content active" id="<?=$this->activeTab ?>-tab">
-	      <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?>
-	    </div>
-        <? endif; ?>
+            if (!$obj->isVisible()) {
+              $tab_classes[] = 'hide';
+            }
+            if (!$obj->supportsAjax()) {
+              $tab_classes[] = 'noajax';
+            }
+            ?>
+            <li<?=count($tab_classes) > 0 ? ' class="tab-title ' . implode(' ', $tab_classes) . '"' : ''?>>
+              <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>"><?=$this->transEsc($desc)?></a>
+            </li>
+          <? endforeach; ?>
+        </ul>
+        <? /* next line: we need the ID here - CK */ ?>
+        <div class="tabs-content collectionDetails<?=$tree ? 'Tree' : ''?>" id="record-tabs">
+          <? if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
+            <div class="content active" id="<?=$this->activeTab?>-tab">
+              <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?>
+            </div>
+          <? endif; ?>
+        </div>
       </div>
-	</div>
     <? endif; ?>
 
     <?=$this->driver->supportsCoinsOpenURL() ? '<span class="Z3988" title="' . $this->escapeHtmlAttr($this->driver->getCoinsOpenURL()) . '"></span>' : ''?>
   </div>
 
   <? if (isset($activeTabObj) && is_callable(array($activeTabObj, 'getSideRecommendations'))): ?>
-	<div class="<?=$this->layoutClass('sidebar')?>">
-	  <? foreach ($activeTabObj->getSideRecommendations() as $current): ?>
-		<?=$this->recommend($current)?>
-	  <? endforeach; ?>
-	</div>
+    <div class="<?=$this->layoutClass('sidebar')?>">
+      <? foreach ($activeTabObj->getSideRecommendations() as $current): ?>
+        <?=$this->recommend($current)?>
+      <? endforeach; ?>
+    </div>
   <? endif; ?>
 </div>
 <?=$this->inlineScript(\Zend\View\Helper\HeadScript::SCRIPT, '$(document).ready(recordDocReady);', 'SET');?>
diff --git a/themes/finc/templates/footer.phtml b/themes/finc/templates/footer.phtml
index 66174f1774e..59b0bfc51f0 100644
--- a/themes/finc/templates/footer.phtml
+++ b/themes/finc/templates/footer.phtml
@@ -20,7 +20,7 @@
   <li>
     <p><strong><?=$this->transEsc('Need Help?')?></strong></p>
     <ul>
-      <li><a href="<?=$this->url('help-home')?>?topic=search" class="help-link" title="<?=$this->transEsc('Search Tips')?>"><?=$this->transEsc('Search Tips')?></a></li>
+      <li><a href="<?=$this->url('help-home')?>?topic=search" class="help-link" data-lightbox title="<?=$this->transEsc('Search Tips')?>"><?=$this->transEsc('Search Tips')?></a></li>
       <li><a href="#"><?=$this->transEsc('Ask a Librarian')?></a></li>
       <li><a href="#"><?=$this->transEsc('FAQs')?></a></li>
     </ul>
diff --git a/themes/finc/templates/header.phtml b/themes/finc/templates/header.phtml
index 7a2af1eb44b..d3d6353d739 100644
--- a/themes/finc/templates/header.phtml
+++ b/themes/finc/templates/header.phtml
@@ -1,77 +1,82 @@
 <!-- HEADER.PHTML begin -->
 <? $account = $this->auth()->getManager(); ?>
-    <nav class="top-bar" data-topbar data-options="sticky_on:all">
-        <ul class="title-area">
-            <li class="name">
-            <h1><a role="logo" class="navbar-brand" href="<?=$this->url('home')?>"><span class="hide-for-medium-up"><?= $this->transEsc("LibraryName") ?></span><img src="<?=$this->imageLink('headerlogo.png')?>" class="hide-for-small" alt="Logo <?= $this->transEsc("LibraryName") ?>" title="<?= $this->transEsc("LibraryName") ?>"></a></h1>
-            </li>
-            <? /*Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone */ ?>
-            <li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>
-        </ul>
-        <section class="top-bar-section">
-            <? if ($this->layout()->searchbox !== false): ?>
-              <ul class="left list-unstyled show-for-medium-up">
-                <?=$this->layout()->searchbox ?>
-              </ul>
+<nav class="top-bar" data-topbar data-options="sticky_on:all">
+  <ul class="title-area">
+    <li class="name">
+      <h1><a role="logo" class="navbar-brand" href="<?=$this->url('home')?>"><span class="hide-for-medium-up"><?=$this->transEsc("LibraryName")?></span><img src="<?=$this->imageLink('headerlogo.png')?>" class="hide-for-small" alt="Logo <?=$this->transEsc("LibraryName")?>" title="<?=$this->transEsc("LibraryName")?>"></a></h1>
+    </li>
+    <? /*Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone */ ?>
+    <li class="toggle-topbar menu-icon"><a href="#"><span></span></a></li>
+  </ul>
+  <section class="top-bar-section">
+    <? if ($this->layout()->searchbox !== false): ?>
+      <ul class="left list-unstyled show-for-medium-up">
+        <?=$this->layout()->searchbox?>
+      </ul>
+    <? endif; ?>
+    <? if (!isset($this->layout()->renderingError)): ?>
+      <? /* Right-hand  Nav Section */ ?>
+      <ul role="navigation" class="right">
+        <? if ($this->feedback()->tabEnabled()): ?>
+          <li>
+            <a id="feedbackLink" data-lightbox href="<?=$this->url('feedback-home')?>"><i class="fa fa-envelope"></i> <?=$this->transEsc("Feedback")?></a>
+          </li>
+        <? endif; ?>
+        <? $cart = $this->cart();
+        if ($cart->isActive()): ?>
+          <li id="cartSummary">
+            <a id="cartItems" data-lightbox title="<?=$this->transEsc('View Book Bag')?>" href="<?=$this->url('cart-home')?>"><i class="fa fa-clipboard"></i>
+              <strong><?=count($cart->getItems())?></strong> <?=$this->transEsc('items')?><?=$cart->isFull() ? ' (' . $this->transEsc('bookbag_full') . ')' : ''?></a>
+          </li>
+        <? endif; ?>
+        <? if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?>
+          <li class="logoutOptions<? if (!$account->isLoggedIn()): ?> hide<? endif ?>">
+            <a href="<?=$this->url('myresearch-home', array(), array('query' => array('redirect' => 0)))?>" data-lightbox title="<?=$this->transEsc("Your Account")?>"><i
+                class="fa fa-home"></i> <?=$this->transEsc("Your Account")?></a>
+          </li>
+          <li class="logoutLink logoutOptions<? if (!$account->isLoggedIn()): ?> hide<? endif ?>">
+            <a href="<?=$this->url('myresearch-logout')?>" data-lightbox title="<?=$this->transEsc("Log Out")?>"><i class="fa fa-sign-out"></i> <?=$this->transEsc("Log Out")?></a>
+          </li>
+          <li id="loginOptions" class="<? if ($account->isLoggedIn()): ?> hide<? endif ?>">
+            <? if ($sessionInitiator = $account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?>
+              <a href="<?=$this->url('myresearch-userlogin')?>" data-lightbox title="<?=$this->transEsc("Institutional Login")?>"><i class="fa fa-sign-in"></i> <?=$this->transEsc("Institutional Login")?></a>
+            <? else: ?>
+              <a href="<?=$this->url('myresearch-userlogin')?>" data-lightbox title="<?=$this->transEsc("Login")?>"><i class="fa fa-sign-in"></i> <?=$this->transEsc("Login")?></a>
             <? endif; ?>
-            <? if (!isset($this->layout()->renderingError)): ?>
-                <? /* Right-hand  Nav Section */ ?>
-                <ul class="right">
-                    <? if ($this->feedback()->tabEnabled()): ?>
-                        <li>
-                            <a id="feedbackLink" class="modal-link" href="<?=$this->url('feedback-home') ?>"><i class="fa fa-envelope"></i> <?=$this->transEsc("Feedback")?></a>
-                        </li>
-                    <? endif; ?>
-                    <? $cart = $this->cart(); if ($cart->isActive()): ?>
-                        <li id="cartSummary">
-                            <a id="cartItems" class="modal-link" title="<?=$this->transEsc('View Book Bag')?>" href="<?=$this->url('cart-home')?>"><i class="fa fa-clipboard"></i> <strong><?=count($cart->getItems())?></strong> <?=$this->transEsc('items')?><?=$cart->isFull() ? ' (' .  $this->transEsc('bookbag_full') . ')' : ''?></a>
-                        </li>
-                    <? endif; ?>
-                    <? if (is_object($account) && $account->loginEnabled()): // hide login/logout if unavailable ?>
-                        <li class="logoutOptions<? if(!$account->isLoggedIn()): ?> hide<? endif ?>">
-                            <a href="<?=$this->url('myresearch-home', array(), array('query' => array('redirect' => 0)))?>" class="modal-link" title="<?=$this->transEsc("Your Account")?>"><i class="fa fa-home"></i> <?=$this->transEsc("Your Account")?></a>
-                        </li>
-                        <li class="logoutLink logoutOptions<? if(!$account->isLoggedIn()): ?> hide<? endif ?>">
-                            <a href="<?=$this->url('myresearch-logout')?>" class="modal-link" title="<?=$this->transEsc("Log Out")?>"><i class="fa fa-sign-out"></i> <?=$this->transEsc("Log Out")?></a>
-                        </li>
-                        <li id="loginOptions" class="<? if($account->isLoggedIn()): ?> hide<? endif ?>">
-                            <? if ($sessionInitiator = $account->getSessionInitiator($this->serverUrl($this->url('myresearch-home')))): ?>
-                                <a href="<?=$this->escapeHtmlAttr($sessionInitiator)?>"><i class="fa fa-sign-in"></i> <?=$this->transEsc("Institutional Login")?></a>
-                            <? else: ?>
-                                <a href="<?=$this->url('myresearch-userlogin')?>" class="modal-link" title="<?=$this->transEsc("Login")?>"><i class="fa fa-sign-in"></i> <?=$this->transEsc("Login")?></a>
-                            <? endif; ?>
-                        </li>
-                    <? endif; ?>
+          </li>
+        <? endif; ?>
 
-                    <? if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?>
-                        <li class="has-dropdown">
-                            <form method="post" name="themeForm" id="themeForm">
-                                <input type="hidden" name="ui"/>
-                            </form>
-                            <a href="#"><?=$this->transEsc("Theme")?></a>
-                            <ul class="dropdown">
-                                <? foreach ($this->layout()->themeOptions as $current): ?>
-                                  <li<?=$current['selected'] ? ' class="active"' : ''?>><a href="#" onClick="document.themeForm.ui.value='<?=$this->escapeHtmlAttr($current['name'])?>';document.themeForm.submit()"><?=$this->transEsc($current['desc'])?></a></li>
-                                <? endforeach; ?>
-                            </ul>
-                        </li>
-                    <? endif; ?>
+        <? if (isset($this->layout()->themeOptions) && count($this->layout()->themeOptions) > 1): ?>
+          <li class="has-dropdown">
+            <form method="post" name="themeForm" id="themeForm">
+              <input type="hidden" name="ui"/>
+            </form>
+            <a href="#"><?=$this->transEsc("Theme")?></a>
+            <ul class="dropdown">
+              <? foreach ($this->layout()->themeOptions as $current): ?>
+                <li<?=$current['selected'] ? ' class="active"' : ''?>><a href="#" onClick="document.themeForm.ui.value='<?=$this->escapeHtmlAttr($current['name'])?>';document.themeForm.submit()"><?=$this->transEsc($current['desc'])?></a>
+                </li>
+              <? endforeach; ?>
+            </ul>
+          </li>
+        <? endif; ?>
 
-                    <? if (isset($this->layout()->allLangs) && count($this->layout()->allLangs) > 1): ?>
-                        <li class="has-dropdown">
-                            <form method="post" name="langForm" id="langForm">
-                                <input type="hidden" name="mylang"/>
-                            </form>
-                            <a href="#"  aria-controls="langmenu" aria-expanded="false"><?=$this->transEsc("Language")?></a>
-                            <ul id="langmenu" class="dropdown">
-                                <? foreach ($this->layout()->allLangs as $langCode => $langName): ?>
-                                    <li<?=$this->layout()->userLang == $langCode ? ' class="active"' : ''?>><a href="#" onClick="document.langForm.mylang.value='<?=$langCode?>';document.langForm.submit()"><?=$this->displayLanguageOption($langName)?></a></li>
-                                <? endforeach; ?>
-                            </ul>
-                        </li>
-                    <? endif; ?>
-                </ul>
-            <? endif; ?>
-        </section>
-    </nav>
+        <? if (isset($this->layout()->allLangs) && count($this->layout()->allLangs) > 1): ?>
+          <li class="has-dropdown">
+            <form method="post" name="langForm" id="langForm">
+              <input type="hidden" name="mylang"/>
+            </form>
+            <a href="#" aria-controls="langmenu" aria-expanded="false"><?=$this->transEsc("Language")?></a>
+            <ul id="langmenu" class="dropdown">
+              <? foreach ($this->layout()->allLangs as $langCode => $langName): ?>
+                <li<?=$this->layout()->userLang == $langCode ? ' class="active"' : ''?>><a href="#" onClick="document.langForm.mylang.value='<?=$langCode?>';document.langForm.submit()"><?=$this->displayLanguageOption($langName)?></a>
+                </li>
+              <? endforeach; ?>
+            </ul>
+          </li>
+        <? endif; ?>
+      </ul>
+    <? endif; ?>
+  </section>
+</nav>
 <!-- HEADER.PHTML end -->
\ No newline at end of file
diff --git a/themes/finc/templates/record/view.phtml b/themes/finc/templates/record/view.phtml
index e631a70fe9e..aecdba47c61 100644
--- a/themes/finc/templates/record/view.phtml
+++ b/themes/finc/templates/record/view.phtml
@@ -5,7 +5,7 @@
   $this->headScript()->appendFile("check_save_statuses.js");
   // Activate Syndetics Plus if necessary:
   if ($this->syndeticsPlus()->isActive()) {
-	echo $this->headScript()->appendFile($this->syndeticsPlus()->getScript());
+    $this->headScript()->appendFile($this->syndeticsPlus()->getScript());
   }
 
   // Add RDF header link if applicable:
@@ -14,7 +14,7 @@
   }
 
   // Set up breadcrumbs:
-  $this->layout()->breadcrumbs = '<li>' . $this->getLastSearchLink($this->transEsc('Search'), '', '</li> ') .
+  $this->layout()->breadcrumbs = '<li>' . $this->searchMemory()->getLastSearchLink($this->transEsc('Search'), '', '</li> ') .
 	'<li class="active">' . $this->recordLink()->getBreadcrumb($this->driver) . '</li> ';
   $this->layout()->title = $this->driver->getShortTitle();
 ?>
@@ -47,9 +47,9 @@
 
 <div class="row">
   <div class="<?=$this->layoutClass('mainbody')?>">
-	<div class="record recordId source<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" id="record">
-	  <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" id="record_id" />
-	  <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getResourceSource())?>" class="hiddenSource" />
+    <div class="record source<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>">
+      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getUniqueId())?>" class="hiddenId" />
+      <input type="hidden" value="<?=$this->escapeHtmlAttr($this->driver->getSourceIdentifier())?>" class="hiddenSource" />
 	  <?=$this->flashmessages()?>
 	  <?=$this->record($this->driver)->getCoreMetadata()?>
 	</div>
@@ -63,7 +63,7 @@
 		  $desc = $obj->getDescription();
 		  $tab_classes = array();
 		  if (0 === strcasecmp($this->activeTab, $tab)) {
-            if (!$this->ajaxTabs || !$obj->supportsAjax()) {
+            if (!$this->loadInitialTabWithAjax || !$obj->supportsAjax()) {
 			  $tab_classes[] = 'active';
             }
             $tab_classes[] = 'initiallyActive';
@@ -73,14 +73,15 @@
 		  if (!$obj->isVisible()) { $tab_classes[] = 'hide'; }
 		  if (!$obj->supportsAjax()) { $tab_classes[] = 'noajax'; }
 		?>
+        <? /* next line: moved everything inside class to avoid double class tag - CK */ ?>
 		<li class="tab-title <?=count($tab_classes) > 0 ? ' ' . implode(' ', $tab_classes) . ' ' : ' '?>">
 		  <a class="<?=strtolower($tab)?>" href="<?=$this->recordLink()->getTabUrl($this->driver, $tab)?>"><?=$this->transEsc($desc)?></a>
 		</li>
 		<? endforeach; ?>
 	  </ul>
-
+      <? /* next line: we need the id - CK */ ?>
       <div class="tabs-content" id="record-tabs">
-        <? if (!$this->ajaxTabs || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
+        <? if (!$this->loadInitialTabWithAjax || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
           <div class="content active <?=$this->activeTab?>-tab">
           <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?>
           </div>
diff --git a/themes/finc/templates/search/searchbox.phtml b/themes/finc/templates/search/searchbox.phtml
index 07e4108b6d1..e0205882b57 100644
--- a/themes/finc/templates/search/searchbox.phtml
+++ b/themes/finc/templates/search/searchbox.phtml
@@ -15,24 +15,36 @@ $handlerCount = count($handlers);
 $basicSearch = $this->searchbox()->combinedHandlersActive() ? 'combined-searchbox' : $options->getSearchAction();
 $searchHome = $options->getSearchHomeAction();
 $advSearch = $options->getAdvancedSearchAction();
-$lastSort = $options->getLastSort();
-$lastLimit = $options->getLastLimit();
+    $lastSort = $this->searchMemory()->getLastSort($this->searchClassId);
+    $lastLimit = $this->searchMemory()->getLastLimit($this->searchClassId);
+    $ignoreHiddenFilterMemory = isset($this->ignoreHiddenFilterMemory) && $this->ignoreHiddenFilterMemory;
+    $hiddenFilters = $this->searchtabs()->getHiddenFilters($this->searchClassId, $ignoreHiddenFilterMemory);
+    if (empty($hiddenFilters) && !$ignoreHiddenFilterMemory) {
+        $hiddenFilters = $this->searchMemory()->getLastHiddenFilters($this->searchClassId);
+    }
+    $hiddenFilterParams = [];
+    foreach ($hiddenFilters as $key => $filter) {
+        foreach ($filter as $value) {
+            $hiddenFilterParams[] = urlencode('hiddenFilters[]') . '=' . urlencode("$key:$value");
+        }
+    }
+    $hiddenFilterParams = empty($hiddenFilterParams) ? '' : '?' . implode('&', $hiddenFilterParams);
 ?>
 <? if ($this->searchType == 'advanced'): ?>
   <div class="searchForm">
-    <? $tabs = $this->render('search/searchTabs'); ?>
+    <? $tabs = $this->context($this)->renderInContext('search/searchTabs', ['hiddenFilters' => $hiddenFilters]); ?>
     <? if (!empty($tabs)): ?><?= $tabs ?><div class="tabs-content clearfix"><? endif; ?>
       <p class="adv_search_terms"><?= $this->transEsc("Your search terms") ?> : "<strong><?= $this->escapeHtml($this->lookfor) ?></strong>"</p>
       <ul class="adv_search_links">
         <li><a href="<?= $this->url($advSearch) ?>?edit=<?= $this->escapeHtmlAttr($this->searchId) ?>"><?= $this->transEsc("Edit this Advanced Search") ?></a></li>
-        <li><a href="<?= $this->url($advSearch) ?>"><?= $this->transEsc("Start a new Advanced Search") ?></a></li>
-        <li><a href="<?= $this->url($searchHome) ?>"><?= $this->transEsc("Start a new Basic Search") ?></a></li>
+        <li><a href="<?= $this->url($advSearch) . $hiddenFilterParams?>"><?= $this->transEsc("Start a new Advanced Search") ?></a></li>
+        <li><a href="<?= $this->url($searchHome) . $hiddenFilterParams?>"><?= $this->transEsc("Start a new Basic Search") ?></a></li>
       </ul>
       <? if (!empty($tabs)): ?></div><? endif; ?>
   </div>
 <? else: ?>
 <form class="searchForm inline" role="search" method="get" action="<?= $this->url($basicSearch) ?>" name="searchForm" autocomplete="off">
-  <?= $this->render('search/searchTabs'); ?>
+  <?= $this->context($this)->renderInContext('search/searchTabs', ['hiddenFilters' => $hiddenFilters]); ?>
   <ul class="left list-unstyled">
     <li class="has-form">
       <input class="searchForm_lookfor form-control search-query<? if ($this->searchbox()->autocompleteEnabled($this->searchClassId)): ?> autocomplete searcher:<?= $this->escapeHtmlAttr($this->searchClassId) ?><? endif ?>" type="text" name="lookfor" value="<?= $this->escapeHtmlAttr($this->lookfor) ?>" required="required"/>
@@ -53,7 +65,7 @@ $lastLimit = $options->getLastLimit();
     </li>
     <? if ($advSearch): ?>
       <li class="has-form">
-        <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : '')?>" class="button secondary postfix" role="button" rel="nofollow"><?=$this->transEsc("Advanced")?></a>
+        <a href="<?=$this->url($advSearch) . ((isset($this->searchId) && $this->searchId) ? '?edit=' . $this->escapeHtmlAttr($this->searchId) : $hiddenFilterParams) ?>" class="button secondary postfix" role="button" rel="nofollow"><?=$this->transEsc("Advanced")?></a>
       </li>
     <? endif; ?>
   </ul>
@@ -95,6 +107,11 @@ $lastLimit = $options->getLastLimit();
       <? endif; ?>
     </div>
   <? endif; ?>
+    <? foreach ($hiddenFilters as $key => $filter): ?>
+      <? foreach ($filter as $value): ?>
+        <input type="hidden" name="hiddenFilters[]" value="<?=$this->escapeHtmlAttr($key) . ':' . $this->escapeHtmlAttr($value)?>" />
+      <? endforeach; ?>
+    <? endforeach; ?>
   <?
   /* Show hidden field for active search class when in combined handler mode. */
   if ($this->searchbox()->combinedHandlersActive()) {
-- 
GitLab