From e6feff69d6a913f57554864322448efe0fb03205 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 21 Mar 2012 14:34:19 -0400 Subject: [PATCH] tpac : non-inherited org visibility Signed-off-by: Bill Erickson --- Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 | 7 ++++--- Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 index f9f5594a02..0ae0d52220 100644 --- a/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/copy_counts.tt2 @@ -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; %]
  • [% l('[quant,_1,copy,copies] at [_2].', ou_avail, ctx.get_aou(ou_id).name) | html %] @@ -16,6 +17,6 @@ [%- l('(Show)'); %] [%- END; %]
  • - [%- depth = depth + 1; END %] + [%- END; depth = depth + 1; END %] diff --git a/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 b/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 index 97d5b3205d..5c9045899c 100644 --- a/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/copy_counts.tt2 @@ -3,10 +3,12 @@ WHILE depth < depths; %]
    +[% 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 %]
    [%- depth = depth + 1; END %] -- 2.11.0