Bug 12494

Summary: Remove yuipath system preference
Product: Koha Reporter: Owen Leonard <oleonard>
Component: System AdministrationAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, jonathan.druart, katrin.fischer, sandboxes, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 12233    
Bug Blocks: 11346    
Attachments: Bug 12494 - Remove yuipath system preference
Bug 12494 - Remove yuipath system preference
[PASSED QA] Bug 12494 - Remove yuipath system preference

Description Owen Leonard 2014-06-27 12:57:45 UTC
In future versions of Koha the OPAC prog template and its YUI dependencies will not exist. This leaves only the basketgroups page in the staff client which uses any YUI assets. For the sake of simplicity I think the yuipath preference should be removed and the path to local YUI assets be hard-coded in the basketgroups template.
Comment 1 Owen Leonard 2014-06-27 14:33:03 UTC Comment hidden (obsolete)
Comment 2 Biblibre Sandboxes 2014-07-01 05:41:40 UTC
Patch tested with a sandbox, by Aleisha <aleishaamohia@hotmail.com>
Comment 3 Biblibre Sandboxes 2014-07-01 05:41:58 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2014-07-06 16:57:38 UTC
Created attachment 29514 [details] [review]
[PASSED QA] Bug 12494 - Remove yuipath system preference

With the OPAC prog template going away, the only remaining use of the
yuipath preference is on the basketgroups template. The yuipath
preference should be removed and the local path hard-coded.

This patch:
  - removes yuipath handling from C4/Templates.pm
  - removes the preference from sysprefs.sql
  - deletes the preference via updatedatabase.pl
  - removes the preference from the staff client preferences file
  - removes unused references to the YUI assets from the help file
    header include
  - adds the local YUI asset path to acqui/basketgroup.tt

To test, apply the patch and run the database update. View some online
help pages and confirm that they function correctly. View the
basketgroups page (Acquisition -> Vendor -> Basket groups), edit a
basket group, and confirm that basket drag and drop operations work
correctly.

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Online help and basket group drag&drop functionality still work correctly.
Comment 5 Jonathan Druart 2014-07-07 07:24:11 UTC
In my opinion, this patch should not be pushed before bug 12233. It will break ccsr and prog themes.
Comment 6 Katrin Fischer 2014-07-07 19:15:27 UTC
Oh, what did I miss? I had tested a few pages in staff, are we still using yui in OPAC?
Comment 7 Jonathan Druart 2014-07-08 06:58:59 UTC
git grep yuipath returns:

koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc:<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc:<script type="text/javascript" src="[% yuipath %]/container/container-min.js"></script>
koha-tmpl/opac-tmpl/ccsr/en/includes/doc-head-close.inc:<script type="text/javascript" src="[% yuipath %]/menu/menu-min.js"></script>
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc:<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script> 
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc:<script type="text/javascript" src="[% yuipath %]/container/container-min.js"></script> 
koha-tmpl/opac-tmpl/prog/en/includes/doc-head-close.inc:<script type="text/javascript" src="[% yuipath %]/menu/menu-min.js"></script> 
koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt:<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt:<script type="text/javascript" src="[% yuipath %]/container/container-min.js"></script>
koha-tmpl/opac-tmpl/prog/en/modules/sco/sco-main.tt:<script type="text/javascript" src="[% yuipath %]/menu/menu-min.js"></script>
Comment 8 Katrin Fischer 2014-07-08 07:00:52 UTC
I need to get better with grep - thx for catching this!
Comment 9 Owen Leonard 2014-07-08 12:59:01 UTC
This patch doesn't touch the prog and ccsr templates because it is dependent on their removal.
Comment 10 Tomás Cohen Arazi 2014-10-30 01:09:23 UTC
Patch pushed to master.

Thanks Owen!