From f1762530d1d8f2cc49738fabf53e512e633b4079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Delaune?= Date: Tue, 31 Aug 2010 15:11:23 +0200 Subject: [PATCH] (MT #1654) followup : Adding jquery.tablesorter and jquery.tablesorter.pager support for marctagstructure.pl --- admin/marctagstructure.pl | 6 +-- .../en/modules/admin/marctagstructure.tmpl | 39 ++++++++++++++----- 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 07b0a3066a..a20f77c132 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -255,7 +255,7 @@ if ($op eq 'add_form') { my @loop_data = (); my $j=1; my $i=$offset; - while ($i < ($offset+$pagesize<$cnt?$offset+$pagesize:$cnt)) { + while ( $i < $cnt ) { my %row_data; # get a fresh hash for the row data $row_data{tagfield} = $results[$i]->{'mts_tagfield'}; $row_data{liblibrarian} = $results[$i]->{'mts_liblibrarian'}; @@ -267,7 +267,7 @@ if ($op eq 'add_form') { $row_data{delete} = "$script_name?op=delete_confirm&searchfield=" .$results[$i]->{'mts_tagfield'}."&frameworkcode=".$frameworkcode; $j=$i; my @internal_loop = (); - while (($results[$i]->{'tagfield'}==$results[$j]->{'tagfield'}) and ($j< ($offset+$pagesize<$cnt?$offset+$pagesize:$cnt))) { + while ( ( $results[$i]->{'tagfield'} == $results[$j]->{'tagfield'} ) and ( $j < $cnt ) ) { my %subfield_data; $subfield_data{tagsubfield} = $results[$j]->{'tagsubfield'}; $subfield_data{liblibrarian} = $results[$j]->{'liblibrarian'}; @@ -294,7 +294,7 @@ if ($op eq 'add_form') { my ($count,$results)=StringSearch($searchfield,$frameworkcode); $cnt = $count; my @loop_data = (); - for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){ + for ( my $i = $offset ; $i < $count ; $i++ ) { my %row_data; # get a fresh hash for the row data $row_data{tagfield} = $results->[$i]{'tagfield'}; $row_data{liblibrarian} = $results->[$i]{'liblibrarian'}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl index 34153ef4b3..eb912d6169 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl @@ -5,6 +5,14 @@ MARC Frameworks › Data Deleted MARC Frameworks + + +