Several OPAC XSL files in the bootstrap template contain hard-coded paths to the prog theme.
Created attachment 30041 [details] [review] Bug 12655 - 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.
This works for you? Not for me :( First 'opacthemes' need to be added to C4/XSLT.pm list of usable sysprefs Second I think the proper syntax is <xsl:element name="img"> <xsl:attribute name="src">/opac-tmpl/<xsl:value-of select="$theme"/>/images/filefind.png</xsl:attribute> <xsl:attribute name="style">vertical-align:middle</xsl:attribute> <xsl:attribute name="height">15</xsl:attribute> <xsl:attribute name="width">15</xsl:attribute> </xsl:element> With your patch i got "http://.../opac-tmpl/%24theme/images/filefind.png"
Created attachment 30737 [details] [review] 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.
(In reply to Bernardo Gonzalez Kriegel from comment #2) > This works for you? Not for me :( It really did! But it must have been a quirk of that machine's setup. Thanks for testing. I have implemented your suggestions.
Created attachment 30868 [details] [review] 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. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
I am not sure about this change, as we recently agreed to keep the fallback functionality - so if you don't have a file in your selected theme, it should fall back to a main theme for the templates. I think it might be harder to do here and the patch is an improvement - hardcoding prog is not exactly a fallback right now :) So I am going to test.
Created attachment 30872 [details] Doubled up magnifying glass With the patch applied, I have 2 magnifying glasses show up for the record. On the master branch only one shows up. The second one is not linked. MARC21: 650 7 _0(DE-588c)4127914-1 _0(DE-576)209597631 _2swd _aChronik _989 HTML: <span class="label">Subject(s): </span> <span property="keywords"> <a href="/cgi-bin/koha/opac-search.pl?q=an:89">Chronik</a> </span> <a class="authlink" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=89"><img src="/opac-tmpl/bootstrap/images/filefind.png" style="vertical-align:middle" height="15" width="15"></a> </span><img src="/opac-tmpl/bootstrap/images/filefind.png" style="vertical-align:middle" height="15" width="15">
Created attachment 31024 [details] [review] 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.
Hi, have an idea and a problem with this 1) Idea: build this on top of Bug 12539, in that a syspref OPACFallback is introduced. Using that instead of 'opacthemes' could make this patch valid using 'ccsr', also provides the fallback mentioned in Commet #6 2) Problem: MARC21 details, second replacemente of filefind (around line ~1050) on showAuthor template can't show $theme value, I need to pass it as parameter, don't know if it's a problem of mine, but opac complains.
Created attachment 31687 [details] [review] 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 <brendan@bywatersolutions.com>
Pushed to MM-OPAC/theme_dep
Patch merged into master. Thanks Owen!