From 02ea34923c32de76e6fcff4e7eb7cb54d611ca96 Mon Sep 17 00:00:00 2001 From: Jake Litrell Date: Mon, 14 Sep 2015 17:49:29 -0400 Subject: [PATCH] LP#1340852: Retain search params for copy location groups The order in which we determined what to 'selected' in the "Library" dropdown put the resolved locg first (which allows for shortnames, e.g. BR1). That only gives us half the location group though, which is why it was bumping up a level. Now, if we have a location group selected, it will use that first (since they don't have shortnames); the remaining select order will be the same. Signed-off-by: Jake Litrell Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/parts/misc_util.tt2 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 0af121c4e5..d1fb13550c 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -610,8 +610,12 @@ # which is a superset of 'loc'. BLOCK get_library; loc_name = 'locg'; - loc_value = ctx.copy_location_group_org || # resolved locg - CGI.param(loc_name) || CGI.param('loc') || ctx.search_ou; + + # Location groups don't have shortnames, so they'll take priority + # (_org doesn't contain the group and breaks the selector). + loc_value = ctx.copy_location_group ? CGI.param(loc_name) + : ctx.copy_location_group_org # resolved locg + || CGI.param(loc_name) || CGI.param('loc') || ctx.search_ou; END; %] -- 2.43.2