From bbcbae27d06eb4095fc006dbe2669cd0266409d8 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Tue, 9 Oct 2012 12:00:35 -0400 Subject: [PATCH] Display iframe widget for AVOD titles First attempt at an AVOD widget, displayed when the user is logged in. For SSL concerns, a custom proxy cgi is used. The proxy cgi decides if it should display the widget or a static thumbnail. In theory, this could be used for other content providers as well. Add a "Resident patrons click here to view content" link for widgets when not logged in. Signed-off-by: Jeff Godin --- templates_tadlskin/opac/parts/misc_util.tt2 | 1 + templates_tadlskin/opac/parts/record/summary.tt2 | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/templates_tadlskin/opac/parts/misc_util.tt2 b/templates_tadlskin/opac/parts/misc_util.tt2 index a0b3c993d3..a72396c920 100644 --- a/templates_tadlskin/opac/parts/misc_util.tt2 +++ b/templates_tadlskin/opac/parts/misc_util.tt2 @@ -204,6 +204,7 @@ args.ezproxy = 1; IF (avod_xtid = res.href.match('url=http://avod.films.com/PortalPlaylists.aspx\?aid=\d+&xtid=(\d+)')); args.cover_url = 'https://secure.films.com/Common/FMGimages/' _ avod_xtid.0 _ '_full.jpg'; + args.widget_html = ""; END; END; END; diff --git a/templates_tadlskin/opac/parts/record/summary.tt2 b/templates_tadlskin/opac/parts/record/summary.tt2 index 5727a5c637..ddb8656a2d 100644 --- a/templates_tadlskin/opac/parts/record/summary.tt2 +++ b/templates_tadlskin/opac/parts/record/summary.tt2 @@ -22,11 +22,22 @@ jacket_src = ctx.media_prefix _ '/opac/extras/ac/jacket/' _ record.summary.jacket_size _ '/r/' _ bre_id_urisafe; jacket_href = ctx.media_prefix _ '/opac/extras/ac/jacket/large/r/' _ bre_id_urisafe; END; + + IF args.widget_html; + jacket_href = mkurl(ctx.opac_root _ '/login'); + login_teaser = "Resident patrons click here to view content"; + END; %] - [% IF jacket_href %][% END %][% END %] + [% IF login_teaser %]

[% login_teaser %]

[% END %][% l('Image of item') %][% IF jacket_href %]
[% END %] + [% END %]
-- 2.11.0