Bug 3317: Adds author and added-author to email sent from basket (Cart).
authorGarry Collum <gcollum@gmail.com>
Sat, 27 Jun 2009 17:48:18 +0000 (13:48 -0400)
committerHenri-Damien LAURENT <henridamien.laurent@biblibre.com>
Wed, 16 Sep 2009 21:19:18 +0000 (23:19 +0200)
Adds the author and added author fields to the email that is sent from the shopping cart.  This makes the data sent via email consistent with the data that is viewed in the basket.

There is still a problem with author authority records other than 100 tags appearing correctly in the shopping cart.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Henri-Damien LAURENT <henridamien.laurent@biblibre.com>
koha-tmpl/opac-tmpl/prog/en/modules/opac-sendbasket.tmpl
opac/opac-sendbasket.pl

index b55760a..033c4d2 100644 (file)
@@ -17,9 +17,8 @@ Reference Manager or ProCite.
 <!-- TMPL_IF NAME="comment" -->
 <!-- TMPL_VAR NAME="comment" -->
 <!-- /TMPL_IF -->
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --><!-- TMPL_IF name="subtitle" --> <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --><!-- TMPL_IF name="MARCAUTHORS" -->
-Author(s): <!-- TMPL_LOOP NAME="MARCAUTHORS" --><!-- TMPL_LOOP NAME="MARCAUTHOR_SUBFIELDS_LOOP" --><!-- TMPL_VAR NAME="separator" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_LOOP --><!-- TMPL_UNLESS NAME="__last__" -->; <!-- TMPL_ELSE -->
-<!-- /TMPL_UNLESS --><!-- /TMPL_LOOP --><!-- /TMPL_IF --><!-- TMPL_IF name="ISBN" -->
+<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" --><!-- TMPL_VAR NAME="title" --><!-- TMPL_IF name="subtitle" --> <!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --><!-- TMPL_IF "HASAUTHORS" -->
+Author(s): <!-- TMPL_IF NAME="author" --><!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF --><!-- TMPL_IF name="MARCAUTHORS" --><!-- TMPL_IF NAME="author" -->; <!-- /TMPL_IF --><!-- TMPL_LOOP NAME="MARCAUTHORS" --><!-- TMPL_LOOP NAME="MARCAUTHOR_SUBFIELDS_LOOP" --><!-- TMPL_VAR NAME="separator" --><!-- TMPL_VAR NAME="value" --><!-- /TMPL_LOOP --><!-- TMPL_UNLESS NAME="__last__" -->; <!-- TMPL_ELSE --><!-- /TMPL_UNLESS --><!-- /TMPL_LOOP --><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- TMPL_IF name="ISBN" -->
 ISBN: <!-- TMPL_VAR NAME="ISBN" --><!-- /TMPL_IF -->
 <!-- TMPL_IF name="publishercode" -->Published by: <!-- TMPL_VAR NAME="publishercode" --><!-- /TMPL_IF --><!-- TMPL_IF name="publicationyear" --> in <!-- /TMPL_IF --><!-- TMPL_VAR NAME="publicationyear" --><!-- TMPL_IF name="pages" -->, <!-- /TMPL_IF --><!-- TMPL_VAR name="pages" --><!-- TMPL_IF name="size" -->, <!-- /TMPL_IF --><!-- TMPL_VAR name="size" --><!-- TMPL_IF name="collection" -->
 Collection: <!-- TMPL_VAR NAME="seriestitle" --><!-- /TMPL_IF --><!-- TMPL_IF name="subject" -->
index f17bb71..f06230c 100755 (executable)
@@ -80,9 +80,16 @@ if ( $email_add ) {
 
         my @items = &GetItemsInfo( $biblionumber, 'opac' );
 
+        my $hasauthors = 0;
+        if($dat->{'author'} || @$marcauthorsarray) {
+          $hasauthors = 1;
+        }
+       
+
         $dat->{MARCNOTES}      = $marcnotesarray;
         $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
         $dat->{MARCAUTHORS}    = $marcauthorsarray;
+        $dat->{HASAUTHORS}     = $hasauthors;
         $dat->{'biblionumber'} = $biblionumber;
         $dat->{ITEM_RESULTS}   = \@items;