[Bug 12655] New: PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path in XSLT
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Bug ID: 12655 Summary: PROG/CCSR deprecation: Correct hard-coded opac-tmpl/prog path in XSLT Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org Several OPAC XSL files in the bootstrap template contain hard-coded paths to the prog theme. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 30041 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30041&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |bgkriegel@gmail.com --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- 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" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30041|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 30737 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30737&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- (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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30737|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 30868 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30868&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30872 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30872&action=edit 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"> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30868|0 |1 is obsolete| | --- Comment #8 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 31024 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31024&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 --- Comment #9 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- 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. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #31024|0 |1 is obsolete| | --- Comment #10 from Brendan Gallagher <brendan@bywatersolutions.com> --- Created attachment 31687 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=31687&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed by Module Maintainer --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to MM-OPAC/theme_dep -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed by Module Maintainer |Pushed to Master CC| |tomascohen@gmail.com Blocks| |11346 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch merged into master. Thanks Owen! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12655 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org