From 66bc18aa05becb3f5d80953ff3b85e12c1351e19 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 27 Jun 2014 09:11:21 -0400 Subject: [PATCH] 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 --- C4/Templates.pm | 7 ------- installer/data/mysql/sysprefs.sql | 1 - installer/data/mysql/updatedatabase.pl | 7 +++++++ .../intranet-tmpl/prog/en/includes/help-top.inc | 7 +------ .../prog/en/modules/acqui/basketgroup.tt | 16 ++++++++-------- .../en/modules/admin/preferences/staff_client.pref | 6 ------ 6 files changed, 16 insertions(+), 28 deletions(-) diff --git a/C4/Templates.pm b/C4/Templates.pm index 8d13a49..29b8cb4 100644 --- a/C4/Templates.pm +++ b/C4/Templates.pm @@ -100,10 +100,6 @@ sub output { } $vars->{lang} = $self->lang; $vars->{themelang} .= '/' . $self->preferredtheme . '/' . $self->lang; - $vars->{yuipath} = - ( C4::Context->preference("yuipath") eq "local" - ? ( $self->interface eq 'intranet' ? $vars->{themelang} . "/lib/yui" : "/opac-tmpl/lib/yui" ) - : C4::Context->preference("yuipath") ); $vars->{interface} = ( $self->{interface} ne 'intranet' ? '/opac-tmpl' : '/intranet-tmpl' ); $vars->{theme} = $self->theme; @@ -245,9 +241,6 @@ sub gettemplate { # "/$theme/$lang"; # $template->param( # themelang => $themelang, -# yuipath => C4::Context->preference("yuipath") eq "local" -# ? "$themelang/lib/yui" -# : C4::Context->preference("yuipath"), # interface => $is_intranet ? '/intranet-tmpl' : '/opac-tmpl', # theme => $theme, # lang => $lang diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 5e4ce7c..4ff1928 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -442,7 +442,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('XISBNDailyLimit','999','','The xISBN Web service is free for non-commercial use when usage does not exceed 1000 requests per day','Integer'), ('XSLTDetailsDisplay','default','','Enable XSL stylesheet control over details page display on intranet','Free'), ('XSLTResultsDisplay','default','','Enable XSL stylesheet control over results page display on intranet','Free'), -('yuipath','local','local|http://yui.yahooapis.com/2.5.1/build','Insert the path to YUI libraries, choose local if you use koha offline','Choice'), ('z3950AuthorAuthFields','701,702,700',NULL,'Define the MARC biblio fields for Personal Name Authorities to fill biblio.author','free'), ('z3950NormalizeAuthor','0','','If ON, Personal Name Authorities will replace authors in biblio.author','YesNo') ; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c68ba51..ef9fd79 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8560,6 +8560,13 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("DELETE FROM systempreferences WHERE variable='yuipath'"); + print "Upgrade to $DBversion done ( Bug 12494 - Remove yuipath system preference )\n"; + SetVersion ($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc index 5dcbe27..ef87e1e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc @@ -1,5 +1,5 @@ [% INCLUDE 'doc-head-open.inc' %] -Online Help +Online help @@ -11,11 +11,6 @@ - - - - - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index 8f5e1a2..703a063 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -4,16 +4,16 @@ [% INCLUDE 'doc-head-close.inc' %] [% INCLUDE 'datatables.inc' %] - - - - + + + + [% IF ( grouping ) %] - - - - + + + +