From 875fafc5e05d13449c5ec98b8a0ae625b01b0436 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Mon, 7 Apr 2008 00:27:31 -0500 Subject: [PATCH] Show enumchron, copynumber in opac detail iff present. Signed-off-by: Joshua Ferraro --- .../prog/en/modules/opac-detail.tmpl | 25 +++++++++++-------- opac/opac-detail.pl | 14 ++++++++--- 2 files changed, 25 insertions(+), 14 deletions(-) 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 3992205f20..0b5d90a471 100755 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -171,19 +171,27 @@ - - - - - - + + + + + + + + + - + + + + + + - - - diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index b3f6d65700..d68f759cc4 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -109,7 +109,8 @@ if (C4::Context->preference("RequestOnOpac")) { } my $norequests = 1; -foreach my $itm (@items) { +my %itemfields; +for my $itm (@items) { $norequests = 0 && $norequests if ( (not $itm->{'wthdrawn'} ) || (not $itm->{'itemlost'} ) @@ -124,11 +125,11 @@ foreach my $itm (@items) { $itm->{'location_description'} = GetAuthorisedValueDesc('','', $itm->{'location'} ,'','','LOC'); $itm->{'imageurl'} = $imgdir."/".$itemtypes->{ $itm->{itype} }->{'imageurl'}; $itm->{'description'} = $itemtypes->{$itemtype}->{'description'}; - + $itemfields{ccode} = 1 if($itm->{ccode}); + $itemfields{enumchron} = 1 if($itm->{enumchron}); + $itemfields{copynumber} = 1 if($itm->{copynumber}); } -$template->param( norequests => $norequests, RequestOnOpac=>$RequestOnOpac ); - ## get notes and subjects from MARC record my $dbh = C4::Context->dbh; my $marcflavour = C4::Context->preference("marcflavour"); @@ -145,6 +146,11 @@ $template->param( norequests => $norequests, RequestOnOpac=>$RequestOnOpac ); MARCAUTHORS => $marcauthorsarray, MARCSERIES => $marcseriesarray, MARCURLS => $marcurlsarray, + norequests => $norequests, + RequestOnOpac=>$RequestOnOpac, + itemdata_ccode => $itemfields{ccode}, + itemdata_enumchron => $itemfields{enumchron}, + itemdata_copynumber => $itemfields{copynumber}, ); foreach ( keys %{$dat} ) { -- 2.39.5
Item typeLocationStatusDate DueLast SeenCopy / VolPublishedCollectionLocationVol InfoCopySerial DataPublishedStatusDate Due
" title="" alt="" /> (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf) (&shelfbrowse_itemnumber=#shelfbrowser">Browse Shelf) Not for loan @@ -206,9 +214,6 @@ &item=">Fix Itemtype