forked from artesis/alma
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalma_table.tpl.php
More file actions
46 lines (46 loc) · 1.85 KB
/
alma_table.tpl.php
File metadata and controls
46 lines (46 loc) · 1.85 KB
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
<?php
/**
* @file
* Display holdings.
*/
?>
<table class = "<?php echo !empty($data['attributes']['class'][0]) ? $data['attributes']['class'][0] : '' ?> sticky-enabled" >
<thead>
<tr>
<th><?php echo isset($data['header']['placement']) ? $data['header']['placement'] : t('Placemenent') ?></th>
<th><?php echo isset($data['header']['copies']) ? $data['header']['copies'] : t('Copies') ?></th>
<th><?php echo isset($data['header']['at_home']) ? $data['header']['at_home'] : t('At home') ?></th>
</tr>
</thead>
<?php
foreach ($data['rows'] as $element):
if (isset($element['data'])):
if (isset($element['class'])):
?>
<tr class="total-holdings <?php echo !empty($element['data']['Class']) ? $element['data']['Class'] : '' ?>">
<td><?php echo isset($element['data']['Library']) ? $element['data']['Library'] : '' ?></td>
<td><?php echo isset($element['data']['Copies']) ? $element['data']['Copies'] : '0' ?></td>
<td><?php echo isset($element['data']['Home']) ? $element['data']['Home'] : '0' ?></td>
</tr>
<?php
else:
?>
<tr class="availability-holdings-total-row">
<td><?php echo isset($element['data']['Library']) ? $element['data']['Library'] : '' ?></td>
<td><?php echo isset($element['data']['Copies']) ? $element['data']['Copies'] : '0' ?></td>
<td><?php echo isset($element['data']['Home']) ? $element['data']['Home'] : '0' ?></td>
</tr>
<?php
endif;
else:
?>
<tr>
<td><?php echo isset($element['placement']) ? $element['placement'] : '' ?></td>
<td><?php echo isset($element['copies']) ? $element['copies'] : '0' ?></td>
<td><?php echo isset($element['home']) ? $element['home'] : '0' ?></td>
</tr>
<?php
endif;
endforeach;
?>
</table>