diff --git a/themes/bootstrap3/templates/RecordTab/holdingsworldcat.phtml b/themes/bootstrap3/templates/RecordTab/holdingsworldcat.phtml index a0e7f0a8f982984ae19e92f9b9450fc0945e8ab8..00292694f6e99fa088587415f70f7719be278372 100644 --- a/themes/bootstrap3/templates/RecordTab/holdingsworldcat.phtml +++ b/themes/bootstrap3/templates/RecordTab/holdingsworldcat.phtml @@ -1,24 +1,31 @@ -<? $holdings = $this->tab->getHoldings(); if ($holdings && count($holdings) > 0): ?> -<h3><?=$this->transEsc('Holdings at Other Libraries')?></h3> -<table class="table table-striped"> -<? foreach ($holdings as $holding): ?> - <tr> - <th colspan="2"> - <? if (isset($holding->electronicAddress->text) && !empty($holding->electronicAddress->text)): ?> - <a href="<?=$this->escapeHtmlAttr($holding->electronicAddress->text)?>"><?=$this->escapeHtml($holding->physicalLocation)?></a> - <? else: ?> - <?=$this->escapeHtml($holding->physicalLocation)?> +<? $holdings = $this->tab->getHoldings(); ?> +<? if (isset($holdings->diagnostic->message)): ?> + <p><?=$this->escapeHtml($holdings->diagnostic->message)?></p> +<? elseif ($holdings && count($holdings) > 0): ?> + <h3><?=$this->transEsc('Holdings at Other Libraries')?></h3> + <table class="table table-striped"> + <? foreach ($holdings as $holding): ?> + <tr> + <th colspan="2"> + <? if (isset($holding->electronicAddress->text) && !empty($holding->electronicAddress->text)): ?> + <a href="<?=$this->escapeHtmlAttr($holding->electronicAddress->text)?>"><?=$this->escapeHtml($holding->physicalLocation)?></a> + <? else: ?> + <?=$this->escapeHtml($holding->physicalLocation)?> + <? endif; ?> + </th> + </tr> + <? if (!empty($holding->physicalAddress->text)): ?> + <tr> + <th><?=$this->transEsc('Address')?>: </th> + <td><?=$this->escapeHtml($holding->physicalAddress->text)?></td> + </tr> <? endif; ?> - </th> - </tr> - <tr> - <th><?=$this->transEsc('Address')?>: </th> - <td><?=$this->escapeHtml($holding->physicalAddress->text)?></td> - </tr> - <tr> - <th><?=$this->transEsc('Copies')?>: </th> - <td><?=$this->escapeHtml($holding->holdingSimple->copiesSummary->copiesCount)?></td> - </tr> -<? endforeach; ?> -</table> + <? if (isset($holding->holdingSimple->copiesSummary->copiesCount)): ?> + <tr> + <th><?=$this->transEsc('Copies')?>: </th> + <td><?=$this->escapeHtml($holding->holdingSimple->copiesSummary->copiesCount)?></td> + </tr> + <? endif; ?> + <? endforeach; ?> + </table> <? endif; ?>