From 3bd088af36e3cf1f15b47803cf2b90f58d44b02a Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Wed, 10 Dec 2014 09:51:17 -0500 Subject: [PATCH] Add a toggle to show a link to a Google Map on Library Page By setting ctx.google_maps_link = 1 in config.tt2, a link to a Google Map of the org unit in question will be placed on the Library Page (core_info.tt2 aka eg/opac/library/CONS) where CONS = shortname of org unit. Signed-off-by: Michael Peters --- Open-ILS/src/templates/opac/parts/config.tt2 | 5 +++++ Open-ILS/src/templates/opac/parts/library/core_info.tt2 | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 8b0e69f3c0..b050317a80 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -160,6 +160,11 @@ search.basic_config = { ctx.google_books_preview = 0; ############################################################################## +# Show Google Map Links on Library Info Pages +# Set to 1 or 'true' to enable +ctx.google_maps_link = 0; + +############################################################################## # Set a maintenance message to display in the catalogue # diff --git a/Open-ILS/src/templates/opac/parts/library/core_info.tt2 b/Open-ILS/src/templates/opac/parts/library/core_info.tt2 index 1398f7035f..ed1f6c20df 100644 --- a/Open-ILS/src/templates/opac/parts/library/core_info.tt2 +++ b/Open-ILS/src/templates/opac/parts/library/core_info.tt2 @@ -44,6 +44,10 @@ [%- END; %] + [%- IF ctx.google_maps_link; %] + Generate Map & Directions + [% END; -%] + [%- IF ctx.library.parent_ou; %]

Branch relationship

[% l('Parent library: ') %] -- 2.11.0