kohabug 1873 Fixes shelves.pl so that the date is displayed in the 'date added' colum...
authorChris Nighswonger <chris.nighswonger@liblime.com>
Fri, 20 Jun 2008 02:08:16 +0000 (21:08 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 20 Jun 2008 17:48:01 +0000 (12:48 -0500)
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/VirtualShelves.pm
C4/VirtualShelves/Page.pm
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl

index 85a511f..c4a5754 100644 (file)
@@ -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
index 0789a69..37ff28a 100755 (executable)
@@ -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;
index f969868..6fa5541 100644 (file)
@@ -154,7 +154,7 @@ $(document).ready(function(){
                        <!-- TMPL_VAR NAME="title" --> <!-- TMPL_VAR NAME="subtitle" --></a>
                        </td>
                        <td><!-- TMPL_VAR NAME="author" --></td>
-                       <td><!-- TMPL_VAR NAME="classification" --></td>
+                       <td><!-- TMPL_VAR NAME="dateadded" --></td>
                        <td>
                        <!-- TMPL_UNLESS name="notforloan" -->
                        <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Holds</a>