commiting stephen hedges modifs to css template & fixing a bug in variable name (same name in TMPL_LOOP and TMPL_VAR confuses a lot HTML::Template)

This commit is contained in:
tipaul 2004-08-18 16:44:37 +00:00
parent 331db0ab02
commit 8790983cd5
4 changed files with 32 additions and 5 deletions

View 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;
}

View File

@ -62,6 +62,34 @@
</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 -->

View File

@ -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);

View File

@ -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 {