From 8081334e304d2fdcdd6126c60eceeebeb650495c Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 27 Oct 2011 15:10:23 -0400 Subject: [PATCH] Tpac; style due-date red/error for overdue items In the patrons items out list, if an item is overdue, style the due date as "error" (i.e. bold red). Signed-off-by: Bill Erickson --- Open-ILS/src/templates/opac/myopac/circs.tt2 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2 index c6312e3ed6..c0f5770c39 100644 --- a/Open-ILS/src/templates/opac/myopac/circs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circs.tt2 @@ -113,9 +113,12 @@ [% circ.circ.renewal_remaining %] - - [% date.format(ctx.parse_datetime(circ.circ.due_date),DATE_FORMAT) %] + [% + due_date = ctx.parse_datetime(circ.circ.due_date); + due_class = (date.now > date.format(due_date, '%s')) ? 'error' : ''; + %] + + [% date.format(due_date, DATE_FORMAT) %] [% circ.circ.target_copy.barcode | html %] -- 2.11.0