From: berick Date: Mon, 14 Mar 2011 20:43:57 +0000 (-0400) Subject: i18n and repaired holds estimated wait calculation. X-Git-Url: http://git.equinoxoli.org/?p=evergreen-equinox.git;a=commitdiff_plain;h=6b82af4f8ab8b8c1eaa6e31a699d7e9ab7b896f8 i18n and repaired holds estimated wait calculation. --- diff --git a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 b/Open-ILS/web/templates/default/opac/myopac/holds.tt2 index fc56d54..79e3044 100644 --- a/Open-ILS/web/templates/default/opac/myopac/holds.tt2 +++ b/Open-ILS/web/templates/default/opac/myopac/holds.tt2 @@ -194,9 +194,10 @@ [% IF hold.hold.status == 4; l("Available"); - ELSIF hold.hold.estimated_wait; - l("Estimated wait (days): "); - hold.hold.estimated_wait; + ELSIF hold.hold.estimated_wait AND hold.hold.estimated_wait > 0; + # estimated wait is delivered as seconds. + SET hwait = POSIX.ceil(hold.hold.estimated_wait / 86400); + l("Estimated wait: [quant,_1,day,days]", hwait); ELSIF hold.hold.status == 3; l("In Transit"); ELSIF hold.hold.status < 3; diff --git a/Open-ILS/web/templates/default/opac/parts/header.tt2 b/Open-ILS/web/templates/default/opac/parts/header.tt2 index ca33722..b09ae69 100644 --- a/Open-ILS/web/templates/default/opac/parts/header.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/header.tt2 @@ -2,6 +2,7 @@ USE date; USE CGI = CGIUTF8; USE EGI18N; + USE POSIX; SET DATE_FORMAT = l('%m/%d/%Y'); # Don't wrap in l() here; do that where this format string is actually used.