From: Dan Scott Date: Mon, 16 Dec 2013 20:02:41 +0000 (-0500) Subject: Split library hours into its own display template X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=863605c8563626db5ef719a1c3f615bb04dacc85;p=working%2FEvergreen.git Split library hours into its own display template There is enough complexity in the template that it is likely to undergo churn and customization. So break it out. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/src/templates/opac/library.tt2 b/Open-ILS/src/templates/opac/library.tt2 index 7fd8fb4224..0c51050efa 100644 --- a/Open-ILS/src/templates/opac/library.tt2 +++ b/Open-ILS/src/templates/opac/library.tt2 @@ -16,35 +16,7 @@ -%] [%- IF ctx.hours; %] -

[% l('Opening hours') %]

-
[% - l('Monday: [_1]-[_2]', '' _ ctx.hours.dow_0_open.substr(0, 5) _ '', - '' _ ctx.hours.dow_0_close.substr(0, 5) _ '') -%] -
-
[% - l('Tuesday: [_1]-[_2]', '' _ ctx.hours.dow_1_open.substr(0, 5) _ '', - '' _ ctx.hours.dow_1_close.substr(0, 5) _ '') -%] -
-
[% - l('Wednesday: [_1]-[_2]', '' _ ctx.hours.dow_2_open.substr(0, 5) _ '', - '' _ ctx.hours.dow_2_close.substr(0, 5) _ '') -%] -
-
[% - l('Thursday: [_1]-[_2]', '' _ ctx.hours.dow_3_open.substr(0, 5) _ '', - '' _ ctx.hours.dow_3_close.substr(0, 5) _ '') -%] -
-
[% - l('Friday: [_1]-[_2]', '' _ ctx.hours.dow_4_open.substr(0, 5) _ '', - '' _ ctx.hours.dow_4_close.substr(0, 5) _ '') -%] -
-
[% - l('Saturday: [_1]-[_2]', '' _ ctx.hours.dow_5_open.substr(0, 5) _ '', - '' _ ctx.hours.dow_5_close.substr(0, 5) _ '') -%] -
-
[% - l('Sunday: [_1]-[_2]', '' _ ctx.hours.dow_6_open.substr(0, 5) _ '', - '' _ ctx.hours.dow_6_close.substr(0, 5) _ '') -%] -
+ [%- INCLUDE "opac/parts/library/hours.tt2"; %] [% END; -%] [%- IF (ctx.library.email OR ctx.library.phone); %] diff --git a/Open-ILS/src/templates/opac/parts/library/hours.tt2 b/Open-ILS/src/templates/opac/parts/library/hours.tt2 new file mode 100644 index 0000000000..07c559f853 --- /dev/null +++ b/Open-ILS/src/templates/opac/parts/library/hours.tt2 @@ -0,0 +1,29 @@ +

[% l('Opening hours') %]

+
[% + l('Monday: [_1]-[_2]', '' _ ctx.hours.dow_0_open.substr(0, 5) _ '', + '' _ ctx.hours.dow_0_close.substr(0, 5) _ '') -%] +
+
[% + l('Tuesday: [_1]-[_2]', '' _ ctx.hours.dow_1_open.substr(0, 5) _ '', + '' _ ctx.hours.dow_1_close.substr(0, 5) _ '') -%] +
+
[% + l('Wednesday: [_1]-[_2]', '' _ ctx.hours.dow_2_open.substr(0, 5) _ '', + '' _ ctx.hours.dow_2_close.substr(0, 5) _ '') -%] +
+
[% + l('Thursday: [_1]-[_2]', '' _ ctx.hours.dow_3_open.substr(0, 5) _ '', + '' _ ctx.hours.dow_3_close.substr(0, 5) _ '') -%] +
+
[% + l('Friday: [_1]-[_2]', '' _ ctx.hours.dow_4_open.substr(0, 5) _ '', + '' _ ctx.hours.dow_4_close.substr(0, 5) _ '') -%] +
+
[% + l('Saturday: [_1]-[_2]', '' _ ctx.hours.dow_5_open.substr(0, 5) _ '', + '' _ ctx.hours.dow_5_close.substr(0, 5) _ '') -%] +
+
[% + l('Sunday: [_1]-[_2]', '' _ ctx.hours.dow_6_open.substr(0, 5) _ '', + '' _ ctx.hours.dow_6_close.substr(0, 5) _ '') -%] +