From: Liam Whalen Date: Wed, 17 Jul 2013 00:23:57 +0000 (-0700) Subject: LP#1441714 Remove 'NO COPIES' in Staff Client X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fldw%2FLP1441714_No_Copies_Message;p=working%2FEvergreen.git LP#1441714 Remove 'NO COPIES' in Staff Client When a record has only OPAC invisible items attached to it, the TPAC displays a 'NO COPIES' message in the staff client. This fix skips the check for opac visible items when the staff client is being used. This can result in incomplete information being displayed in the summary of the available items because opac invisible items are often incomplete and do not have shelving locations or libraries assigned to them. This fix checks for ctx.is_staff in a number of lines. This results in holdings being excluded only if the copy is not visible and the ctx.is_staff variable is not set. Signed-off-by: Liam Whalen --- diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 0af121c4e5..f34d1ff9f6 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -495,7 +495,7 @@ # Check copy visibility cp.deleted = copy.getAttribute('deleted'); cp.visible = copy.getAttribute('opac_visible'); - NEXT IF (cp.deleted == 'true' OR cp.visible == 'false'); + NEXT IF (cp.deleted == 'true' OR (cp.visible == 'false' AND !(ctx.is_staff))); # Iterate through all of the children to determine visibility FOR node IN cp.childNodes; @@ -507,16 +507,16 @@ END; END; - NEXT IF cp.visible == 'false'; + NEXT IF (cp.visible == 'false' AND !(ctx.is_staff)); loc = copy.findnodes('./*[local-name()="location"]'); - NEXT IF loc.getAttribute('opac_visible') == 'false'; + NEXT IF (loc.getAttribute('opac_visible') == 'false' AND !(ctx.is_staff)); circlib = copy.findnodes('./*[local-name()="circlib"]'); - NEXT IF circlib.getAttribute('opac_visible') == 'false'; + NEXT IF (circlib.getAttribute('opac_visible') == 'false' AND !(ctx.is_staff)); status = copy.findnodes('./*[local-name()="status"]'); - NEXT IF status.getAttribute('opac_visible') == 'false'; + NEXT IF (status.getAttribute('opac_visible') == 'false' AND !(ctx.is_staff)); # extract the circ_lib id from the circ_lib node circ_lib = copy.findnodes('./*[local-name()="circ_lib"]');