From 468a0e4f29a69a95417ee6e7cf54a250b8d0abc3 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 Signed-off-by: Katrin Fischer Passes all tests and QA script. Online help and basket group drag&drop functionality still work correctly. Signed-off-by: Tomas Cohen Arazi --- C4/Templates.pm | 17 +++++++++++++---- installer/data/mysql/sysprefs.sql | 1 - installer/data/mysql/updatedatabase.pl | 7 +++++++ koha-tmpl/intranet-tmpl/prog/en/includes/help-top.inc | 7 +------ .../intranet-tmpl/prog/en/modules/acqui/basketgroup.tt | 16 ++++++++-------- .../prog/en/modules/admin/preferences/staff_client.pref | 6 ------ 6 files changed, 29 insertions(+), 25 deletions(-) diff --git a/C4/Templates.pm b/C4/Templates.pm index 879249a386..7d09a58147 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; @@ -216,6 +212,19 @@ sub gettemplate { $filename = $tmplbase if ( $is_plugin ); my $template = C4::Templates->new($interface, $filename, $tmplbase, $query); +# NOTE: Commenting these out rather than deleting them so that those who need +# to know how we previously shimmed these directories will be able to understand. +# my $is_intranet = $interface eq 'intranet'; +# my $themelang = +# ($is_intranet ? '/intranet-tmpl' : '/opac-tmpl') . +# "/$theme/$lang"; +# $template->param( +# themelang => $themelang, +# interface => $is_intranet ? '/intranet-tmpl' : '/opac-tmpl', +# theme => $theme, +# lang => $lang +# ); + # Bidirectionality, must be sent even if is the only language my $current_lang = regex_lang_subtags($lang); my $bidi; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index b4835840d5..efd12fd76d 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -451,7 +451,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 daca3d5fb3..057943ffcc 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8935,6 +8935,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 5dcbe27957..ef87e1e604 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 32cefa72d1..13b1dcd271 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 ) %] - - - - + + + +