From 357ebd20f4eea44a387a841d73e6083f1add79a2 Mon Sep 17 00:00:00 2001
From: Claas Kazzer <kazzer@uni-leipzig.de>
Date: Wed, 24 Feb 2016 11:24:51 +0100
Subject: [PATCH] refs #7044: * fix for holdings- and other tabs still
 referenced as IDs * added fallback status for unavailable items

---
 themes/finc/scss/default.scss                     | 2 +-
 themes/finc/templates/RecordTab/holdingsils.phtml | 4 ++--
 themes/finc/templates/record/view.phtml           | 2 +-
 themes/foundation5/templates/record/view.phtml    | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/themes/finc/scss/default.scss b/themes/finc/scss/default.scss
index 0663ae5984f..e9d557ae026 100644
--- a/themes/finc/scss/default.scss
+++ b/themes/finc/scss/default.scss
@@ -52,7 +52,7 @@
 }
 // Holdings
 // Insert line break before Vormerken buttons
-#holdings-tab {
+.holdings-tab {
   line-height: 1.75rem;
   td {
     vertical-align: top;
diff --git a/themes/finc/templates/RecordTab/holdingsils.phtml b/themes/finc/templates/RecordTab/holdingsils.phtml
index f2356f96c31..2fbb8267d4a 100644
--- a/themes/finc/templates/RecordTab/holdingsils.phtml
+++ b/themes/finc/templates/RecordTab/holdingsils.phtml
@@ -75,7 +75,7 @@
         <span class="label success"><?=$this->transEsc("Available")?><link property="availability" href="http://schema.org/InStock" /></span>
         <? else: ?>
         <? /* Begin Unavailable Items (Recalls) */ ?>
-        <span class="label alert"><?=$this->transEsc($row['status'])?><link property="availability" href="http://schema.org/OutOfStock" /></span>
+        <span class="label alert"><?=empty($row['status'])?$this->transEsc("Unavailable"):$this->transEsc($row['status'])?><link property="availability" href="http://schema.org/OutOfStock" /></span>
         <? endif; ?>
       </td>
       <td>
@@ -113,7 +113,7 @@
             <? endif; ?>
           <? else: ?>
             <? /* Begin Unavailable Items (Recalls) */ ?>
-              <span class="label alert"><?=$this->transEsc($row['status'])?><link property="availability" href="http://schema.org/OutOfStock" /></span>
+              <span class="label alert"><?=empty($row['status'])?$this->transEsc("Unavailable"):$this->transEsc($row['status'])?><link property="availability" href="http://schema.org/OutOfStock" /></span>
             <? if (isset($row['returnDate']) && $row['returnDate']): ?>&ndash; <span class="small"><?=$this->escapeHtml($row['returnDate'])?></span><? endif; ?>
             <? if (isset($row['duedate']) && $row['duedate']): ?>
               &ndash; <span class="small"><?=$this->transEsc("Due")?>: <?=$this->escapeHtml($row['duedate'])?></span>
diff --git a/themes/finc/templates/record/view.phtml b/themes/finc/templates/record/view.phtml
index 13e1d1a98ca..e631a70fe9e 100644
--- a/themes/finc/templates/record/view.phtml
+++ b/themes/finc/templates/record/view.phtml
@@ -81,7 +81,7 @@
 
       <div class="tabs-content" id="record-tabs">
         <? if (!$this->ajaxTabs || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
-          <div class="content active" id="<?=$this->activeTab?>-tab">
+          <div class="content active <?=$this->activeTab?>-tab">
           <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?>
           </div>
         <? endif; ?>
diff --git a/themes/foundation5/templates/record/view.phtml b/themes/foundation5/templates/record/view.phtml
index db711cfe888..41dbd12e183 100644
--- a/themes/foundation5/templates/record/view.phtml
+++ b/themes/foundation5/templates/record/view.phtml
@@ -81,7 +81,7 @@ $this->layout()->title = $this->driver->getShortTitle();
 
       <div class="tabs-content" id="record-tabs">
           <? if (!$this->ajaxTabs || !isset($activeTabObj) || !$activeTabObj->supportsAjax()): ?>
-            <div class="content active" id="<?=$this->activeTab?>-tab">
+            <div class="content active <?=$this->activeTab?>-tab">
             <?=isset($activeTabObj) ? $this->record($this->driver)->getTab($activeTabObj) : ''?>
             </div>
           <? endif; ?>
-- 
GitLab