Bugzilla – Attachment 2086 Details for
Bug 4421
Should be possible to display location for bibs w/o items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch (1/2) showing desired behavior
0001-Show-location-from-852-when-no-items.patch (text/plain), 3.18 KB, created by
Chris Cormack
on 2010-04-28 17:23:00 UTC
(
hide
)
Description:
Patch (1/2) showing desired behavior
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2010-04-28 17:23:00 UTC
Size:
3.18 KB
patch
obsolete
>From 7ca35189f67d98c686ee8a4c06f257cb5ec7d497 Mon Sep 17 00:00:00 2001 >From: Jared CAMINS-ESAKOV <camins@numismatics.org> >Date: Fri, 9 Apr 2010 13:53:22 -0400 >Subject: [PATCH] Show location from 852 when no items >Content-Type: text/plain; charset="utf-8" > >Instead of saying "No physical items for this record," display the location out of the 852 field. >--- > .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 8 ++++++- > opac/opac-detail.pl | 23 ++++++++++++++++++++ > 2 files changed, 30 insertions(+), 1 deletions(-) > mode change 100644 => 100755 koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl > >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl >old mode 100644 >new mode 100755 >index 1b9085b..1319784 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl >@@ -422,7 +422,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () { > </table> > <!-- /TMPL_IF --> > <!-- TMPL_ELSE --> >-<p>No physical items for this record</p> >+ <!-- TMPL_IF NAME="location_noitems" --><p> >+ <!-- TMPL_LOOP NAME="NOITEMLOCATIONS" --> >+ <p><b>Location:</b> <!-- TMPL_VAR NAME="noitemloc" --></p> >+ <!-- /TMPL_LOOP --> >+ <!-- TMPL_ELSE --> >+ <p>No physical items for this record</p> >+ <!-- /TMPL_IF --> > <!-- /TMPL_IF --> > > <!-- TMPL_IF NAME="OpenOPACShelfBrowser" --> >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index c6d14ba..9cb2037 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -206,6 +206,27 @@ my $marcseriesarray = GetMarcSeries ($record,$marcflavour); > my $marcurlsarray = GetMarcUrls ($record,$marcflavour); > my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); > >+my @noitemlocations = (); >+my $location_noitems = 0; >+my $noitemlocation; >+my @field852s = $record->field('852'); >+ >+for my $field852 (@field852s) { >+ $location_noitems = 1; >+ my %noitemloc; >+ $noitemloc{'noitemloc'} = $field852->subfield('a'); >+ >+ if ($field852->subfield('b')) { >+ my @subfieldb = $field852->subfield('b'); >+ $noitemloc{'noitemloc'} .= '--' . join('--', @subfieldb); >+ } >+ if ($field852->subfield('c')) { >+ my @subfieldc = $field852->subfield('c'); >+ $noitemloc{'noitemloc'} .= ' (' . join('/', @subfieldc) . ')'; >+ } >+ push(@noitemlocations, \%noitemloc); >+} >+ > $template->param( > MARCNOTES => $marcnotesarray, > MARCSUBJCTS => $marcsubjctsarray, >@@ -219,6 +240,8 @@ my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($bib > itemdata_uri => $itemfields{uri}, > itemdata_copynumber => $itemfields{copynumber}, > itemdata_itemnotes => $itemfields{itemnotes}, >+ location_noitems => $location_noitems, >+ NOITEMLOCATIONS => \@noitemlocations, > authorised_value_images => $biblio_authorised_value_images, > subtitle => $subtitle, > ); >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4421
:
2086
|
2087
|
3468