From: Terran McCanna Date: Mon, 20 Feb 2017 20:38:24 +0000 (-0500) Subject: New Book List Selector X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=225a0f6c340d196ee2115a729ddc8271f4e16dd1;p=evergreen%2Fpines.git New Book List Selector I created a new library dropdown based on the existing org selector dropdown which dynamically creates the library list for the new book selector. This replaces the manually-coded new book list selector I originally put in place in order to get the feature rolled out. Signed-off-by: Terran McCanna --- diff --git a/Open-ILS/src/templates/opac/parts/homesearch.tt2 b/Open-ILS/src/templates/opac/parts/homesearch.tt2 index b01c4bd12a..8e11399df0 100644 --- a/Open-ILS/src/templates/opac/parts/homesearch.tt2 +++ b/Open-ILS/src/templates/opac/parts/homesearch.tt2 @@ -15,353 +15,7 @@ [% l('New Library Materials') %]

- + [% INCLUDE build_org_selector_newitems show_loc_groups=1 %]
diff --git a/Open-ILS/src/templates/opac/parts/org_selector.tt2 b/Open-ILS/src/templates/opac/parts/org_selector.tt2 index 3f83690f22..11fba81c95 100644 --- a/Open-ILS/src/templates/opac/parts/org_selector.tt2 +++ b/Open-ILS/src/templates/opac/parts/org_selector.tt2 @@ -135,3 +135,137 @@ BLOCK build_org_selector; [%- END %] [%- END %] + + +[% # PINES Customization for New Library Materials + # Build second org selector that uses shortname instead of id + +BLOCK build_org_selector_newitems; + node_stack = [{org => org_unit || ctx.aouct_tree || ctx.aou_tree}]; + inherited_vis = ctx.get_cgf('opac.org_unit.non_inherited_visibility').enabled == 'f'; + + IF !name; + name = loc_name; + END; + IF !value; + value = loc_value; + END; + + # if the selected org unit is out of hiding scope, + # disable the ou-hide scoping altogether. + hiding_disabled = ctx.org_hiding_disabled(value); + + -%] + + +[%- END %] +