From 9f7f61be4a3bc9f174c7001c32eac9a91c3ee571 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Wed, 29 Sep 2010 21:13:14 +1300 Subject: [PATCH] Fix Bug 5261 broken link in Local Use sysprefs This patch eliminates the sysprefs-menu.inc include file and changes the systempreferences.pl and systempreferences.tmpl files to work with the prefs-menu.inc instead. This will centralize the syspref tabs and make it easier to modify tabs in the future if necessary. This commit also changes the default tab to Acquisitions, since the Local Use tab does not work with preferences.pl at present. Signed-off-by: Chris Cormack Signed-off-by: Galen Charlton --- admin/preferences.pl | 3 ++- admin/systempreferences.pl | 2 +- .../prog/en/includes/sysprefs-menu.inc | 20 ------------------- .../en/modules/admin/systempreferences.tmpl | 2 +- 4 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc diff --git a/admin/preferences.pl b/admin/preferences.pl index b5bcde8131..7fcf5fc647 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -266,7 +266,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( $lang = $template->param( 'lang' ); my $op = $input->param( 'op' ) || ''; my $tab = $input->param( 'tab' ); -$tab ||= 'local-use'; +$tab ||= 'acquisitions'; # Ideally this should be "local-use" but preferences.pl + # does not presently support local use preferences my $highlighted; diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 824b0582e5..411f434c45 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -801,7 +801,7 @@ if ( $op eq 'add_form' ) { $row_data->{delete} = "$script_name?op=delete_confirm&searchfield=" . $results->[$i]{'variable'}; push( @loop_data, $row_data ); } - $tab = ( $tab ? $tab : "Local Use" ); + $tab = ( $tab ? $tab : "local-use" ); $template->param( loop => \@loop_data, $tab => 1 ); if ( $offset > 0 ) { my $prevpage = $offset - $pagesize; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc deleted file mode 100644 index 3b2fea47b3..0000000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl index 8d54fe03df..de9a592733 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/systempreferences.tmpl @@ -347,7 +347,7 @@
- +
-- 2.39.5