From b72efe9e71f9a5431da1410b3b8e2d213b202f65 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 12 Aug 2014 10:09:57 -0400 Subject: [PATCH] Bug 12655 [Revised] PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path in XSLT Two XSL files in the bootstrap theme contain hard-coded paths to the prog theme directory. This patch adds a query of the opacthemes system preference and builds the path based on the returned value. To test in a MARC21 system: Create or locate a record which contains a subject which is linked to an authority record. View the detail page for that record in the bootstrap OPAC and confirm that there is a magnifying class icon next to the link for that subject heading. Inspect or right-click the image and "View image" [FF. "Open image in new tab" in Chrome] to verify that the image being shown is from the bootstrap theme directory. Also modified: The NORMARC XSL for the detail page which has been changed in the same way. I did not test it in a NORMARC catalog. Edit: Fixed copy-and-paste error causing duplicate image. Signed-off-by: Brendan Gallagher Signed-off-by: Chris Cormack --- C4/XSLT.pm | 2 +- .../en/xslt/MARC21slim2OPACDetail.xsl | 15 ++++++++-- .../en/xslt/NORMARCslim2OPACDetail.xsl | 29 ++++++++++++++++--- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index bfacc6501a..a255b3303f 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -206,7 +206,7 @@ sub XSLTParse4Display { UseControlNumber IntranetBiblioDefaultView BiblioDefaultView singleBranchMode OPACItemLocation DisplayIconsXSLT AlternateHoldingsField AlternateHoldingsSeparator - TrackClicks / ) + TrackClicks opacthemes / ) { my $sp = C4::Context->preference( $syspref ); next unless defined($sp); diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl index a85682370d..15960cd1a3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl @@ -28,6 +28,7 @@ + @@ -590,7 +591,12 @@ /cgi-bin/koha/opac-authoritiesdetail.pl?authid= - + + /opac-tmpl//images/filefind.png + vertical-align:middle + 15 + 15 + @@ -1063,7 +1069,12 @@ /cgi-bin/koha/opac-authoritiesdetail.pl?authid= - + + /opac-tmpl//images/filefind.png + vertical-align:middle + 15 + 15 + diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl index e9fd6257a9..62e004da8c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl @@ -33,6 +33,7 @@ + @@ -105,7 +106,12 @@ /cgi-bin/koha/opac-authoritiesdetail.pl?authid= - + + /opac-tmpl//images/filefind.png + vertical-align:middle + 15 + 15 + @@ -126,7 +132,12 @@ /cgi-bin/koha/opac-authoritiesdetail.pl?authid= - + + /opac-tmpl//images/filefind.png + vertical-align:middle + 15 + 15 + .; @@ -146,7 +157,12 @@ /cgi-bin/koha/opac-authoritiesdetail.pl?authid= - + + /opac-tmpl//images/filefind.png + vertical-align:middle + 15 + 15 + .; @@ -424,7 +440,12 @@ /cgi-bin/koha/opac-authoritiesdetail.pl?authid= - + + /opac-tmpl//images/filefind.png + vertical-align:middle + 15 + 15 + -- 2.39.5