tpac : non-inherited org visibility ou-visibility-and-sorting
authorBill Erickson <berick@esilibrary.com>
Wed, 21 Mar 2012 18:34:19 +0000 (14:34 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 21 Mar 2012 18:34:19 +0000 (14:34 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/opac/parts/record/copy_counts.tt2
Open-ILS/src/templates/opac/parts/result/copy_counts.tt2

index f9f5594..0ae0d52 100644 (file)
@@ -4,8 +4,9 @@
     [%- depths = ctx.copy_summary.size;
         depth = 0;
         WHILE depth < depths;
-            ou_avail = ctx.copy_summary.$depth.available;
-            ou_id = ctx.copy_summary.$depth.org_unit;
+            IF ctx.get_aou(ctx.copy_summary.$depth.org_unit).opac_visible == 't';
+                ou_avail = ctx.copy_summary.$depth.available;
+                ou_id = ctx.copy_summary.$depth.org_unit;
     %]
     <li>
     [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ctx.get_aou(ou_id).name) | html %]
@@ -16,6 +17,6 @@
        [%- l('(Show)'); %]</a>
     [%- END; %]
     </li>
-    [%- depth = depth + 1; END %]
+    [%- END; depth = depth + 1; END %]
     </ul>
 </span>
index 97d5b32..5c90458 100644 (file)
@@ -3,10 +3,12 @@
     WHILE depth < depths;
 %]
 <div class="result_count">
+[% IF ctx.get_aou(attrs.copy_counts.$depth.org_unit).opac_visible == 't' %]
     [% l('[_1] of [quant,_2,copy,copies] available at [_3].',
         attrs.copy_counts.$depth.available,
         attrs.copy_counts.$depth.count,
         ctx.get_aou(attrs.copy_counts.$depth.org_unit).name) | html
     %]
+[% END %]
 </div>
 [%- depth = depth + 1; END %]