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 <jgodin@tadl.org>
# 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;
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);
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;