From c35029261b80bbdcef6c51a472925b688be4c982 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Mon, 20 Feb 2017 15:38:24 -0500 Subject: [PATCH] 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 --- Open-ILS/src/templates/opac/parts/homesearch.tt2 | 348 +-------------------- Open-ILS/src/templates/opac/parts/org_selector.tt2 | 134 ++++++++ 2 files changed, 135 insertions(+), 347 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/homesearch.tt2 b/Open-ILS/src/templates/opac/parts/homesearch.tt2 index 27b3456aec..e59c9604ab 100644 --- a/Open-ILS/src/templates/opac/parts/homesearch.tt2 +++ b/Open-ILS/src/templates/opac/parts/homesearch.tt2 @@ -13,353 +13,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 %] + -- 2.11.0