MT 1801 : Opac shelves and basket are displayed the same way
[koha_ffzg] / C4 / VirtualShelves / Page.pm
index 9e618c5..658b9ac 100644 (file)
@@ -33,6 +33,7 @@ use C4::Output;
 use C4::Dates qw/format_date/;
 use Exporter;
 use Data::Dumper;
+use C4::Csv;
 
 use vars qw($debug @EXPORT @ISA $VERSION);
 
@@ -181,6 +182,7 @@ SWITCH: {
                        }
                        ($items, $totitems) = GetShelfContents($shelfnumber, $shelflimit, $shelfoffset);
                        for my $this_item (@$items) {
+                               my $record = GetMarcBiblio($this_item->{'biblionumber'});
                                # 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->{imageurl} = $imgdir."/".$itemtypes->{ $this_item->{itemtype}  }->{'imageurl'};
@@ -188,6 +190,12 @@ SWITCH: {
                                $this_item->{'dateadded'} = format_date($this_item->{'dateadded'});
                 $this_item->{'imageurl'} = getitemtypeinfo($this_item->{'itemtype'})->{'imageurl'};
                 $this_item->{'coins'} = GetCOinSBiblio($this_item->{'biblionumber'});
+                               $this_item->{'subtitle'} = C4::Biblio::get_koha_field_from_marc('bibliosubtitle', 'subtitle', $record, '');
+                               
+                               # Getting items infos for location display
+                               my @items_infos = &GetItemsInfo($this_item->{'biblionumber'}, $type);
+                               $this_item->{'ITEM_RESULTS'} = \@items_infos;
+
                        }
                        push @paramsloop, {display => 'privateshelves'} if $category == 1;
                        $showadd = 1;
@@ -317,6 +325,7 @@ $template->param(
     shelvesloopall  => [(@shelvesloop, @shelveslooppriv)],
     numberCanManage => $numberCanManage,
        "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1,
+    csv_profiles => GetCsvProfilesLoop()
 );
 if ($template->param('viewshelf') or
        $template->param( 'shelves' ) or