commiting stephen hedges modifs to css template & fixing a bug in variable name ...
authortipaul <tipaul>
Wed, 18 Aug 2004 16:44:37 +0000 (16:44 +0000)
committertipaul <tipaul>
Wed, 18 Aug 2004 16:44:37 +0000 (16:44 +0000)
C4/SearchMarc.pm
koha-tmpl/opac-tmpl/css/en/opac-detail.tmpl
opac/opac-detail.pl
opac/opac-search.pl

index 0961af9..66e743b 100644 (file)
@@ -464,7 +464,6 @@ sub getMARCsubjects {
                $mintag = "600";
                $maxtag = "619";
        }
-
        my $sth=$dbh->prepare("SELECT subfieldvalue,subfieldcode FROM marc_subfield_table WHERE bibid=? AND tag BETWEEN ? AND ? ORDER BY tagorder");
 
        $sth->execute($bibid,$mintag,$maxtag);
@@ -478,7 +477,7 @@ sub getMARCsubjects {
                my $value = $data->[0];
                my $subfield = $data->[1];
                if ($subfield eq "a" && $value ne $subjct) {
-                       $marcsubjct = {MARCSUBJCTS => $value,};
+                       $marcsubjct = {MARCSUBJCT => $value,};
                        push @marcsubjcts, $marcsubjct;
                        $subjct = $value;
                }
index 5bc6308..6e027cc 100644 (file)
                        </td>
                </tr>
        </table>
+       <table>
+       <!-- TMPL_IF name="MARCNOTES" -->
+               <tr>
+                       <th><i>Detailed notes:</i></th>
+                       <td>
+                               <ul>
+                                       <!-- TMPL_LOOP NAME="MARCNOTES" -->
+                                               <i>- <!-- TMPL_VAR NAME="marcnote" --></i><br>
+                                       <!-- /TMPL_LOOP -->
+                               </ul>
+                       </td>
+               </tr>
+       <!-- /TMPL_IF -->
+       <!-- TMPL_IF name="MARCSUBJCTS" -->
+               <tr>
+                       <th>Related links:</th>
+                       <td>
+                               <ul>
+                                       <!-- TMPL_LOOP NAME="MARCSUBJCTS" -->
+                                               - <a href="/cgi-bin/koha/opac-searchresults.pl?subjectitems=<!-- TMPL_VAR NAME="marcsubjct" ESCAPE="URL"-->">
+                                                       <!-- TMPL_VAR NAME="marcsubjct" -->
+                                               </a><br>
+                                       <!-- /TMPL_LOOP -->
+                               </ul>
+                       </td>
+               </tr>
+       <!-- /TMPL_IF -->
+       </table>
        </div>
        <!-- /TMPL_LOOP -->
 
index 5b92764..0456a2f 100755 (executable)
@@ -49,7 +49,7 @@ $template->param(norequests => $norequests);
   ## get notes and subjects from MARC record
 my $marc = C4::Context->preference("marc");
 if ($marc eq "yes") {
-        my $dbh = C4::Context->dbh;
+       my $dbh = C4::Context->dbh;
        my $bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$biblionumber);
        my $marcflavour = C4::Context->preference("marcflavour");
        my $marcnotesarray = &getMARCnotes($dbh,$bibid,$marcflavour);
index 353cca7..e95c3d6 100755 (executable)
@@ -11,7 +11,7 @@ use HTML::Template;
 use C4::SearchMarc;
 use C4::Acquisition;
 use C4::Biblio;
-use C4::Search;
+use C4::Search;
 
 my $classlist='';
 
@@ -48,7 +48,7 @@ if ($op eq "do_search") {
 
        foreach my $marc (@marclist) {
                if ($marc) {
-                       my ($tag,$subfield) = MARCfind_marc_from_kohafield($dbh,$marc);
+                       my ($tag,$subfield) = MARCfind_marc_from_kohafield($dbh,$marc,'');
                        if ($tag) {
                                push @tags,$dbh->quote("$tag$subfield");
                        } else {