# explicitly fetch this shelf
my ($shelfnumber2,$shelfname,$owner,$category,$sorton) = GetShelf($shelfnumber);
- $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') );
+ $template->param(
+ 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds'),
+ 'DisplayMultiPlaceHold' => C4::Context->preference('DisplayMultiPlaceHold'),
+ );
if (C4::Context->preference('TagsEnabled')) {
$template->param(TagsEnabled => 1);
foreach (qw(TagsShowOnList TagsInputOnList)) {
my $tag_quantity;
my $sortfield = ( $sorton ? $sorton : 'title' );
$sortfield = $query->param('sort') || $sortfield; ## Passed in sorting overrides default sorting
- my $direction = $query->param('direction');
+ my $direction = $query->param('direction') || 'asc';
+ $template->param(
+ sort => $sortfield,
+ direction => $direction,
+ );
( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield, $direction );
for my $this_item (@$items) {
my $biblionumber = $this_item->{'biblionumber'};
my $record = GetMarcBiblio($biblionumber);
- $this_item->{XSLTBloc} =
- XSLTParse4Display($biblionumber, $record, "OPACXSLTResultsDisplay")
- if C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac';
+ if (C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac') {
+ $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "OPACXSLTResultsDisplay");
+ } elsif (C4::Context->preference("XSLTResultsDisplay") && $type eq 'intranet') {
+ $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "XSLTResultsDisplay");
+ }
# the virtualshelfcontents table does not store these columns nor are they retrieved from the items
# and itemtypes tables, so I'm commenting them out for now to quiet the log -crn
$this_item->{'normalized_ean'} = GetNormalizedEAN( $record,$marcflavour);
$this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber($record,$marcflavour);
$this_item->{'normalized_isbn'} = GetNormalizedISBN(undef,$record,$marcflavour);
+ if(!defined($this_item->{'size'})) { $this_item->{'size'} = "" }; #TT has problems with size
# Getting items infos for location display
my @items_infos = &GetItemsLocationInfo( $this_item->{'biblionumber'});
$this_item->{'itemsissued'} = CountItemsIssued( $this_item->{'biblionumber'} );
}
}
+ if($type eq 'intranet'){
+ # Build drop-down list for 'Add To:' menu...
+ my ($totalref, $pubshelves, $barshelves)=
+ C4::VirtualShelves::GetSomeShelfNames($loggedinuser,'COMBO',1);
+ $template->param(
+ addbarshelves => $totalref->{bartotal},
+ addbarshelvesloop => $barshelves,
+ addpubshelves => $totalref->{pubtotal},
+ addpubshelvesloop => $pubshelves,
+ );
+ }
push @paramsloop, { display => 'privateshelves' } if $category == 1;
$showadd = 1;
my $i = 0;
shelvesloopall => [ ( @shelvesloop, @shelveslooppriv ) ],
numberCanManage => $numberCanManage,
"BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1,
- csv_profiles => GetCsvProfilesLoop()
+ csv_profiles => GetCsvProfilesLoop('marc')
);
if ( $shelfnumber
or $shelves
barshelvesloop => $barshelves,
pubshelves => $total->{pubtotal},
pubshelvesloop => $pubshelves,
- sort => $query->param('sort'),
- direction => $query->param('direction'),
);
output_html_with_http_headers $query, $cookie, $template->output;