From: Garry Collum Date: Sat, 20 Jun 2009 02:42:46 +0000 (-0400) Subject: Bug 3347: Inconsistencies with public and private list tables in opac-shelves.tmpl. X-Git-Tag: n_acq_a_porter~26^2~5 X-Git-Url: http://git.rot13.org/?p=koha.git;a=commitdiff_plain;h=1a8aac38b60ee3d2c8f24e2829fe67ad4ae3d3f9 Bug 3347: Inconsistencies with public and private list tables in opac-shelves.tmpl. This patch fixes inconsistencies with the public and private list tables in opac-shelves.tmpl. It adds a "new list" link to the public list view, and it adds a "sort by" column. This patch also removes the toggle variables from the tables in opac-shelves.tmpl and Page.pm, and uses the template __odd__ variable for table highlighting if javascript is turned off. Signed-off-by: Galen Charlton --- diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index ac472194f2..99d1f5d4d2 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -183,9 +183,6 @@ SWITCH: { push @paramsloop, {display => 'privateshelves'} if $category == 1; $showadd = 1; my $i = 0; - foreach (grep {$i++ % 2} @$items) { # every other item - $_->{toggle} = 1; - } my $manageshelf = ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ); $template->param( shelfname => $shelflist->{$shelfnumber}->{'shelfname'} || $privshelflist->{$shelfnumber}->{'shelfname'}, @@ -286,10 +283,8 @@ foreach my $element (sort { lc($shelflist->{$a}->{'shelfname'}) cmp lc($shelflis $shelflist->{$element}->{ownername} = defined($member) ? $member->{firstname} . " " . $member->{surname} : ''; $numberCanManage++ if $canmanage; # possibly outmoded if ($shelflist->{$element}->{'category'} eq '1') { - (scalar(@shelveslooppriv) % 2) and $shelflist->{$element}->{toggle} = 1; push (@shelveslooppriv, $shelflist->{$element}); } else { - (scalar(@shelvesloop) % 2) and $shelflist->{$element}->{toggle} = 1; push (@shelvesloop, $shelflist->{$element}); } } diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index aa8ac4c774..643b47888d 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -210,11 +210,11 @@ $(document).ready(function(){ - + - + " value=" - + - + "> item(s) @@ -386,23 +386,25 @@ $(document).ready(function(){