Summary: | Koha themes broken | ||
---|---|---|---|
Product: | Koha | Reporter: | Jared Camins-Esakov <jcamins> |
Component: | Templates | Assignee: | Jared Camins-Esakov <jcamins> |
Status: | CLOSED FIXED | QA Contact: | Mason James <mtj> |
Severity: | major | ||
Priority: | P3 | CC: | chris, kyle, mtj, paul.poulain |
Version: | 3.10 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 8623 | ||
Bug Blocks: | 8597 | ||
Attachments: |
Bug 8622: Fix theme fallback
Bug 8622: Fix theme fallback Bug 8622: Fix theme fallback |
Description
Jared Camins-Esakov
2012-08-12 23:55:24 UTC
Created attachment 11563 [details] [review] Bug 8622: Fix theme fallback This patch does the following: 1) Enables fallback for includes between different themes and different languages (with the exact same precedence as for .tt files) 2) Enable fallback for XSLT files between different themes and different languages (again, same precedence) 3) Change the semantics of the TT [% themelang %] variable so that it always refers to the preferred theme and language, rather than the fallback theme/language. As a result, all themes must include all javascript, css and image resources they use. Note that these changes actually have no impact whatsoever on an installation where the default (prog) themes are in use. To test: 1) Ensure that images, CSS, and Javascript load normally with the prog theme. 2) View an XSLT-generated block in English and another language, and ensure that the XSLT is rendered in both. 3) [optional] Either create a new theme or add the theme created by bug 8597, switch to the new theme, and ensure that images, CSS and Javascript load normally. 4) [optional] In this other theme, view an XSLT-generated block in English and another language, and ensure that they render. If there are any problems with this patch, it will be readily apparent because most assets will not load. Created attachment 11580 [details] [review] Bug 8622: Fix theme fallback This patch does the following: 1) Enables fallback for includes between different themes and different languages (with the exact same precedence as for .tt files) 2) Enable fallback for XSLT files between different themes and different languages (again, same precedence) 3) Change the semantics of the TT [% themelang %] variable so that it always refers to the preferred theme and language, rather than the fallback theme/language. As a result, all themes must include all javascript, css and image resources they use. Note that these changes actually have no impact whatsoever on an installation where the default (prog) themes are in use. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> SO'd. Leaving as "Needs Signoff" for more testing. Tested cases 1 & 2. (In reply to comment #4) > SO'd. Leaving as "Needs Signoff" for more testing. Tested cases 1 & 2. i'll add a 2nd sign-off for cases 3 and 4. they work OK too :) Created attachment 11701 [details] [review] Bug 8622: Fix theme fallback This patch does the following: 1) Enables fallback for includes between different themes and different languages (with the exact same precedence as for .tt files) 2) Enable fallback for XSLT files between different themes and different languages (again, same precedence) 3) Change the semantics of the TT [% themelang %] variable so that it always refers to the preferred theme and language, rather than the fallback theme/language. As a result, all themes must include all javascript, css and image resources they use. Note that these changes actually have no impact whatsoever on an installation where the default (prog) themes are in use. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Mason James <mtj@kohaaloha.com> All cases have now been tested, switching to signed off. (In reply to comment #7) > All cases have now been tested, switching to signed off. passing QA on this patch $ koha-qa.pl -c 1 testing 1 commit(s) (applied to commit ba98cb9) * 4b071b1 Bug 8622: Fix theme fallback C4/Output.pm C4/Reports/Guided.pm C4/Templates.pm C4/XSLT.pm catalogue/moredetail.pl edithelp.pl opac/opac-main.pl * C4/Output.pm OK * C4/Reports/Guided.pm OK * C4/Templates.pm OK * C4/XSLT.pm OK * catalogue/moredetail.pl OK * edithelp.pl OK * opac/opac-main.pl OK Patch pushed to master Could not see any difference between before and after the patch, which what we expect when we use prog theme (what most libraries does) Theme fallback is now working on master. |