From: Bill Erickson Date: Thu, 27 Oct 2011 19:10:23 +0000 (-0400) Subject: Tpac; style due-date red/error for overdue items X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8081334e304d2fdcdd6126c60eceeebeb650495c;p=contrib%2FConifer.git 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 --- 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 %]