From 6281ed6b914ab44da573e34323b677d0b4f07f67 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Thu, 3 Dec 2009 11:58:44 +0100 Subject: [PATCH] MT 1801 : Opac shelves and basket are displayed the same way This patch also fixes broken location display in both shelves and basket. --- C4/VirtualShelves/Page.pm | 5 +++ .../prog/en/modules/opac-basket.tmpl | 39 +++++++++---------- .../prog/en/modules/opac-shelves.tmpl | 11 ++++++ opac/opac-basket.pl | 7 ---- 4 files changed, 35 insertions(+), 27 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 72937bd6e9..658b9acc50 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -191,6 +191,11 @@ SWITCH: { $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; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl index 09a8c0fc71..f1b1a395ec 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl @@ -295,7 +295,7 @@ function tagAdded() { Location(s)

- + , () @@ -333,7 +333,8 @@ function tagAdded() {   Title - Item Type + Author + Year Location @@ -347,27 +348,25 @@ function tagAdded() { " name="bib" id="bib" onclick="selRecord(value,checked);" /> - ',)"> + + ',)"> - - -

- - - - - -

- -

- - - &rft.btitle=&rft.date=&rft.tpages=&rft.isbn=&rft.aucorp=&rft.place=&rft.pub=&rft.edition=&rft.series=&rft.genre="> -
_status" class="tagstatus results_summary" style="display:none">Tag status here.
- - - + + + &rft.btitle=&rft.date=&rft.tpages=&rft.isbn=&rft.aucorp=&rft.place=&rft.pub=&rft.edition=&rft.series=&rft.genre="> +
_status" class="tagstatus results_summary" style="display:none">Tag status here.
+ + + + + + + + +

- + , () 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 c35655359d..f99f7b2077 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -247,6 +247,7 @@ $(function() { Title Author Year + Location @@ -278,6 +279,16 @@ $(function() { + + +

+ , + + () + +

+ This record has no items. + diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl index c044fee493..e0962bca42 100755 --- a/opac/opac-basket.pl +++ b/opac/opac-basket.pl @@ -73,15 +73,8 @@ foreach my $biblionumber ( @bibs ) { if($dat->{'author'} || @$marcauthorsarray) { $hasauthors = 1; } - - my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac'); my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac'); - for my $itm (@items) { - if ($itm->{'location'}){ - $itm->{'location_description'} = $shelflocations->{$itm->{'location'} }; - } - } # COinS format FIXME: for books Only my $coins_format; my $fmt = substr $record->leader(), 6,2; -- 2.39.5