back-port tpac get_library macro user/berick/tpac-get-library-backport-2.2
authorBill Erickson <berick@esilibrary.com>
Mon, 17 Sep 2012 13:55:07 +0000 (09:55 -0400)
committerBill Erickson <berick@esilibrary.com>
Mon, 17 Sep 2012 13:55:07 +0000 (09:55 -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>
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;
+
 %]