when the result has an author as search term, the link contained the <span style...
authorPaul POULAIN <paul@koha-fr.org>
Wed, 28 Nov 2007 22:00:53 +0000 (16:00 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Sun, 2 Dec 2007 20:49:01 +0000 (14:49 -0600)
this fix add a author_nospan, that contains the author in it's native form

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Search.pm
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl

index 3909e6b..d408dcb 100644 (file)
@@ -1012,6 +1012,8 @@ sub searchResults {
             $oldbiblio->{summary} = $summary;
         }
         # add spans to search term in results for search term highlighting
+        # save a native author, for the <a href=search.lq=<!--tmpl_var name="author"-->> link
+        $oldbiblio->{'author_nospan'} = $oldbiblio->{'author'};
         foreach my $term ( keys %$span_terms_hashref ) {
             my $old_term = $term;
             if ( length($term) > 3 ) {
index e52b9a9..bd567b0 100644 (file)
                                 <!-- TMPL_ELSE -->
                                     <p>
                                         <!-- TMPL_IF NAME="author" -->
-                                            <a href="/cgi-bin/koha/catalogue/search.pl?q=au:<!-- TMPL_VAR NAME="author" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" --></a>
+                                            <a href="/cgi-bin/koha/catalogue/search.pl?q=au:<!-- TMPL_VAR NAME="author_nospan" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" --></a>
                                         <!-- TMPL_ELSE -->
                                             &nbsp;
                                         <!-- /TMPL_IF -->