PINES OPAC Fix: Holdings Navigation rel_3_0_1_opac_holdings_nav_fix
authorMcCanna <tmccanna@georgialibraries.org>
Mon, 4 Dec 2017 22:51:00 +0000 (17:51 -0500)
committerMcCanna <tmccanna@georgialibraries.org>
Mon, 4 Dec 2017 22:51:00 +0000 (17:51 -0500)
Add in OPAC code from Master to calculate the number of copies.

Signed-off-by: McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates/opac/parts/record/copy_table.tt2

index 5877bbb..cb49341 100644 (file)
@@ -25,7 +25,11 @@ FOREACH copy_info IN copies;
     END;
 END;
 -%]
-[%- IF has_copies; %]
+[%-
+IF has_copies or ctx.foreign_copies;
+  depth = CGI.param('copy_depth').defined ? CGI.param('copy_depth') : CGI.param('depth').defined ? CGI.param('depth') : ctx.copy_summary.last.depth;
+  total_copies = ctx.copy_summary.$depth.count;
+%]
 <table  width="100%" cellpadding="5" style="border:1px #999 solid;">
     <thead>
         <tr>