From: Bill Erickson Date: Wed, 21 Mar 2012 18:34:19 +0000 (-0400) Subject: tpac : non-inherited org visibility X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fou-visibility-and-sorting;p=evergreen%2Fequinox.git tpac : non-inherited org visibility Signed-off-by: Bill Erickson --- 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 %]