TPac: non-inherited org unit visibility

Adds support for displaying org units that are children of hidden org
units in the tpac org unit selector.  A new global flag was added to
control this behavior called "opac.org_unit.non_inheritied_visibility" /
"Org Units Do Not Inherit Visibility".

To avoid confusion / distorted org unit trees, children of hidden org
units are left-padded one less for each hidden parent org unit.  For
example, in the stock org tree, if Sys2 is opac_visible=false (and the
global flag is enabled), the tree in the tpac would appear like so:

Cons
- Sys 1
-- BR1
--- SL1
-- BR2
- BR3
- BR4

Similarly, if CONS was also hidden, the whole tree would be shifted left
by 1 pad depth.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Repaired non-slim org unit fetching bug

Fixed an old thinko.  When fetching a full org unit object, set the
children org unit array value instead of clobbering the function.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Custom Org Tree : DB and IDL

Support for building custom org unit hierarchies for display purposes.
Initially, this is meant to support custom OPAC trees, but the design
leaves from for other types of trees.

The only restrictions to custom org trees is that no org unit appear
more once and that they in fact be tree-shaped.  Otherwise, any node
can be the parent/child of any other node, regardless of ou_type, etc.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Custom Org Tree : tpac

If configured and active, the tpac will now use the custom 'opac' tree
for the org unit selectors.  This will be true in both the public
catalog and the staff client catalog.  The staff client catalog will
continue to display hidden org units.

If the opac.org_unit.non_inheritied_visibility global flag is set, the
public catalog will display child nodes of hidden org units in the
custom tree.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Custom Org Tree : Admin UI

New UI for managing custom org unit trees.  (Only OPAC is supported for
now).  Custom trees default to the same shape as the full org unit tree.
Staff can remove nodes and re-order nodes.  Staff can also replace
deleted nodes by dragging them from the reference tree on the left.

Admin -> Server Admin -> Custom Org Unit Trees

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
TPac: non-inherited org unit visibility : hide copy counts

Avoid showing copy counts for non-opac-visible org units in the search
results and record details page.  This is important when the
'opac.org_unit.non_inheritied_visibility' global flag is enabled, as org
units along the tree may be non-visible.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Custom Org Tree : Admin UI honors "activate" on new trees

Previously, activating a new tree would work, but the UI did not update
to reflect it.  Now the activate link correctly turns into a de-activate
link and vice versa.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Stamping upgrade script for "Org unit selective hiding and sorting in tpac library selector"

Signed-off-by: Mike Rylander <mrylander@gmail.com>