From: Terran McCanna Date: Thu, 23 Sep 2021 16:53:54 +0000 (-0400) Subject: LP1944755 Add ability to embed carousels on external pages X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9ecdc4a6f42344a47283cc7da99c74013869a13f;p=evergreen%2Fmasslnc.git LP1944755 Add ability to embed carousels on external pages This displays carousels on an otherwise blank page, allowing libraries to very easily embed them on their web sites using iframes. Example iframe code: The base_simple code could also be used by other future features that are driven by Evergreen but that shouldn't display the headers and footers. Signed-off-by: Terran McCanna Signed-off-by: Garry Collum Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 5763cb8e03..9b0279d687 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -171,6 +171,7 @@ sub load { return $self->load_cache_clear if $path =~ m|opac/cache/clear|; return $self->load_temp_warn_post if $path =~ m|opac/temp_warn/post|; return $self->load_temp_warn if $path =~ m|opac/temp_warn|; + return $self->load_simple("carousel") if $path =~ m|opac/carousel|; # ---------------------------------------------------------------- # Everything below here requires SSL diff --git a/Open-ILS/src/templates-bootstrap/opac/carousel.tt2 b/Open-ILS/src/templates-bootstrap/opac/carousel.tt2 new file mode 100644 index 0000000000..bf54466b32 --- /dev/null +++ b/Open-ILS/src/templates-bootstrap/opac/carousel.tt2 @@ -0,0 +1,8 @@ +[%- PROCESS "opac/parts/header.tt2"; + WRAPPER "opac/parts/base_simple.tt2"; + PROCESS "opac/parts/org_selector.tt2"; + ctx.metalinks.push(''); + ctx.page_title = l("Carousel"); + PROCESS carousels; + END +-%] diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/base_simple.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/base_simple.tt2 new file mode 100644 index 0000000000..9ac17e4556 --- /dev/null +++ b/Open-ILS/src/templates-bootstrap/opac/parts/base_simple.tt2 @@ -0,0 +1,84 @@ + + + + + + [% IF ctx.refresh %] + + [% ELSIF ctx.authtime AND !ctx.is_staff %] + + [% END %] + + + + + + + + + [% IF ctx.get_i18n_l(ctx.eg_locale).rtl == 't' %] + + [% END %] + + [% IF ctx.get_org_setting(ctx.search_ou, 'opac.patron.custom_css') %] + [% custom_css = ctx.get_org_setting(ctx.search_ou, 'opac.patron.custom_css') %] + [% '' %] + [% END %] + + [%- libname = ctx.get_aou(ctx.search_ou).name; + libname = libname | html; + libsname = ctx.get_aou(ctx.search_ou).shortname; %] + [%- IF ctx.user_stats.messages.unread; + l('([_1])', ctx.user_stats.messages.unread); + END; + -%] + [% l('[_1] - [_2]', ctx.page_title, libname) %] + + + [%-# Hook for page-specific metadata such as %] + [%- ctx.metalinks.push(''); %] + [%- ctx.metalinks.push(''); %] + [% FOREACH meta IN ctx.metalinks; meta _ "\n"; END; -%] + [% IF want_dojo %] + + [% END %] + + [% IF !ctx.is_staff %] + [% INCLUDE 'opac/parts/goog_analytics.tt2' %] + [% END %] + [% PROCESS 'opac/parts/stripe.tt2' %] + + + + + + +

[% l('Catalog') %]

+ [%#Each content page needs (at minimum) an

describing the content%] +
+ [% content %] +
+ [% INCLUDE 'opac/parts/js.tt2' %] + + [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %] + [%- INCLUDE 'opac/parts/chilifresh.tt2' %] + [%- END %] + + + + + diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 index 959a3f91d0..7e976fd347 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 @@ -842,7 +842,7 @@