back-port tpac get_library macro
authorBill Erickson <berick@esilibrary.com>
Mon, 17 Sep 2012 13:55:07 +0000 (09:55 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 3 Oct 2012 17:16:52 +0000 (13:16 -0400)
Code which uses this macro was back-ported without defining the macro.
Back-ported here for great justice.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/opac/parts/misc_util.tt2

index d7e93d0..2150d5b 100644 (file)
         END;
 
     END;
+
+    # Get the library or location group
+    # get_library()
+    BLOCK get_library;
+        IF !loc_name; 
+            loc_name = 'loc';
+            IF show_loc_groups; loc_name = 'locg'; END;
+        END;
+        IF !loc_value;
+            loc_value = CGI.param('loc') || ctx.search_ou;
+            IF show_loc_groups; 
+                loc_value = CGI.param('locg') || ctx.search_ou;
+            END;
+        END;
+    END;
+
 %]