From 813f4ae9d1a5ce181c719406eca0d4b1574d2549 Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Thu, 19 Jun 2008 21:08:16 -0500 Subject: [PATCH] kohabug 1873 Fixes shelves.pl so that the date is displayed in the 'date added' column of the virtual shelf contents Signed-off-by: Joshua Ferraro --- C4/VirtualShelves.pm | 4 ++-- C4/VirtualShelves/Page.pm | 2 ++ .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 85a511f85c..c4a5754039 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -217,12 +217,12 @@ sub GetShelfContents { my ( $shelfnumber ,$sortfield) = @_; my $dbh=C4::Context->dbh(); if(!$sortfield) { - my $sthsort = $dbh->prepare('select sortfield from virtualshelves where shelfnumber=?'); + my $sthsort = $dbh->prepare('SELECT sortfield FROM virtualshelves WHERE shelfnumber=?'); $sthsort->execute($shelfnumber); ($sortfield) = $sthsort->fetchrow_array; } my $query = - " SELECT vc.biblionumber, vc.shelfnumber, + " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, biblio.*, biblioitems.itemtype, itemtypes.* FROM virtualshelfcontents vc LEFT JOIN biblio ON vc.biblionumber = biblio.biblionumber diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 0789a698fe..37ff28abbe 100755 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -30,6 +30,7 @@ use C4::Koha; use C4::Auth qw/get_session/; use C4::Members; use C4::Output; +use C4::Date qw/format_date/; use Exporter; use vars qw($debug @EXPORT @ISA $VERSION); @@ -149,6 +150,7 @@ SWITCH: { for my $this_item (@$items) { $this_item->{imageurl} = $imgdir."/".$itemtypes->{ $this_item->{itemtype} }->{'imageurl'}; $this_item->{'description'} = $itemtypes->{ $this_item->{itemtype} }->{'description'}; + $this_item->{'dateadded'} = format_date($this_item->{'dateadded'}); } $showadd = 1; my $i = 0; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl index f969868662..6fa5541e81 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl @@ -154,7 +154,7 @@ $(document).ready(function(){ - + ">Holds -- 2.39.5