From 5d4f4b697450ad9adcea77a46c6047fc0019bcde Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Tue, 14 Aug 2012 12:38:27 -0400 Subject: [PATCH] HACK: hide OU 1 in org selector, copy counts TADL hack to hide top of org unit tree from the org selector, hide top of tree copy counts from search results and record page. Signed-off-by: Jeff Godin --- templates_tadlskin/opac/parts/org_selector.tt2 | 1 + templates_tadlskin/opac/parts/record/copy_counts.tt2 | 5 +++++ templates_tadlskin/opac/parts/result/copy_counts.tt2 | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/templates_tadlskin/opac/parts/org_selector.tt2 b/templates_tadlskin/opac/parts/org_selector.tt2 index 31ba30d7e8..306be83c2d 100644 --- a/templates_tadlskin/opac/parts/org_selector.tt2 +++ b/templates_tadlskin/opac/parts/org_selector.tt2 @@ -66,6 +66,7 @@ BLOCK build_org_selector; # This org unit is not publicly visible (though its children may be). NEXT UNLESS ctx.is_staff OR visible; + NEXT IF ou_id == 1; # TADL hack to hide root of tree node_value = ou_id; IF loc_grp; diff --git a/templates_tadlskin/opac/parts/record/copy_counts.tt2 b/templates_tadlskin/opac/parts/record/copy_counts.tt2 index cd5944285f..a7ad420f43 100644 --- a/templates_tadlskin/opac/parts/record/copy_counts.tt2 +++ b/templates_tadlskin/opac/parts/record/copy_counts.tt2 @@ -5,6 +5,11 @@ depth = 0; displayed_ous = {}; WHILE depth < depths; + # TADL hack to hide counts for top of tree + IF ctx.copy_summary.$depth.org_unit == 1; + depth = depth + 1; + NEXT; + END; ou_avail = ctx.copy_summary.$depth.available; ou_id = ctx.copy_summary.$depth.org_unit; cp_org_unit = ctx.get_aou(ou_id); diff --git a/templates_tadlskin/opac/parts/result/copy_counts.tt2 b/templates_tadlskin/opac/parts/result/copy_counts.tt2 index 639877e9d6..cb3b3c611b 100644 --- a/templates_tadlskin/opac/parts/result/copy_counts.tt2 +++ b/templates_tadlskin/opac/parts/result/copy_counts.tt2 @@ -2,6 +2,11 @@ depth = 0; displayed_ous = {}; WHILE depth < depths; + # TADL hack to hide counts for top of tree + IF attrs.copy_counts.$depth.org_unit == 1; + depth = depth + 1; + NEXT; + END; ou_name = ctx.get_aou(attrs.copy_counts.$depth.org_unit).name; displayed_ous.$ou_name = 1; IF attrs.copy_counts.$depth.count > 0; -- 2.11.0