HACK: hide OU 1 in org selector, copy counts
authorJeff Godin <jgodin@tadl.org>
Tue, 14 Aug 2012 16:38:27 +0000 (12:38 -0400)
committerJeff Godin <jgodin@tadl.org>
Tue, 14 Aug 2012 16:38:27 +0000 (12:38 -0400)
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>
templates_tadlskin/opac/parts/org_selector.tt2
templates_tadlskin/opac/parts/record/copy_counts.tt2
templates_tadlskin/opac/parts/result/copy_counts.tt2

index 31ba30d..306be83 100644 (file)
@@ -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;
index cd59442..a7ad420 100644 (file)
@@ -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);
index 639877e..cb3b3c6 100644 (file)
@@ -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;