[Koha-patches] [PATCH] 3.0.x Back-port: 4074 Bugfix: The 'Subject(s)' link(s) are malformed resulting in no search results

Chris Nighswonger cnighswonger at foundations.edu
Thu Jan 28 16:55:25 CET 2010


NOTE: This patch ONLY applies to the current 3.0.x branch.

These links are rendered with the wrong syntax. ie. 'q=su:foo' This results in
a search for 'su:foo' rather than a search for 'foo' with an index of 'su.'
This patch corrects the code so that the syntax conforms to current parsing
methods. ie. 'idx=su&q=foo'

NOTE: The change to the underlying C4::Biblio->GetMarcSubjects() does not need
to be ported to any other calling code.

Signed-off-by: Chris Nighswonger <cnighswonger at foundations.edu>
---
 C4/Biblio.pm                                       |  275 ++++++++++----------
 .../opac-tmpl/prog/en/modules/opac-detail.tmpl     |   50 ++--
 2 files changed, 165 insertions(+), 160 deletions(-)

diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index 385f141..37bd559 100755
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -50,7 +50,7 @@ BEGIN {
         &GetRecordValue
     );
 
-	push @EXPORT, qw( 
+	push @EXPORT, qw(
 		&AddBiblio
 	);
 
@@ -63,12 +63,12 @@ BEGIN {
 		&GetBiblioItemByBiblioNumber
 		&GetBiblioFromItemNumber
 		&GetBiblioSummary
-		
+
 		&GetRecordValue
 		&GetFieldMapping
 		&SetFieldMapping
 		&DeleteFieldMapping
-		
+
 		&GetISBDView
 
 		&GetMarcNotes
@@ -87,7 +87,7 @@ BEGIN {
 		&GetFrameworkCode
 		&GetPublisherNameFromIsbn
 		&TransformKohaToMarc
-		
+
 		&CountItemsIssued
 	);
 
@@ -240,10 +240,10 @@ sub AddBiblio {
 
     # update MARC subfield that stores biblioitems.cn_sort
     _koha_marc_update_biblioitem_cn_sort($record, $olddata, $frameworkcode);
-    
+
     # now add the record
     ModBiblioMarc( $record, $biblionumber, $frameworkcode ) unless $$options{defer_marc_save} ||= 0;
-      
+
     logaction("CATALOGUING", "ADD", $biblionumber, "biblio") if C4::Context->preference("CataloguingLog");
     return ( $biblionumber, $biblioitemnumber );
 }
@@ -278,9 +278,9 @@ sub ModBiblio {
         my $newrecord = GetMarcBiblio($biblionumber);
         logaction("CATALOGUING", "MODIFY", $biblionumber, "BEFORE=>".$newrecord->as_formatted);
     }
-    
+
     my $dbh = C4::Context->dbh;
-    
+
     $frameworkcode = "" unless $frameworkcode;
 
     # get the items before and append them to the biblio before updating the record, atm we just have the biblio
@@ -293,10 +293,10 @@ sub ModBiblio {
     foreach my $field ($record->field($itemtag)) {
         $record->delete_field($field);
     }
-   
+
     # once all the items fields are removed, copy the old ones, in order to keep synchronize
     $record->append_fields($oldRecord->field( $itemtag ));
-   
+
     # update biblionumber and biblioitemnumber in MARC
     # FIXME - this is assuming a 1 to 1 relationship between
     # biblios and biblioitems
@@ -314,7 +314,7 @@ sub ModBiblio {
 
     # update the MARC record (that now contains biblio and items) with the new record data
     &ModBiblioMarc( $record, $biblionumber, $frameworkcode );
-    
+
     # modify the other koha tables
     _koha_modify_biblio( $dbh, $oldbiblio, $frameworkcode );
     _koha_modify_biblioitem_nonmarc( $dbh, $oldbiblio );
@@ -358,7 +358,7 @@ sub DelBiblio {
     my ( $biblionumber ) = @_;
     my $dbh = C4::Context->dbh;
     my $error;    # for error handling
-    
+
     # First make sure this biblio has no items attached
     my $sth = $dbh->prepare("SELECT itemnumber FROM items WHERE biblionumber=?");
     $sth->execute($biblionumber);
@@ -374,7 +374,7 @@ sub DelBiblio {
     foreach my $subscription (@$subscriptions){
         &C4::Serials::DelSubscription($subscription->{subscriptionid});
     }
-    
+
     # Delete in Zebra. Be careful NOT to move this line after _koha_delete_biblio
     # for at least 2 reasons :
     # - we need to read the biblio if NoZebra is set (to remove it from the indexes
@@ -423,10 +423,10 @@ Links bib headings to authority records by checking
 each authority-controlled field in the C<MARC::Record>
 object C<$marc>, looking for a matching authority record,
 and setting the linking subfield $9 to the ID of that
-authority record.  
+authority record.
 
 If no matching authority exists, or if multiple
-authorities match, no $9 will be added, and any 
+authorities match, no $9 will be added, and any
 existing one inthe field will be deleted.
 
 Returns the number of heading links changed in the
@@ -439,7 +439,7 @@ sub LinkBibHeadingsToAuthorities {
 
     my $num_headings_changed = 0;
     foreach my $field ($bib->fields()) {
-        my $heading = C4::Heading->new_from_bib_field($field);    
+        my $heading = C4::Heading->new_from_bib_field($field);
         next unless defined $heading;
 
         # check existing $9
@@ -483,25 +483,25 @@ Get MARC fields from a keyword defined in fieldmapping table.
 sub GetRecordValue {
     my ($field, $record, $frameworkcode) = @_;
     my $dbh = C4::Context->dbh;
-    
+
     my $sth = $dbh->prepare('SELECT fieldcode, subfieldcode FROM fieldmapping WHERE frameworkcode = ? AND field = ?');
     $sth->execute($frameworkcode, $field);
-    
+
     my @result = ();
-    
+
     while(my $row = $sth->fetchrow_hashref){
         foreach my $field ($record->field($row->{fieldcode})){
             if( ($row->{subfieldcode} ne "" && $field->subfield($row->{subfieldcode}))){
                 foreach my $subfield ($field->subfield($row->{subfieldcode})){
                     push @result, { 'subfield' => $subfield };
                 }
-                
+
             }elsif($row->{subfieldcode} eq "") {
                 push @result, {'subfield' => $field->as_string()};
             }
         }
     }
-    
+
     return \@result;
 }
 
@@ -520,13 +520,13 @@ Set a Field to MARC mapping value, if it already exists we don't add a new one.
 sub SetFieldMapping {
     my ($framework, $field, $fieldcode, $subfieldcode) = @_;
     my $dbh = C4::Context->dbh;
-    
+
     my $sth = $dbh->prepare('SELECT * FROM fieldmapping WHERE fieldcode = ? AND subfieldcode = ? AND frameworkcode = ? AND field = ?');
     $sth->execute($fieldcode, $subfieldcode, $framework, $field);
     if(not $sth->fetchrow_hashref){
         my @args;
         $sth = $dbh->prepare('INSERT INTO fieldmapping (fieldcode, subfieldcode, frameworkcode, field) VALUES(?,?,?,?)');
-        
+
         $sth->execute($fieldcode, $subfieldcode, $framework, $field);
     }
 }
@@ -546,7 +546,7 @@ Delete a field mapping from an $id.
 sub DeleteFieldMapping{
     my ($id) = @_;
     my $dbh = C4::Context->dbh;
-    
+
     my $sth = $dbh->prepare('DELETE FROM fieldmapping WHERE id = ?');
     $sth->execute($id);
 }
@@ -566,10 +566,10 @@ Get all field mappings for a specified frameworkcode
 sub GetFieldMapping {
     my ($framework) = @_;
     my $dbh = C4::Context->dbh;
-    
+
     my $sth = $dbh->prepare('SELECT * FROM fieldmapping where frameworkcode = ?');
     $sth->execute($framework);
-    
+
     my @return;
     while(my $row = $sth->fetchrow_hashref){
         push @return, $row;
@@ -599,21 +599,21 @@ sub GetBiblioData {
     my ( $bibnum ) = @_;
     my $dbh = C4::Context->dbh;
 
-  #  my $query =  C4::Context->preference('item-level_itypes') ? 
+  #  my $query =  C4::Context->preference('item-level_itypes') ?
     #   " SELECT * , biblioitems.notes AS bnotes, biblio.notes
     #       FROM biblio
     #        LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber
     #       WHERE biblio.biblionumber = ?
     #        AND biblioitems.biblionumber = biblio.biblionumber
     #";
-    
+
     my $query = " SELECT * , biblioitems.notes AS bnotes, itemtypes.notforloan as bi_notforloan, biblio.notes
             FROM biblio
             LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber
             LEFT JOIN itemtypes ON biblioitems.itemtype = itemtypes.itemtype
             WHERE biblio.biblionumber = ?
             AND biblioitems.biblionumber = biblio.biblionumber ";
-         
+
     my $sth = $dbh->prepare($query);
     $sth->execute($bibnum);
     my $data;
@@ -644,9 +644,9 @@ sub GetBiblioItemData {
     my $dbh       = C4::Context->dbh;
     my $query = "SELECT *,biblioitems.notes AS bnotes
         FROM biblio LEFT JOIN biblioitems on biblio.biblionumber=biblioitems.biblionumber ";
-    unless(C4::Context->preference('item-level_itypes')) { 
+    unless(C4::Context->preference('item-level_itypes')) {
         $query .= "LEFT JOIN itemtypes on biblioitems.itemtype=itemtypes.itemtype ";
-    }    
+    }
     $query .= " WHERE biblioitemnumber = ? ";
     my $sth       =  $dbh->prepare($query);
     my $data;
@@ -705,16 +705,16 @@ sub GetBiblioFromItemNumber {
     my $dbh = C4::Context->dbh;
     my $sth;
     if($itemnumber) {
-        $sth=$dbh->prepare(  "SELECT * FROM items 
+        $sth=$dbh->prepare(  "SELECT * FROM items
             LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber
             LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
-             WHERE items.itemnumber = ?") ; 
+             WHERE items.itemnumber = ?") ;
         $sth->execute($itemnumber);
     } else {
-        $sth=$dbh->prepare(  "SELECT * FROM items 
+        $sth=$dbh->prepare(  "SELECT * FROM items
             LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber
             LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
-             WHERE items.barcode = ?") ; 
+             WHERE items.barcode = ?") ;
         $sth->execute($barcode);
     }
     my $data = $sth->fetchrow_hashref;
@@ -722,7 +722,7 @@ sub GetBiblioFromItemNumber {
     return ($data);
 }
 
-=head2 GetISBDView 
+=head2 GetISBDView
 
 =over 4
 
@@ -740,16 +740,16 @@ sub GetISBDView {
     my $itemtype        = &GetFrameworkCode($biblionumber);
     my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField("items.holdingbranch",$itemtype);
     my $tagslib      = &GetMarcStructure( 1, $itemtype );
-    
+
     my $ISBD = C4::Context->preference('ISBD');
     if($template eq "opac"){
         $ISBD = C4::Context->preference('OPACISBD');
     }
-    
+
     my $bloc = $ISBD;
     my $res;
     my $blocres;
-    
+
     foreach my $isbdfield ( split (/#/, $bloc) ) {
 
         #         $isbdfield= /(.?.?.?)/;
@@ -759,19 +759,19 @@ sub GetISBDView {
         my $textbefore    = $3;
         my $analysestring = $4;
         my $textafter     = $5;
-    
+
         #         warn "==> $1 / $2 / $3 / $4";
         #         my $fieldvalue=substr($isbdfield,0,3);
         if ( $fieldvalue > 0 ) {
             my $hasputtextbefore = 0;
             my @fieldslist = $record->field($fieldvalue);
             @fieldslist = sort {$a->subfield($holdingbrtagsubf) cmp $b->subfield($holdingbrtagsubf)} @fieldslist if ($fieldvalue eq $holdingbrtagf);
-    
+
             #         warn "ERROR IN ISBD DEFINITION at : $isbdfield" unless $fieldvalue;
             #             warn "FV : $fieldvalue";
             if ($subfvalue ne ""){
               foreach my $field ( @fieldslist ) {
-                foreach my $subfield ($field->subfield($subfvalue)){ 
+                foreach my $subfield ($field->subfield($subfvalue)){
                   my $calculated = $analysestring;
                   my $tag        = $field->tag();
                   if ( $tag < 10 ) {
@@ -783,23 +783,23 @@ sub GetISBDView {
                     my $tagsubf = $tag . $subfvalue;
                     $calculated =~
                           s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
-                
+
                     # field builded, store the result
                     if ( $calculated && !$hasputtextbefore )
                     {    # put textbefore if not done
                     $blocres .= $textbefore;
                     $hasputtextbefore = 1;
                     }
-                
+
                     # remove punctuation at start
                     $calculated =~ s/^( |;|:|\.|-)*//g;
                     $blocres .= $calculated;
-                                
+
                   }
                 }
               }
               $blocres .= $textafter if $hasputtextbefore;
-            } else {    
+            } else {
             foreach my $field ( @fieldslist ) {
               my $calculated = $analysestring;
               my $tag        = $field->tag();
@@ -814,40 +814,40 @@ sub GetISBDView {
                     GetAuthorisedValueDesc( $tag, $subf[$i][0],
                       $subf[$i][1], '', $tagslib );
                     my $tagsubf = $tag . $subfieldcode;
-        
+
                     $calculated =~ s/\{\{$tagsubf\}\}/$valuecode/gx;
                     $calculated =~
                         s/\{(.?.?.?.?)$tagsubf(.*?)\}/$1$subfieldvalue$2\{$1$tagsubf$2\}/g;
                 }
-    
+
                 # field builded, store the result
                 if ( $calculated && !$hasputtextbefore )
                 {    # put textbefore if not done
                 $blocres .= $textbefore;
                 $hasputtextbefore = 1;
                 }
-    
+
                 # remove punctuation at start
                 $calculated =~ s/^( |;|:|\.|-)*//g;
                 $blocres .= $calculated;
               }
             }
             $blocres .= $textafter if $hasputtextbefore;
-            }       
+            }
         }
         else {
             $blocres .= $isbdfield;
         }
     }
     $res .= $blocres;
-    
+
     $res =~ s/\{(.*?)\}//g;
     $res =~ s/\\n/\n/g;
     $res =~ s/\n/<br\/>/g;
-    
+
     # remove empty ()
     $res =~ s/\(\)//g;
-   
+
     return $res;
 }
 
@@ -934,9 +934,9 @@ sub GetMarcStructure {
     my ($total) = $sth->fetchrow;
     $frameworkcode = "" unless ( $total > 0 );
     $sth = $dbh->prepare(
-        "SELECT tagfield,liblibrarian,libopac,mandatory,repeatable 
-        FROM marc_tag_structure 
-        WHERE frameworkcode=? 
+        "SELECT tagfield,liblibrarian,libopac,mandatory,repeatable
+        FROM marc_tag_structure
+        WHERE frameworkcode=?
         ORDER BY tagfield"
     );
     $sth->execute($frameworkcode);
@@ -953,13 +953,13 @@ sub GetMarcStructure {
     }
 
     $sth = $dbh->prepare(
-        "SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue 
-         FROM   marc_subfield_structure 
-         WHERE  frameworkcode=? 
+        "SELECT tagfield,tagsubfield,liblibrarian,libopac,tab,mandatory,repeatable,authorised_value,authtypecode,value_builder,kohafield,seealso,hidden,isurl,link,defaultvalue
+         FROM   marc_subfield_structure
+         WHERE  frameworkcode=?
          ORDER BY tagfield,tagsubfield
         "
     );
-    
+
     $sth->execute($frameworkcode);
 
     my $subfield;
@@ -1010,14 +1010,14 @@ sub GetMarcStructure {
 
     the same function as GetMarcStructure except it just takes field
     in tab 0-9. (used field)
-    
+
     my $results = GetUsedMarcStructure($frameworkcode);
-    
+
     L<$results> is a ref to an array which each case containts a ref
     to a hash which each keys is the columns from marc_subfield_structure
-    
-    L<$frameworkcode> is the framework code. 
-    
+
+    L<$frameworkcode> is the framework code.
+
 =cut
 
 sub GetUsedMarcStructure($){
@@ -1025,7 +1025,7 @@ sub GetUsedMarcStructure($){
     my $query         = qq/
         SELECT *
         FROM   marc_subfield_structure
-        WHERE   tab > -1 
+        WHERE   tab > -1
             AND frameworkcode = ?
         ORDER BY tagfield, tagsubfield
     /;
@@ -1039,7 +1039,7 @@ sub GetUsedMarcStructure($){
 =over 4
 
 ($MARCfield,$MARCsubfield)=GetMarcFromKohaField($kohafield,$frameworkcode);
-Returns the MARC fields & subfields mapped to the koha field 
+Returns the MARC fields & subfields mapped to the koha field
 for the given frameworkcode
 
 =back
@@ -1250,26 +1250,26 @@ Return the summary of a record.
 
 sub GetBiblioSummary {
     my $recorddata =shift @_;
-    
+
     return unless $recorddata;
     my $marcflavour = C4::Context->preference("marcflavour");
     my $marc=MARC::Record::new_from_xml($recorddata,"utf-8",$marcflavour);
     return unless $marc;
-    
+
     my $str;
-    
+
     if($marcflavour eq "MARC21"){
         $str="<b>".$marc->subfield('245',"a")."</b>" if $marc->subfield('245','a');
         $str.= " <i>".$marc->subfield('245',"b")."</i> " if $marc->subfield('245','b');
-        
+
         if ($marc->field('245')){
             $str.=" / ";
             foreach ($marc->field('100')->subfield("a")) {
                 $str.=$_." ; ";
             }
-            $str=~s/ ; $/. /; 
+            $str=~s/ ; $/. /;
         }
-      
+
         if ($marc->field('260')){
             $str.=" - ";
             $str.=$marc->subfield('260',"a")." " if $marc->subfield('260','a');
@@ -1287,12 +1287,12 @@ sub GetBiblioSummary {
             $str.= " - ";
             foreach ($_->subfield("a")){
                 $str.=$_."; "
-            } 
+            }
         }
         my $itemtypes=GetItemTypes();
         $str.=" - <u>".$itemtypes->{$marc->subfield('942','c')}->{'description'}."</u> ";
         $str.="<br />\n";
-       
+
     }else{
         $str = "<b>".$marc->subfield('200','a')."</b>"   if $marc->subfield('200','a');
         $str.= " <i>".$marc->subfield('200','e')."</i> " if $marc->subfield('200','e');
@@ -1301,17 +1301,17 @@ sub GetBiblioSummary {
             foreach ($marc->field('200')->subfield("f")) {
                 $str.=$_." ; ";
             }
-            $str=~s/ ; $/. /; 
+            $str=~s/ ; $/. /;
         }
-        
+
         if ($marc->subfield('200','g')){
             $str.=" ; ";
             foreach ($marc->field('200')->subfield("g")){
                 $str.=$_." ; ";
-            } 
-            $str=~s/ ; $/. /; 
+            }
+            $str=~s/ ; $/. /;
         }
-        
+
         if ($marc->field('461')){
             $str.="- In :";
             $str.=     $marc->subfield('461','t') if $marc->subfield('461','t');
@@ -1320,14 +1320,14 @@ sub GetBiblioSummary {
             $str.=", ".$marc->subfield('461','h') if $marc->subfield('461','h');
             $str.=" ; ".$marc->subfield('461','x') if $marc->subfield('461','x');
         }
-        
+
         if ($marc->field('210')){
             $str.=" - ";
             $str.=$marc->subfield('210',"a")." " if $marc->subfield('210','a');
             $str.=" : ".$marc->subfield('210',"c")." " if $marc->subfield('210','c');
             $str.=", ".$marc->subfield('210',"d")." " if $marc->subfield('210','d');
         }
-        
+
         if ($marc->field('215')){
             $str.=" - ";
             $str.=$marc->subfield('215','a') if ($marc->subfield(215,'a'));
@@ -1339,15 +1339,15 @@ sub GetBiblioSummary {
             $str.=" - ";
             foreach ($_->subfield("a")){
                 $str.=$_."; "
-            } 
+            }
         }
-        
+
         my $itemtypes=GetItemTypes;
         if($itemtypes->{$marc->subfield('200','b')}){
             $str.=" - <u>".$itemtypes->{$marc->subfield('200','b')}->{'description'}."</u> ";
         }
-        $str.="<br />\n";         
-    }    
+        $str.="<br />\n";
+    }
     return $str;
 }
 
@@ -1472,7 +1472,7 @@ sub GetMarcSubjects {
         $mintag = "600";
         $maxtag = "611";
     }
-    
+
     my @marcsubjects;
     my $subject = "";
     my $subfield = "";
@@ -1485,6 +1485,7 @@ sub GetMarcSubjects {
         my $counter = 0;
         my @link_loop;
         # if there is an authority link, build the link with an= subfield9
+        my $found9 = 0;
         my $subfield9 = $field->subfield('9');
         for my $subject_subfield (@subfields ) {
             # don't load unimarc subfields 3,4,5
@@ -1494,22 +1495,26 @@ sub GetMarcSubjects {
             my $code = $subject_subfield->[0];
             my $value = $subject_subfield->[1];
             my $linkvalue = $value;
+            my $limit = '';
             $linkvalue =~ s/(\(|\))//g;
-            my $operator = " and " unless $counter==0;
-            if ($subfield9) {
-                @link_loop = ({'limit' => 'an' ,link => "$subfield9" });
-            } else {
-                push @link_loop, {'limit' => 'su', link => $linkvalue, operator => $operator };
+            my $operator = " and " unless $counter == 0;
+            if ( $code eq 9 ) {
+                $found9 = 1;
+                $limit = 'an';
+                @link_loop = ( {link => "$linkvalue" } );
+            }
+            if ( not $found9 ) {
+                $limit = 'su';
+                push @link_loop, {link => $linkvalue, operator => $operator };
             }
             my $separator = C4::Context->preference("authoritysep") unless $counter==0;
             # ignore $9
             my @this_link_loop = @link_loop;
-            push @subfields_loop, {code => $code, value => $value, link_loop => \@this_link_loop, separator => $separator} unless ($subject_subfield->[0] eq 9 );
+            push @subfields_loop, { code => $code, value => $value, link_loop => \@this_link_loop, separator => $separator, limit => $limit} unless ( $subject_subfield->[0] eq 9 );
             $counter++;
         }
-                
         push @marcsubjects, { MARCSUBJECT_SUBFIELDS_LOOP => \@subfields_loop };
-        
+
     }
         return \@marcsubjects;
 }  #end getMARCsubjects
@@ -1533,7 +1538,7 @@ sub GetMarcAuthors {
     my $tagslib = &GetMarcStructure( 1, '' ); # FIXME : we don't have the framework available, we take the default framework. May be buggy on some setups, will be usually correct.
     if ( $marcflavour eq "MARC21" ) {
         $mintag = "700";
-        $maxtag = "720"; 
+        $maxtag = "720";
     }
     elsif ( $marcflavour eq "UNIMARC" ) {    # assume unimarc if not marc21
         $mintag = "700";
@@ -1588,7 +1593,7 @@ sub GetMarcAuthors {
 
 $marcurls = GetMarcUrls($record,$marcflavour);
 Returns arrayref of URLs from MARC data, suitable to pass to tmpl loop.
-Assumes web resources (not uncommon in MARC21 to omit resource type ind) 
+Assumes web resources (not uncommon in MARC21 to omit resource type ind)
 
 =back
 
@@ -1841,7 +1846,7 @@ sub TransformHtmlToXml {
     $auth_type = C4::Context->preference('marcflavour') unless $auth_type;
     MARC::File::XML->default_record_format($auth_type);
     # in UNIMARC, field 100 contains the encoding
-    # check that there is one, otherwise the 
+    # check that there is one, otherwise the
     # MARC::Record->new_from_xml will fail (and Koha will die)
     my $unimarc_and_100_exist=0;
     $unimarc_and_100_exist=1 if $auth_type eq 'ITEM'; # if we rebuild an item, no need of a 100 field
@@ -2011,11 +2016,11 @@ sub TransformHtmlToMarc {
             my $param_value = $cgi_params->{$param_name};
             if (utf8::decode($param_value)) {
                 $cgi_params->{$param_name} = $param_value;
-            } 
+            }
             # FIXME - need to do something if string is not valid UTF-8
         }
     }
-   
+
     # creating a new record
     my $record  = MARC::Record->new();
     my $i=0;
@@ -2041,15 +2046,15 @@ sub TransformHtmlToMarc {
                 );
             }
             push @fields,$newfield if($newfield);
-        } 
+        }
         elsif ($param =~ /^tag_(\d*)_indicator1_/){ # new field start when having 'input name="..._indicator1_..."
             my $tag  = $1;
-            
+
             my $ind1 = _default_ind_to_space(substr($cgi->param($param),          0, 1));
             my $ind2 = _default_ind_to_space(substr($cgi->param($params->[$i+1]), 0, 1));
             $newfield=0;
             my $j=$i+2;
-            
+
             if($tag < 10){ # no code for theses fields
     # in MARC editor, 000 contains the leader.
                 if ($tag eq '000' ) {
@@ -2088,7 +2093,7 @@ sub TransformHtmlToMarc {
         }
         $i++;
     }
-    
+
     $record->append_fields(@fields);
     return $record;
 }
@@ -2105,7 +2110,7 @@ our $inverted_field_map;
 =back
 
 Extract data from a MARC bib record into a hashref representing
-Koha biblio, biblioitems, and items fields. 
+Koha biblio, biblioitems, and items fields.
 
 =cut
 sub TransformMarcToKoha {
@@ -2114,7 +2119,7 @@ sub TransformMarcToKoha {
     my $result;
     $limit_table=$limit_table||0;
     $frameworkcode = '' unless defined $frameworkcode;
-    
+
     unless (defined $inverted_field_map) {
         $inverted_field_map = _get_inverted_marc_field_map();
     }
@@ -2238,7 +2243,7 @@ name with the table name would require changing lots
 of code and templates, and exposing more of the DB
 structure than is good to the UI templates, particularly
 since biblio and bibloitems may well merge in a future
-version.  In the future, it would also be good to 
+version.  In the future, it would also be good to
 separate DB access and UI presentation field names
 more.
 
@@ -2280,7 +2285,7 @@ FIXME: this is meant to replace TransformMarcToKohaOneField after more testing.
 
 sub get_koha_field_from_marc {
     my ($koha_table,$koha_column,$record,$frameworkcode) = @_;
-    my ( $tagfield, $subfield ) = GetMarcFromKohaField( $koha_table.'.'.$koha_column, $frameworkcode );  
+    my ( $tagfield, $subfield ) = GetMarcFromKohaField( $koha_table.'.'.$koha_column, $frameworkcode );
     my $kohafield;
     foreach my $field ( $record->field($tagfield) ) {
         if ( $field->tag() < 10 ) {
@@ -2310,7 +2315,7 @@ sub get_koha_field_from_marc {
         }
     }
     return $kohafield;
-} 
+}
 
 
 =head2 TransformMarcToKohaOneField
@@ -2460,7 +2465,7 @@ sub PrepareItemrecordDisplay {
                 if ( ($tagslib->{$tag}->{$subfield}->{kohafield} eq
                     'items.holdingbranch' ||
                     $tagslib->{$tag}->{$subfield}->{kohafield} eq
-                    'items.homebranch')          
+                    'items.homebranch')
                     && $defaultvalues->{'branchcode'} )
                 {
                     my $temp = $itemrecord->field($subfield) if ($itemrecord);
@@ -2580,15 +2585,15 @@ sub PrepareItemrecordDisplay {
 # replaced by a zebraqueue table, that is filled with ModZebra to run.
 # the table is emptied by misc/cronjobs/zebraqueue_start.pl script
 # =head2 ModZebrafiles
-# 
+#
 # &ModZebrafiles( $dbh, $biblionumber, $record, $folder, $server );
-# 
+#
 # =cut
-# 
+#
 # sub ModZebrafiles {
-# 
+#
 #     my ( $dbh, $biblionumber, $record, $folder, $server ) = @_;
-# 
+#
 #     my $op;
 #     my $zebradir =
 #       C4::Context->zebraconfig($server)->{directory} . "/" . $folder . "/";
@@ -2598,7 +2603,7 @@ sub PrepareItemrecordDisplay {
 #     }
 #     closedir DIR;
 #     my $filename = $zebradir . $biblionumber;
-# 
+#
 #     if ($record) {
 #         open( OUTPUT, ">", $filename . ".xml" );
 #         print OUTPUT $record;
@@ -2615,11 +2620,11 @@ ModZebra( $biblionumber, $op, $server, $oldRecord, $newRecord );
     $biblionumber is the biblionumber we want to index
     $op is specialUpdate or delete, and is used to know what we want to do
     $server is the server that we want to update
-    $oldRecord is the MARC::Record containing the previous version of the record.  This is used only when 
+    $oldRecord is the MARC::Record containing the previous version of the record.  This is used only when
       NoZebra=1, as NoZebra indexing needs to know the previous version of a record in order to
       do an update.
     $newRecord is the MARC::Record containing the new record. It is usefull only when NoZebra=1, and is used to know what to add to the nozebra database. (the record in mySQL being, if it exist, the previous record, the one just before the modif. We need both : the previous and the new one.
-    
+
 =back
 
 =cut
@@ -2643,7 +2648,7 @@ sub ModZebra {
         if ($op eq 'specialUpdate') {
             # OK, we have to add or update the record
             # 1st delete (virtually, in indexes), if record actually exists
-            if ($oldRecord) { 
+            if ($oldRecord) {
                 %result = _DelBiblioNoZebra($biblionumber,$oldRecord,$server);
             }
             # ... add the record
@@ -2665,7 +2670,7 @@ sub ModZebra {
         #
         # we use zebra, just fill zebraqueue table
         #
-        my $check_sql = "SELECT COUNT(*) FROM zebraqueue 
+        my $check_sql = "SELECT COUNT(*) FROM zebraqueue
                          WHERE server = ?
                          AND   biblio_auth_number = ?
                          AND   operation = ?
@@ -2685,7 +2690,7 @@ sub ModZebra {
 =head2 GetNoZebraIndexes
 
     %indexes = GetNoZebraIndexes;
-    
+
     return the data from NoZebraIndexes syspref.
 
 =cut
@@ -2721,7 +2726,7 @@ sub GetNoZebraIndexes {
 
 sub _DelBiblioNoZebra {
     my ($biblionumber, $record, $server)=@_;
-    
+
     # Get the indexes
     my $dbh = C4::Context->dbh;
     # Get the indexes
@@ -2742,7 +2747,7 @@ sub _DelBiblioNoZebra {
         $index{'mainentry'}    = $authref->{'auth_tag_to_report'}.'*';
         $index{'auth_type'}    = "${auth_type_tag}${auth_type_sf}";
     }
-    
+
     my %result;
     # remove blancks comma (that could cause problem when decoding the string for CQL retrieval) and regexp specific values
     $title =~ s/ |,|;|\[|\]|\(|\)|\*|-|'|=//g;
@@ -3101,7 +3106,7 @@ sub _koha_add_biblio {
     my $serial = 0;
     if ( $biblio->{'seriestitle'} ) { $serial = 1 };
 
-    my $query = 
+    my $query =
         "INSERT INTO biblio
         SET frameworkcode = ?,
             author = ?,
@@ -3169,7 +3174,7 @@ sub _koha_modify_biblio {
         "
     ;
     my $sth = $dbh->prepare($query);
-    
+
     $sth->execute(
         $frameworkcode,
         $biblio->{'author'},
@@ -3210,8 +3215,8 @@ sub _koha_modify_biblioitem_nonmarc {
     # re-calculate the cn_sort, it may have changed
     my ($cn_sort) = GetClassSort($biblioitem->{'biblioitems.cn_source'}, $biblioitem->{'cn_class'}, $biblioitem->{'cn_item'} );
 
-    my $query = 
-    "UPDATE biblioitems 
+    my $query =
+    "UPDATE biblioitems
     SET biblionumber    = ?,
         volume          = ?,
         number          = ?,
@@ -3306,12 +3311,12 @@ sub _koha_add_biblioitem {
     volume volumedate volumedesc
     /;
 
-    ($$biblioitem{cn_sort}) = GetClassSort( @$biblioitem{qw/ biblioitems.cn_source cn_class cn_item /} ); 
+    ($$biblioitem{cn_sort}) = GetClassSort( @$biblioitem{qw/ biblioitems.cn_source cn_class cn_item /} );
 
     my $query = 'INSERT INTO biblioitems SET '
 	.  join ( ',', map { "$_ =?" } @fields )
 	.  ';'
-    ; 
+    ;
 
     my $sth = $dbh->prepare($query);
     $sth->execute( @$biblioitem{@fields} );
@@ -3433,15 +3438,15 @@ sub _koha_delete_biblioitems {
 =head2 ModBiblioMarc
 
     &ModBiblioMarc($newrec,$biblionumber,$frameworkcode);
-    
-    Add MARC data for a biblio to koha 
-    
+
+    Add MARC data for a biblio to koha
+
     Function exported, but should NOT be used, unless you really know what you're doing
 
 =cut
 
 sub ModBiblioMarc {
-    
+
 # pass the MARC::Record to this function, and it will create the records in the marc field
     my ( $record, $biblionumber, $frameworkcode ) = @_;
     my $dbh = C4::Context->dbh;
@@ -3621,7 +3626,7 @@ sub set_service_options {
 sub get_biblio_authorised_values {
     my $biblionumber = shift;
     my $record       = shift;
-    
+
     my $forlibrarian = 1; # are we in staff or opac?
     my $frameworkcode = GetFrameworkCode( $biblionumber );
 
@@ -3638,7 +3643,7 @@ sub get_biblio_authorised_values {
                       AND (kohafield like 'biblio%'
                        OR  kohafield like '') );
     my $bibliolevel_authorised_values = C4::Context->dbh->selectall_hashref( $query, 'authorised_value' );
-    
+
     foreach my $tag ( keys( %$tagslib ) ) {
         foreach my $subfield ( keys( %{$tagslib->{ $tag }} ) ) {
             # warn "checking $subfield. type is: " . ref $tagslib->{ $tag }{ $subfield };
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
index dae0bd5..6877e9e 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
@@ -3,7 +3,7 @@
 <script type="text/javascript" src="<!-- TMPL_VAR name="themelang" -->/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
 <script type="text/JavaScript" language="JavaScript">
 //<![CDATA[
-     $(document).ready(function() { 
+     $(document).ready(function() {
         $("#tagform").hide();
         $("#addtagl").show();
         $('#bibliodescriptions > ul').tabs();
@@ -41,14 +41,14 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 		YAHOO.util.Event.addListener("furthersearches", "click", furthersearchesMenu.show, null, furthersearchesMenu);
 		YAHOO.widget.Overlay.windowResizeEvent.subscribe(positionfurthersearchesMenu);
  });
-	
+
 //]]>
 </script>
 <style type="text/css">
     #addtagl { display: none; }
 </style>
-<!-- TMPL_IF NAME="XSLTDetailsDisplay" --><script type="text/javascript">                            
-    var GB_ROOT_DIR = "/intranet-tmpl/prog/en/lib/greybox/";                               
+<!-- TMPL_IF NAME="XSLTDetailsDisplay" --><script type="text/javascript">
+    var GB_ROOT_DIR = "/intranet-tmpl/prog/en/lib/greybox/";
 </script><!-- /TMPL_IF -->
 <!-- TMPL_IF NAME="GoogleJackets" --><script type="text/javascript" src="/intranet-tmpl/prog/en/lib/greybox/AJS.js"></script>
 <script type="text/javascript" src="/intranet-tmpl/prog/en/lib/greybox/AJS_fx.js"></script>
@@ -69,7 +69,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     <div id="catalogue_detail_biblio">
 
     <div id="bookcover">
-    <!-- TMPL_IF NAME="OPACAmazonContent" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon<!-- TMPL_VAR NAME="AmazonTld" -->/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01.MZZZZZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="http://www.amazon<!-- TMPL_VAR NAME="AmazonTld" -->/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01.MZZZZZZZ.jpg" alt="Cover Image" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->    
+    <!-- TMPL_IF NAME="OPACAmazonContent" --><!-- TMPL_IF NAME="OPACAmazonCoverImages" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="http://www.amazon<!-- TMPL_VAR NAME="AmazonTld" -->/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01.MZZZZZZZ.jpg" alt="Cover Image" /></a><!-- TMPL_ELSE --><a href="http://www.amazon<!-- TMPL_VAR NAME="AmazonTld" -->/gp/reader/<!-- TMPL_VAR NAME="normalized_isbn" -->/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="normalized_isbn" -->.01.MZZZZZZZ.jpg" alt="Cover Image" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
     <!-- TMPL_IF NAME="SyndeticsEnabled" --><!-- TMPL_IF NAME="SyndeticsCoverImages" --><!-- TMPL_IF NAME="content_identifier_exists" --><img src="http://www.syndetics.com/index.aspx?isbn=<!-- TMPL_VAR NAME="normalized_isbn" -->/<!-- TMPL_VAR NAME="SyndeticsCoverImageSize" -->.GIF&amp;client=<!-- TMPL_VAR NAME="SyndeticsClientCode" -->&amp;type=xw10<!-- TMPL_IF NAME="normalized_upc" -->&amp;upc=<!-- TMPL_VAR NAME="normalized_upc" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="normalized_oclc" -->&amp;oclc=<!-- TMPL_VAR NAME="normalized_oclc" --><!-- /TMPL_IF -->" alt="" class="thumbnail" /><!-- TMPL_ELSE --><span class="no-image">No cover image available</span><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
     <!-- TMPL_IF NAME="GoogleJackets" --><div style="block" title="<!-- TMPL_VAR NAME="biblionumber" ESCAPE="URL" -->" class="<!-- TMPL_VAR NAME="normalized_isbn" -->" id="gbs-thumbnail"></div><!-- /TMPL_IF -->
     <!-- TMPL_IF NAME="BakerTaylorEnabled" --><!-- TMPL_IF NAME="normalized_isbn" --><!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" target="_blank"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- TMPL_ELSE --><a href="https://<!-- TMPL_VAR NAME="BakerTaylorBookstoreURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->"><img alt="See Baker &amp; Taylor" src="<!-- TMPL_VAR NAME="BakerTaylorImageURL" ESCAPE="HTML" --><!-- TMPL_VAR NAME="normalized_isbn" -->" /></a><!-- /TMPL_IF --><!-- /TMPL_IF --><!-- /TMPL_IF -->
@@ -79,11 +79,11 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
         <!-- TMPL_VAR NAME="XSLTBloc" -->
     <!-- TMPL_ELSE -->
     <h1><!-- TMPL_VAR NAME="title" escape="html" --> <!-- TMPL_IF NAME="subtitle" --> <span class="subtitle"><!-- TMPL_VAR NAME="subtitle" --></span><!-- /TMPL_IF --></h1>
-    <!-- TMPL_IF NAME="author" --><h5 class="author">by <a href="/cgi-bin/koha/opac-search.pl?q=au:<!-- TMPL_VAR NAME="author" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" ESCAPE="HTML" --></a></h5><!-- /TMPL_IF --> 
+    <!-- TMPL_IF NAME="author" --><h5 class="author">by <a href="/cgi-bin/koha/opac-search.pl?q=au:<!-- TMPL_VAR NAME="author" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" ESCAPE="HTML" --></a></h5><!-- /TMPL_IF -->
     <div id="views">
 	<span class="view">
 	    <span id="Normalview">Normal View</span>
-	</span> 
+	</span>
 
 	<!-- TMPL_IF NAME="can_opac_view_MARC" -->
 	    <span class="view">
@@ -114,7 +114,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     <!-- TMPL_IF name="MARCAUTHORS" -->
     <span class="results_summary"><span class="label">Authors:</span>
                 <!-- TMPL_LOOP NAME="MARCAUTHORS" -->
-                <!-- TMPL_LOOP NAME="MARCAUTHOR_SUBFIELDS_LOOP" --><!-- TMPL_VAR NAME="separator" --><a title="&#8225;<!-- TMPL_VAR NAME=code --> <!-- TMPL_VAR NAME=value -->" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_LOOP NAME=link_loop --><!-- TMPL_VAR NAME=operator ESCAPE="URL" --><!-- TMPL_VAR NAME='limit' ESCAPE="URL" -->:<!-- TMPL_VAR NAME=link ESCAPE="URL" --><!-- /TMPL_LOOP -->"><!-- TMPL_VAR NAME="value" --></a><!-- /TMPL_LOOP --> 
+                <!-- TMPL_LOOP NAME="MARCAUTHOR_SUBFIELDS_LOOP" --><!-- TMPL_VAR NAME="separator" --><a title="&#8225;<!-- TMPL_VAR NAME=code --> <!-- TMPL_VAR NAME=value -->" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_LOOP NAME=link_loop --><!-- TMPL_VAR NAME=operator ESCAPE="URL" --><!-- TMPL_VAR NAME='limit' ESCAPE="URL" -->:<!-- TMPL_VAR NAME=link ESCAPE="URL" --><!-- /TMPL_LOOP -->"><!-- TMPL_VAR NAME="value" --></a><!-- /TMPL_LOOP -->
         <!-- TMPL_UNLESS NAME="__last__" -->|
 <!-- /TMPL_UNLESS -->
                 <!-- /TMPL_LOOP -->
@@ -136,11 +136,11 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     <!-- TMPL_IF name="publishercode" -->
     <span class="results_summary"><span class="label">Published by :</span>
         <a href="/cgi-bin/koha/opac-search.pl?q=pb:<!-- TMPL_VAR NAME="publishercode" ESCAPE="URL" --> ">
-            <!-- TMPL_VAR NAME="publishercode" ESCAPE="HTML" --> 
+            <!-- TMPL_VAR NAME="publishercode" ESCAPE="HTML" -->
         </a> <!-- TMPL_IF name="place" -->(<!-- TMPL_VAR NAME="place"-->)<!--/TMPL_IF--> <!-- TMPL_IF NAME="publicationyear" -->, <!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
     </span>
     <!-- /TMPL_IF -->
-    
+
     <!-- TMPL_IF NAME="pages" --><span class="results_summary"><span class="label">Physical details:</span> <!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></span><!-- /TMPL_IF -->
     <!-- COinS / OpenURL -->
     <!-- TMPL_IF NAME="ocoins" -->
@@ -159,7 +159,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
         <!-- TMPL_VAR NAME="collectiontitle" -->
         <!-- TMPL_IF name="collectionissn" -->, ISSN <!-- TMPL_VAR NAME="collectionissn" -->    <!-- /TMPL_IF -->
         <!-- TMPL_IF name="collectionvolume" -->; <!-- TMPL_VAR NAME="collectionvolume" --> <!-- /TMPL_IF -->
-        
+
     </span>
     <!-- /TMPL_IF -->
     <!-- TMPL_IF name="unititles" -->
@@ -167,19 +167,19 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
         <!-- TMPL_LOOP name="unititles" -->
         <!-- TMPL_VAR NAME="unititle" --> ;
         <!-- /TMPL_LOOP -->
-        
+
     </span>
     <!-- /TMPL_IF -->
 
     <!-- TMPL_IF NAME="MARCSUBJCTS" -->
-            <span class="results_summary"><span class="label">Subject(s):</span> 
+            <span class="results_summary"><span class="label">Subject(s):</span>
                 <!-- TMPL_LOOP NAME="MARCSUBJCTS" -->
                     <!-- TMPL_LOOP NAME="MARCSUBJECT_SUBFIELDS_LOOP" -->
-                        <!-- TMPL_VAR NAME="separator" --><a title="$<!-- TMPL_VAR NAME="code" --> <!-- TMPL_VAR NAME="value" -->" href="/cgi-bin/koha/opac-search.pl?q=<!-- TMPL_LOOP NAME="link_loop" --><!-- TMPL_VAR NAME="operator" ESCAPE="URL" --><!-- TMPL_VAR NAME="limit" ESCAPE="URL" -->:<!-- TMPL_VAR NAME="link" ESCAPE="URL" --><!-- /TMPL_LOOP -->"><!-- TMPL_VAR NAME="value" --></a><!-- /TMPL_LOOP -->
+                        <!-- TMPL_VAR NAME="separator" --><a title="$<!-- TMPL_VAR NAME="code" --> <!-- TMPL_VAR NAME="value" -->" href="/cgi-bin/koha/opac-search.pl?idx=<!-- TMPL_VAR NAME="limit" ESCAPE="URL" -->&amp;q=<!-- TMPL_LOOP NAME="link_loop" --><!-- TMPL_VAR NAME="operator" ESCAPE="URL" --><!-- TMPL_VAR NAME="link" ESCAPE="URL" --><!-- /TMPL_LOOP -->"><!-- TMPL_VAR NAME="value" --></a><!-- /TMPL_LOOP -->
         <!-- TMPL_IF NAME="__LAST__" --><!-- TMPL_ELSE -->|<!-- /TMPL_IF -->
                 <!-- /TMPL_LOOP --></span>
     <!-- TMPL_ELSE -->
-    <!-- TMPL_IF name="subjects" --><span class="results_summary"><span class="label">Subject(s):</span> <!-- TMPL_LOOP name="subjects" --><a href="/cgi-bin/koha/opac-search.pl?q=su:<!-- TMPL_VAR NAME="subject" escape="URL" -->"><!-- TMPL_VAR NAME="subject" --></a> | <!-- /TMPL_LOOP --></span><!-- /TMPL_IF -->
+    <!-- TMPL_IF name="subjects" --><span class="results_summary"><span class="label">Subject(s):</span> <!-- TMPL_LOOP name="subjects" --><a href="/cgi-bin/koha/opac-search.pl?idx=su&amp;q=<!-- TMPL_VAR NAME="subject" escape="URL" -->"><!-- TMPL_VAR NAME="subject" --></a> | <!-- /TMPL_LOOP --></span><!-- /TMPL_IF -->
     <!-- /TMPL_IF -->
 
     <!-- TMPL_IF name="copyrightdate" -->
@@ -198,11 +198,11 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
     <div class="results_summary"><span class="label">Online Resources:</span>
     <ul>    <!-- TMPL_LOOP name="MARCURLS" -->
         <li><!-- TMPL_IF NAME="part" --><!-- TMPL_VAR NAME="part" -->
-            <br /><!-- /TMPL_IF --> 
+            <br /><!-- /TMPL_IF -->
         <!-- here you might do a tmpl_if name="toc" and use greybox or equivalent for table of contents -->
-        
+
         <!-- TMPL_IF NAME="OPACURLOpenInNewWindow" --><a href="<!-- TMPL_VAR NAME="MARCURL" -->" title="<!-- TMPL_VAR NAME="MARCURL" -->" target="_blank"><!-- TMPL_ELSE --><a href="<!-- TMPL_VAR NAME="MARCURL" -->" title="<!-- TMPL_VAR NAME="MARCURL" -->"><!-- /TMPL_IF -->
-        
+
         <!-- TMPL_VAR NAME="linktext" --></a>
             <!-- TMPL_IF NAME="notes" --><ul><!-- TMPL_LOOP NAME="notes" --><li><!-- TMPL_VAR NAME="note" --></li><!-- /TMPL_LOOP --></ul><!-- /TMPL_IF --></li>
             <!-- /TMPL_LOOP --></ul>
@@ -226,7 +226,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
             <ul><!-- TMPL_LOOP NAME="TagLoop" -->
             <li><a href="/cgi-bin/koha/opac-search.pl?tag=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->&amp;q=<!-- TMPL_VAR NAME="term" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="term" ESCAPE="HTML" --></a> <span class="weight">(<!-- TMPL_VAR NAME="weight_total" -->)</span></li>
             <!-- /TMPL_LOOP -->
-            </ul><!-- TMPL_ELSE -->No tags for this title. 
+            </ul><!-- TMPL_ELSE -->No tags for this title.
         <!-- /TMPL_IF -->
         <!-- TMPL_IF NAME="TagsInputOnDetail" -->
             <!-- TMPL_IF NAME="loggedinusername" -->
@@ -256,7 +256,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 
 <div id="bibliodescriptions" class="toptabs">
 
-<ul>   
+<ul>
 <li> <a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#holdings">Holdings
     ( <!-- TMPL_VAR NAME="count" --> )</a>
    </li>
@@ -267,7 +267,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 <!-- TMPL_IF NAME="reviewson" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#comments">Comments</a></li><!-- /TMPL_IF -->
 
     <!-- TMPL_IF NAME="OPACFRBRizeEditions" --><!-- TMPL_IF NAME="XISBNS" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#editions">Editions</a></li><!-- /TMPL_IF --><!-- /TMPL_IF -->
-    
+
     <!-- TMPL_IF NAME="AmazonContent" --><li><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->#amazonreviews">Amazon Reviews</a></li><!-- /TMPL_IF -->
 
 </ul>
@@ -337,7 +337,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
             <!-- TMPL_IF NAME="type" -->
             <td><a href="/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&amp;bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->&amp;item=<!-- TMPL_VAR NAME="itemtype" -->">Fix Itemtype</a></td>
             <!-- /TMPL_IF -->
-        </tr>    	
+        </tr>
         <!-- /TMPL_LOOP -->
 		</tbody>
 	</table>
@@ -349,7 +349,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 <div id="shelfbrowser">
 <h5 style="text-align: center;"><!-- TMPL_IF NAME="starting_homebranch" -->Browsing <!-- TMPL_VAR NAME="starting_homebranch" --> Shelves<!-- /TMPL_IF --><!-- TMPL_IF NAME="starting_location" -->, Shelving Location:</span><!-- TMPL_VAR NAME="starting_location" --> <!-- /TMPL_IF --> <a style="font-size: 75%;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->">Close Shelf Browser</a></h5>
 
-        
+
         <table><tr>
         <td rowspan="2" style="width:20px;"><a style="height: 10em;" href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_IF NAME="shelfbrowser_prev_biblionumber" --><!-- TMPL_VAR NAME="shelfbrowser_prev_biblionumber" --><!-- TMPL_ELSE --><!-- TMPL_VAR NAME="biblionumber" --><!-- /TMPL_IF -->&amp;shelfbrowse_itemnumber=<!-- TMPL_VAR NAME="shelfbrowser_prev_itemnumber" -->#shelfbrowser"><img src="/opac-tmpl/prog/images/browse-prev.gif" alt="Previous" border="0" /></a></td>
 <!-- TMPL_LOOP NAME="PREVIOUS_SHELF_BROWSE" -->
@@ -388,7 +388,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 <!-- /TMPL_LOOP -->
 </tr>
 </table>
-        
+
 </div>
 <!-- /TMPL_IF -->
 <br clear="all" />
@@ -516,7 +516,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
 <table>
 <!-- TMPL_LOOP NAME="XISBNS" -->
 <tr><!-- TMPL_IF NAME="AmazonContent" --><td><img src="http://images.amazon.com/images/P/<!-- TMPL_VAR NAME="amazonisbn" -->.01._AA75_PU_PU-5_.jpg" alt="" /></td><!-- /TMPL_IF --><td><!-- TMPL_VAR NAME="description" --></td><td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" escape="html" --></a><!-- TMPL_IF NAME="author" --> by <!-- TMPL_VAR NAME="author" ESCAPE="HTML" --><!-- /TMPL_IF --><!-- TMPL_IF NAME="copyrightdate" --> &copy;<!-- TMPL_VAR NAME="copyrightdate" --><!-- /TMPL_IF --><!-- TMPL_IF name="publishercode" -->
-    <p><!-- TMPL_VAR NAME="publishercode" ESCAPE="HTML" --> 
+    <p><!-- TMPL_VAR NAME="publishercode" ESCAPE="HTML" -->
        <!-- TMPL_IF name="place" -->(<!-- TMPL_VAR NAME="place"-->)<!--/TMPL_IF--> <!-- TMPL_IF NAME="publicationyear" -->, <!-- TMPL_VAR NAME="publicationyear" --><!-- /TMPL_IF -->
         <!-- TMPL_IF NAME="pages" --><!-- TMPL_VAR NAME="pages" --> <!-- TMPL_VAR NAME="illus" --> <!-- TMPL_VAR NAME="size" --></p><!-- /TMPL_IF -->
     <!-- /TMPL_IF --></td>
-- 
1.6.0.4




More information about the Koha-patches mailing list