From 179a7f8d767c7a042bc0c91f97ee979115b40259 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 24 Oct 2012 12:30:33 -0400 Subject: [PATCH] Bug 8952: Add http:// to url in social media links on opac-detail This patch adds a variable to the template, "protocol" based on whether "using_https" is set. The appropriate protocol is inserted before social media links. To test, confirm that OPACBaseURL is set and lacks "http(s)://" Social media links should include correct URLs. A follow-up patch could copy use of this [% protocol %] variable in other parts of this template which duplicate large chunks of HTML based on [% using_https %]. Signed-off-by: Marcel de Rooy Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt index bf2d3fc801..2247f3b7d4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -17,6 +17,11 @@ [% END %] [% END %] +[% IF ( using_https ) %] + [% SET protocol = "https://" %] +[% ELSE %] + [% SET protocol = "http://" %] +[% END %] [% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %], [% subtitl.subfield |html %][% END %] [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'datatables.inc' %] @@ -1481,10 +1486,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( SocialNetworks ) %] -- 2.39.5