use C4::Languages qw(getAllLanguages);
use C4::Koha;
use C4::Members qw(GetMember);
-use C4::VirtualShelves qw(GetRecentShelves);
+use C4::VirtualShelves;
use POSIX qw(ceil floor);
use C4::Branch; # GetBranches
ccl => "$itype_or_itemtype,phr",
code => $thisitemtype,
description => $itemtypes->{$thisitemtype}->{'description'},
- imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ),
+ imageurl=> getitemtypeimagelocation( 'intranet', $itemtypes->{$thisitemtype}->{'imageurl'} ),
);
push @itypesloop, \%row;
}
push @advancedsearchesloop, \%search_code;
} else {
# covers all the other cases: non-itemtype authorized values
- my $advsearchtypes = GetAuthorisedValues($advanced_srch_type, '', 'opac');
+ my $advsearchtypes = GetAuthorisedValues($advanced_srch_type);
my @authvalueloop;
for my $thisitemtype (@$advsearchtypes) {
my %row =(
# VI. BUILD THE TEMPLATE
# Build drop-down list for 'Add To:' menu...
-
-my $row_count = 10; # FIXME:This probably should be a syspref
-my ($pubshelves, $total) = GetRecentShelves(2, $row_count, undef);
-my ($barshelves, $total) = GetRecentShelves(1, $row_count, $borrowernumber);
-
-if (@{$pubshelves}) {
- $template->param( addpubshelves => scalar @{$pubshelves});
- $template->param( addpubshelvesloop => $pubshelves);
-}
-
-if (@{$barshelves}) {
- $template->param( addbarshelves => scalar @{$barshelves});
- $template->param( addbarshelvesloop => $barshelves);
-}
-
-
+my ($totalref, $pubshelves, $barshelves)=
+ C4::VirtualShelves::GetSomeShelfNames($borrowernumber,'COMBO',1);
+$template->param(
+ addbarshelves => $totalref->{bartotal},
+ addbarshelvesloop => $barshelves,
+ addpubshelves => $totalref->{pubtotal},
+ addpubshelvesloop => $pubshelves,
+ );
output_html_with_http_headers $cgi, $cookie, $template->output;