]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/templates/opac/parts/library/hours.tt2
First inklings of schema.org support for library pages
[working/Evergreen.git] / Open-ILS / src / templates / opac / parts / library / hours.tt2
1 <h2>[% l('Opening hours') %]</h2>
2 [%- IF ctx.hours.dow_0_open == ctx.hours.dow_0_close; %]
3 <div class="opening-hours">[% l('Monday: closed') %]</div>
4 [%- ELSE %]
5 <div class="opening-hours" property="openingHoursSpecification" typeof="OpeningHoursSpecification"><link property="dayOfWeek" href="http://purl.org/goodrelations/v1#Monday" />[%
6     l('Monday: [_1]-[_2]', '<span property="opens">' _ ctx.hours.dow_0_open.substr(0, 5) _ '</span>',
7      '<span property="closes">' _ ctx.hours.dow_0_close.substr(0, 5) _ '</span>') -%]
8 </div>
9 [%- END %]
10 [%- IF ctx.hours.dow_1_open == ctx.hours.dow_1_close; %]
11 <div class="opening-hours">[% l('Tuesday: closed') %]</div>
12 [%- ELSE %]
13 <div class="opening-hours" property="openingHoursSpecification" typeof="OpeningHoursSpecification"><link property="dayOfWeek" href="http://purl.org/goodrelations/v1#Tuesday" />[%
14     l('Tuesday: [_1]-[_2]', '<span property="opens">' _ ctx.hours.dow_1_open.substr(0, 5) _ '</span>',
15      '<span property="closes">' _ ctx.hours.dow_1_close.substr(0, 5) _ '</span>') -%]
16 </div>
17 [%- END %]
18 [%- IF ctx.hours.dow_2_open == ctx.hours.dow_2_close; %]
19 <div class="opening-hours">[% l('Wednesday: closed') %]</div>
20 [%- ELSE %]
21 <div class="opening-hours" property="openingHoursSpecification" typeof="OpeningHoursSpecification"><link property="dayOfWeek" href="http://purl.org/goodrelations/v1#Wednesday" />[%
22     l('Wednesday: [_1]-[_2]', '<span property="opens">' _ ctx.hours.dow_2_open.substr(0, 5) _ '</span>',
23      '<span property="closes">' _ ctx.hours.dow_2_close.substr(0, 5) _ '</span>') -%]
24 </div>
25 [%- END %]
26 [%- IF ctx.hours.dow_3_open == ctx.hours.dow_3_close; %]
27 <div class="opening-hours">[% l('Thursday: closed') %]</div>
28 [%- ELSE %]
29 <div class="opening-hours" property="openingHoursSpecification" typeof="OpeningHoursSpecification"><link property="dayOfWeek" href="http://purl.org/goodrelations/v1#Thursday" />[%
30     l('Thursday: [_1]-[_2]', '<span property="opens">' _ ctx.hours.dow_3_open.substr(0, 5) _ '</span>',
31      '<span property="closes">' _ ctx.hours.dow_3_close.substr(0, 5) _ '</span>') -%]
32 </div>
33 [%- END %]
34 [%- IF ctx.hours.dow_4_open == ctx.hours.dow_4_close; %]
35 <div class="opening-hours">[% l('Friday: closed') %]</div>
36 [%- ELSE %]
37 <div class="opening-hours" property="openingHoursSpecification" typeof="OpeningHoursSpecification"><link property="dayOfWeek" href="http://purl.org/goodrelations/v1#Friday" />[%
38     l('Friday: [_1]-[_2]', '<span property="opens">' _ ctx.hours.dow_4_open.substr(0, 5) _ '</span>',
39      '<span property="closes">' _ ctx.hours.dow_4_close.substr(0, 5) _ '</span>') -%]
40 </div>
41 [%- END %]
42 [%- IF ctx.hours.dow_5_open == ctx.hours.dow_5_close; %]
43 <div class="opening-hours">[% l('Saturday: closed') %]</div>
44 [%- ELSE %]
45 <div class="opening-hours" property="openingHoursSpecification" typeof="OpeningHoursSpecification"><link property="dayOfWeek" href="http://purl.org/goodrelations/v1#Saturday" />[%
46     l('Saturday: [_1]-[_2]', '<span property="opens">' _ ctx.hours.dow_5_open.substr(0, 5) _ '</span>',
47      '<span property="closes">' _ ctx.hours.dow_5_close.substr(0, 5) _ '</span>') -%]
48 </div>
49 [%- END %]
50 [%- IF ctx.hours.dow_6_open == ctx.hours.dow_6_close; %]
51 <div class="opening-hours">[% l('Sunday: closed') %]</div>
52 [%- ELSE %]
53 <div class="opening-hours" property="openingHoursSpecification" typeof="OpeningHoursSpecification"><link property="dayOfWeek" href="http://purl.org/goodrelations/v1#Sunday" />[%
54     l('Sunday: [_1]-[_2]', '<span property="opens">' _ ctx.hours.dow_6_open.substr(0, 5) _ '</span>',
55      '<span property="closes">' _ ctx.hours.dow_6_close.substr(0, 5) _ '</span>') -%]
56 </div>
57 [%- END %]