-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibhours-display.tpl.php~
74 lines (72 loc) · 3.06 KB
/
libhours-display.tpl.php~
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
// $Id$
/**
* @file
* Theme for patron hours display for the libhours module
*
* @author Sean Watkins <slwatkins@uh.edu>
* @copyright 2011 University of Houston Libraries (http://info.lib.uh.edu)
*
* Available variables:
* - $lid: Location unique identifier
* - $pid: Period unique identifier
* - $locations: Array of available locations
* - $periods: Array of period information for a selected location
* - $description: Location description string
*
* @see template_preprocess()
* @see template_preprocess_hours_display()
*/
?>
<div id="libhours-content">
<div id="libhours-locations">
<ul id="libhours-location-list">
<?php foreach($locations as $location): ?>
<li class="libhours-location <?php echo (($location['lid'] == $lid)?'selected':'')?>" onclick="javascript:libhours.location('<?php echo $location['lid'] ?>')"><?php echo $location['name']?></li>
<?php foreach($location['children'] as $child): ?>
<li class="libhours-location libhours-child <?php echo (($child['lid'] == $lid)?'selected':'')?>" onclick="javascript:libhours.location('<?php echo $child['lid'] ?>')">- <?php echo $child['name']?></li>
<? endforeach; ?>
<?php endforeach; ?>
</ul>
</div>
<div id="libhours-periods">
<ul id="libhours-periods-tabs">
<?php foreach($periods as $period): ?>
<li id="libhours-tab-<?php echo $period['pid'] ?>" class="<?php echo (($period['pid'] == $pid)?'selected':'') ?>" onclick="javascript:libhours.tab('<?php echo $period['pid'] ?>')">
<div class="libhours-name"><?php echo $period['name'] ?></div>
<div class="libhours-daterange"><?php echo date("M j", $period['from_date']) ?> - <?php echo date("M j", $period['to_date']) ?></div>
</li>
<?php endforeach; ?>
</ul>
<?php foreach($periods as $period): ?>
<div id="libhours-period-<?php echo $period['pid'] ?>" class="libhours-view <?php echo (($period['pid'] == $pid)?'selected':'')?>">
<div class="libhours-stdhours">
<div class="libhours-name"><?php echo $period['name']?> Hours</div>
<ul>
<?php for($i=0;$i<count($period['hours']);$i++): ?>
<li class="libhours-hour"><div class="libhours-dow"><?php echo _libhours_dow($i)?>:</div><div class="libhours-time"><?php echo $period['hours'][$i] ?></div></li>
<?php endfor; ?>
</ul>
</div>
<?php if(count($period['exceptions']) > 0): ?>
<br clear="all">
<div class="libhours-exceptions">
<div class="libhours-name">Exceptions</div>
<div class="libhours-hour">
<ul>
<?php foreach($period['exceptions'] as $exception): ?>
<li class="libhours-label"><?php echo $exception['name']?></li>
<?php foreach($exception['times'] as $time): ?>
<li class="libhours-time"><?php echo $time ?></li>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</div>
</div>
<?php endif; ?>
<?php if($description): ?><div class="libhours-locationdescription"><?php echo $description ?></div><?php endif; ?>
<div class="libhours-disclaimer">Library hours are subject to change</div>
</div>
<?php endforeach; ?>
</div>
</div>