TPAC - show total copy count in record summary
authorBen Shum <bshum@biblio.org>
Wed, 12 Sep 2012 20:20:56 +0000 (16:20 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Wed, 12 Sep 2012 20:45:08 +0000 (16:45 -0400)
Similar to how the Results page shows the number of currently
available out of number total (3 of 5 copies available at X),
we should do the same in the record display for consistency.

Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Open-ILS/src/templates/opac/parts/record/copy_counts.tt2

index cd59442..25a8257 100644 (file)
@@ -6,6 +6,7 @@
         displayed_ous = {};
         WHILE depth < depths;
             ou_avail = ctx.copy_summary.$depth.available;
+            ou_count = ctx.copy_summary.$depth.count;
             ou_id = ctx.copy_summary.$depth.org_unit;
             cp_org_unit = ctx.get_aou(ou_id);
             IF cp_org_unit.opac_visible == 'f' AND !ctx.is_staff;
@@ -16,7 +17,7 @@
             displayed_ous.$ou_name = 1;
     %]
     <li>
-    [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ou_name) | html %]
+    [% l('[_1] of [quant,_2,copy,copies] at [_3].', ou_avail, ou_count, ou_name) | html %]
     [%- this_depth = ctx.get_aou(ou_id).ou_type.depth;
         IF ou_avail > 0 && this_depth != ctx.copy_depth %]
     <a href="[% mkurl('', {copy_depth => this_depth}, ['copy_offset']); %]"