-
Notifications
You must be signed in to change notification settings - Fork 360
/
Copy pathstandard.phtml
74 lines (74 loc) · 5.08 KB
/
standard.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php if (strlen($holding['barcode'] ?? '') > 0): ?>
<?php
$check = $holding['check'] ?? false;
$checkStorageRetrievalRequest = $holding['checkStorageRetrievalRequest'] ?? false;
$checkILLRequest = $holding['checkILLRequest'] ?? false;
?>
<tr vocab="http://schema.org/" typeof="Offer">
<th class="copy-number"><?=$this->transEsc("Copy")?> <?=$this->escapeHtml($holding['number'])?>
<?php if ($holding['enumchron'] ?? false): ?>
<span class="enumchron">(<?=$this->escapeHtml($holding['enumchron'])?>)</span>
<?php endif; ?>
</th>
<td>
<?php if ($holding['reserve'] == "Y"): ?>
<link property="availability" href="http://schema.org/InStoreOnly" />
<?=$this->transEsc("On Reserve - Ask at Circulation Desk")?><br />
<?php endif; ?>
<?php if ($holding['use_unknown_message'] ?? false): ?>
<span class="text-muted"><?=$this->transEsc("status_unknown_message")?></span>
<?php else: ?>
<?php if ($holding['availability'] ?? false): ?>
<?php /* Begin Available Items (Holds) */ ?>
<span class="text-success"><?=$this->transEsc("Available")?><link property="availability" href="http://schema.org/InStock" /></span>
<?php if ($holding['link'] ?? false): ?>
<a class="<?=$check ? 'checkRequest ' : ''?>placehold" <?php if (!empty($holding['linkLightbox'])): ?>data-lightbox <?php endif; ?>href="<?=$this->escapeHtmlAttr($this->recordLinker()->getRequestUrl($holding['link']))?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Hold" : "Place a Hold")?></a>
<?php endif; ?>
<?php if ($holding['storageRetrievalRequestLink'] ?? false): ?>
<a class="<?=$checkStorageRetrievalRequest ? 'checkStorageRetrievalRequest ' : ''?> placeStorageRetrievalRequest" data-lightbox href="<?=$this->escapeHtmlAttr($this->recordLinker()->getRequestUrl($holding['storageRetrievalRequestLink']))?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($checkStorageRetrievalRequest ? "storage_retrieval_request_check_text" : "storage_retrieval_request_place_text")?></a>
<?php endif; ?>
<?php if ($holding['ILLRequestLink'] ?? false): ?>
<a class="<?=$checkILLRequest ? 'checkILLRequest ' : ''?>placeILLRequest" data-lightbox href="<?=$this->escapeHtmlAttr($this->recordLinker()->getRequestUrl($holding['ILLRequestLink']))?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($checkILLRequest ? "ill_request_check_text" : "ill_request_place_text")?></a>
<?php endif; ?>
<?php else: ?>
<?php /* Begin Unavailable Items (Recalls) */ ?>
<span class="text-danger"><?=$this->transEsc($holding['status'])?><link property="availability" href="http://schema.org/OutOfStock" /></span>
<?php if ($holding['returnDate'] ?? false): ?>– <span class="small"><?=$this->escapeHtml($holding['returnDate'])?></span><?php endif; ?>
<?php if ($holding['duedate'] ?? false): ?>
– <span class="small"><?=$this->transEsc("Due")?>: <?=$this->escapeHtml($holding['duedate'])?></span>
<?php endif; ?>
<?php if (($holding['requests_placed'] ?? 0) > 0): ?>
<span><?=$this->transEsc("Requests")?>: <?=$this->escapeHtml($holding['requests_placed'])?></span>
<?php endif; ?>
<?php if ($holding['link'] ?? false): ?>
<a class="<?=$check ? 'checkRequest' : ''?> placehold" <?php if (!empty($holding['linkLightbox'])): ?>data-lightbox <?php endif; ?>href="<?=$this->escapeHtmlAttr($this->recordLinker()->getRequestUrl($holding['link']))?>"><i class="fa fa-flag" aria-hidden="true"></i> <?=$this->transEsc($check ? "Check Recall" : "Recall This")?></a>
<?php endif; ?>
<?=$this->relais()->renderButtonIfActive($this->driver ?? null)?>
<?php endif; ?>
<?php if (isset($holding['item_notes'])): ?>
<div class="item-notes">
<b><?=$this->transEsc("Item Notes")?>:</b>
<ul>
<?php foreach ($holding['item_notes'] as $item_note): ?>
<li><?=$this->escapeHtml($item_note) ?></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php endif; ?>
<?php /* Embed item structured data: library, barcode, call number */ ?>
<?php if ($holding['location'] ?? false): ?>
<meta property="seller" content="<?=$this->escapeHtmlAttr($holding['location'])?>" />
<?php endif; ?>
<?php if ($holding['barcode'] ?? false): ?>
<meta property="serialNumber" content="<?=$this->escapeHtmlAttr($holding['barcode'])?>" />
<?php endif; ?>
<?php if ($holding['callnumber'] ?? false): ?>
<meta property="sku" content="<?=$this->escapeHtmlAttr($holding['callnumber'])?>" />
<?php endif; ?>
<?php /* Declare that the item is to be borrowed, not for sale */ ?>
<link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut" />
<link property="itemOffered" href="#record" />
</td>
</tr>
<?php endif; ?>