Bugzilla – Attachment 7025 Details for
Bug 7379
copynumber is displayed 'as is' when linked to autorised values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-Bug-7379-displays-copynumber-description-if-defined-.patch (text/plain), 23.46 KB, created by
Adrien SAURAT
on 2012-01-03 10:31:09 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Adrien SAURAT
Created:
2012-01-03 10:31:09 UTC
Size:
23.46 KB
patch
obsolete
>From 025a99704e75b7dad55f5d980bac9dc380ee7659 Mon Sep 17 00:00:00 2001 >From: Adrien Saurat <adrien.saurat@biblibre.com> >Date: Tue, 3 Jan 2012 11:27:35 +0100 >Subject: [PATCH] Bug 7379: displays copynumber description if defined AV > >If an authorized value is defined for copynumber, its >description will be displayed in biblio detail page >(staff and OPAC). >--- > catalogue/detail.pl | 97 ++++++++++++----------- > opac/opac-detail.pl | 214 ++++++++++++++++++++++++++------------------------- > 2 files changed, 160 insertions(+), 151 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index a1e5cc9..abe44e0 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -128,8 +128,8 @@ my $hostrecords; > # adding items linked via host biblios > my @hostitems = GetHostItemsInfo($record); > if (@hostitems){ >- $hostrecords =1; >- push (@items,@hostitems); >+ $hostrecords =1; >+ push (@items,@hostitems); > } > > my $dat = &GetBiblioData($biblionumber); >@@ -144,16 +144,16 @@ my @subs; > > foreach my $subscription (@subscriptions) { > my %cell; >- my $serials_to_display; >+ my $serials_to_display; > $cell{subscriptionid} = $subscription->{subscriptionid}; > $cell{subscriptionnotes} = $subscription->{notes}; > $cell{branchcode} = $subscription->{branchcode}; > $cell{branchname} = GetBranchName($subscription->{branchcode}); > $cell{hasalert} = $subscription->{hasalert}; > #get the three latest serials. >- $serials_to_display = $subscription->{staffdisplaycount}; >- $serials_to_display = C4::Context->preference('StaffSerialIssueDisplayCount') unless $serials_to_display; >- $cell{staffdisplaycount} = $serials_to_display; >+ $serials_to_display = $subscription->{staffdisplaycount}; >+ $serials_to_display = C4::Context->preference('StaffSerialIssueDisplayCount') unless $serials_to_display; >+ $cell{staffdisplaycount} = $serials_to_display; > $cell{latestserials} = > GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display ); > push @subs, \%cell; >@@ -167,8 +167,9 @@ $dat->{'count'} = scalar @all_items + @hostitems; > $dat->{'showncount'} = scalar @items + @hostitems; > $dat->{'hiddencount'} = scalar @all_items + @hostitems - scalar @items; > >-my $shelflocations = GetKohaAuthorisedValues('items.location', $fw); >-my $collections = GetKohaAuthorisedValues('items.ccode' , $fw); >+my $shelflocations = GetKohaAuthorisedValues('items.location' , $fw); >+my $collections = GetKohaAuthorisedValues('items.ccode' , $fw); >+my $copynumbers = GetKohaAuthorisedValues('items.copynumber', $fw); > my (@itemloop, %itemfields); > my $norequests = 1; > my $authvalcode_items_itemlost = GetAuthValCode('items.itemlost',$fw); >@@ -189,19 +190,22 @@ foreach my $item (@items) { > $item->{imageurl} = defined $item->{itype} ? getitemtypeimagelocation('intranet', $itemtypes->{ $item->{itype} }{imageurl}) > : ''; > >- foreach (qw(datedue datelastseen onloan)) { >- $item->{$_} = format_date($item->{$_}); >- } >+ foreach (qw(datedue datelastseen onloan)) { >+ $item->{$_} = format_date($item->{$_}); >+ } > # item damaged, lost, withdrawn loops > $item->{itemlostloop} = GetAuthorisedValues($authvalcode_items_itemlost, $item->{itemlost}) if $authvalcode_items_itemlost; > if ($item->{damaged}) { > $item->{itemdamagedloop} = GetAuthorisedValues($authvalcode_items_damaged, $item->{damaged}) if $authvalcode_items_damaged; > } >- #get shelf location and collection code description if they are authorised value. >+ # get shelf location and collection code description if they are authorised value >+ # same thing for copy number > my $shelfcode = $item->{'location'}; > $item->{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) ); > my $ccode = $item->{'ccode'}; > $item->{'ccode'} = $collections->{$ccode} if ( defined( $ccode ) && defined($collections) && exists( $collections->{$ccode} ) ); >+ my $copynumber = $item->{'copynumber'}; >+ $item->{'copynumber'} = $copynumbers->{$copynumber} if ( defined( $copynumber ) && defined($copynumber) && exists( $copynumbers->{$copynumber} ) ); > foreach (qw(ccode enumchron copynumber itemnotes uri)) { > $itemfields{$_} = 1 if ( $item->{$_} ); > } >@@ -211,20 +215,20 @@ foreach my $item (@items) { > my $ItemBorrowerReserveInfo = GetMemberDetails( $reservedfor, 0); > > if (C4::Context->preference('HidePatronName')){ >- $item->{'hidepatronname'} = 1; >+ $item->{'hidepatronname'} = 1; > } > > if ( defined $reservedate ) { >- $item->{backgroundcolor} = 'reserved'; >- $item->{reservedate} = format_date($reservedate); >- $item->{ReservedForBorrowernumber} = $reservedfor; >- $item->{ReservedForSurname} = $ItemBorrowerReserveInfo->{'surname'}; >- $item->{ReservedForFirstname} = $ItemBorrowerReserveInfo->{'firstname'}; >- $item->{ExpectedAtLibrary} = $branches->{$expectedAt}{branchname}; >- $item->{Reservedcardnumber} = $ItemBorrowerReserveInfo->{'cardnumber'}; >+ $item->{backgroundcolor} = 'reserved'; >+ $item->{reservedate} = format_date($reservedate); >+ $item->{ReservedForBorrowernumber} = $reservedfor; >+ $item->{ReservedForSurname} = $ItemBorrowerReserveInfo->{'surname'}; >+ $item->{ReservedForFirstname} = $ItemBorrowerReserveInfo->{'firstname'}; >+ $item->{ExpectedAtLibrary} = $branches->{$expectedAt}{branchname}; >+ $item->{Reservedcardnumber} = $ItemBorrowerReserveInfo->{'cardnumber'}; > } > >- # Check the transit status >+ # Check the transit status > my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($item->{itemnumber}); > if ( defined( $transfertwhen ) && ( $transfertwhen ne '' ) ) { > $item->{transfertwhen} = format_date($transfertwhen); >@@ -243,40 +247,41 @@ foreach my $item (@items) { > # item has a host number if its biblio number does not match the current bib > if ($item->{biblionumber} ne $biblionumber){ > $item->{hostbiblionumber} = $item->{biblionumber}; >- $item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title}; >+ $item->{hosttitle} = GetBiblioData($item->{biblionumber})->{title}; > } >- >- #count if item is used in analytical bibliorecords >- my $countanalytics= GetAnalyticsCount($item->{itemnumber}); >- if ($countanalytics > 0){ >- $analytics_flag=1; >- $item->{countanalytics} = $countanalytics; >- } > >+ #count if item is used in analytical bibliorecords >+ my $countanalytics= GetAnalyticsCount($item->{itemnumber}); >+ if ( defined $countanalytics) { >+ if ($countanalytics > 0){ >+ $analytics_flag=1; >+ $item->{countanalytics} = $countanalytics; >+ } >+ } > push @itemloop, $item; > } > > $template->param( norequests => $norequests ); > $template->param( >- MARCNOTES => $marcnotesarray, >- MARCSUBJCTS => $marcsubjctsarray, >- MARCAUTHORS => $marcauthorsarray, >- MARCSERIES => $marcseriesarray, >- MARCURLS => $marcurlsarray, >- MARCISBNS => $marcisbnsarray, >- MARCHOSTS => $marchostsarray, >- subtitle => $subtitle, >- itemdata_ccode => $itemfields{ccode}, >- itemdata_enumchron => $itemfields{enumchron}, >- itemdata_uri => $itemfields{uri}, >- itemdata_copynumber => $itemfields{copynumber}, >- volinfo => $itemfields{enumchron}, >+ MARCNOTES => $marcnotesarray, >+ MARCSUBJCTS => $marcsubjctsarray, >+ MARCAUTHORS => $marcauthorsarray, >+ MARCSERIES => $marcseriesarray, >+ MARCURLS => $marcurlsarray, >+ MARCISBNS => $marcisbnsarray, >+ MARCHOSTS => $marchostsarray, >+ subtitle => $subtitle, >+ itemdata_ccode => $itemfields{ccode}, >+ itemdata_enumchron => $itemfields{enumchron}, >+ itemdata_uri => $itemfields{uri}, >+ itemdata_copynumber => $itemfields{copynumber}, >+ volinfo => $itemfields{enumchron}, > itemdata_itemnotes => $itemfields{itemnotes}, >- z3950_search_params => C4::Search::z3950_search_args($dat), >+ z3950_search_params => C4::Search::z3950_search_args($dat), > holdcount => $holdcount, >- hostrecords => $hostrecords, >- analytics_flag => $analytics_flag, >- C4::Search::enabled_staff_search_views, >+ hostrecords => $hostrecords, >+ analytics_flag => $analytics_flag, >+ C4::Search::enabled_staff_search_views, > ); > > if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) { >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index f82dde2..9828a44 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -400,12 +400,12 @@ my $hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddeni > # Hide items > if ($hideitems) { > for my $itm (@all_items) { >- if ( C4::Context->preference('hidelostitems') ) { >- push @items, $itm unless $itm->{itemlost} or any { $itm->{'itemnumber'} eq $_ } @hiddenitems; >- } else { >- push @items, $itm unless any { $itm->{'itemnumber'} eq $_ } @hiddenitems; >+ if ( C4::Context->preference('hidelostitems') ) { >+ push @items, $itm unless $itm->{itemlost} or any { $itm->{'itemnumber'} eq $_ } @hiddenitems; >+ } else { >+ push @items, $itm unless any { $itm->{'itemnumber'} eq $_ } @hiddenitems; >+ } > } >-} > } else { > # Or not > @items = @all_items; >@@ -422,6 +422,7 @@ if ( $itemtype ) { > } > my $shelflocations =GetKohaAuthorisedValues('items.location',$dat->{'frameworkcode'}, 'opac'); > my $collections = GetKohaAuthorisedValues('items.ccode',$dat->{'frameworkcode'}, 'opac'); >+my $copynumbers = GetKohaAuthorisedValues('items.copynumber',$dat->{'frameworkcode'}, 'opac'); > > #coping with subscriptions > my $subscriptionsnumber = CountSubscriptionFromBiblionumber($biblionumber); >@@ -444,7 +445,7 @@ foreach my $subscription (@subscriptions) { > #get the three latest serials. > $serials_to_display = $subscription->{opacdisplaycount}; > $serials_to_display = C4::Context->preference('OPACSerialIssueDisplayCount') unless $serials_to_display; >- $cell{opacdisplaycount} = $serials_to_display; >+ $cell{opacdisplaycount} = $serials_to_display; > $cell{latestserials} = > GetLatestSerials( $subscription->{subscriptionid}, $serials_to_display ); > push @subs, \%cell; >@@ -467,11 +468,11 @@ my $branches = GetBranches(); > my %itemfields; > for my $itm (@items) { > $norequests = 0 >- if ( (not $itm->{'wthdrawn'} ) >- && (not $itm->{'itemlost'} ) >- && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'} ) >- && (not $itemtypes->{$itm->{'itype'}}->{notforloan} ) >- && ($itm->{'itemnumber'} ) ); >+ if ( (not $itm->{'wthdrawn'} ) >+ && (not $itm->{'itemlost'} ) >+ && ($itm->{'itemnotforloan'}<0 || not $itm->{'itemnotforloan'} ) >+ && (not $itemtypes->{$itm->{'itype'}}->{notforloan} ) >+ && ($itm->{'itemnumber'} ) ); > > if ( defined $itm->{'publictype'} ) { > # I can't actually find any case in which this is defined. --amoore 2008-12-09 >@@ -480,10 +481,13 @@ for my $itm (@items) { > $itm->{datedue} = format_date($itm->{datedue}); > $itm->{datelastseen} = format_date($itm->{datelastseen}); > >- # get collection code description, too >+ # get collection code and copynumber description, too > if ( my $ccode = $itm->{'ccode'} ) { > $itm->{'ccode'} = $collections->{$ccode} if ( defined($collections) && exists( $collections->{$ccode} ) ); > } >+ if ( my $copynumber = $itm->{'copynumber'} ) { >+ $itm->{'copynumber'} = $copynumbers->{$copynumber} if ( defined($copynumbers) && exists( $copynumbers->{$copynumber} ) ); >+ } > if ( defined $itm->{'location'} ) { > $itm->{'location_description'} = $shelflocations->{ $itm->{'location'} }; > } >@@ -499,52 +503,52 @@ for my $itm (@items) { > my $item_authorised_value_images = C4::Items::get_authorised_value_images( C4::Items::get_item_authorised_values( $itm->{'itemnumber'} ) ); > # warn( Data::Dumper->Dump( [ $item_authorised_value_images ], [ 'item_authorised_value_images' ] ) ); > >- if ( $itm->{'itemlost'} ) { >- my $lostimageinfo = List::Util::first { $_->{'category'} eq 'LOST' } @$item_authorised_value_images; >- $itm->{'lostimageurl'} = $lostimageinfo->{ 'imageurl' }; >- $itm->{'lostimagelabel'} = $lostimageinfo->{ 'label' }; >- } >- >- if( $itm->{'count_reserves'}){ >- if( $itm->{'count_reserves'} eq "Waiting"){ $itm->{'waiting'} = 1; } >- if( $itm->{'count_reserves'} eq "Reserved"){ $itm->{'onhold'} = 1; } >- } >- >- my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber}); >- if ( defined( $transfertwhen ) && $transfertwhen ne '' ) { >+ if ( $itm->{'itemlost'} ) { >+ my $lostimageinfo = List::Util::first { $_->{'category'} eq 'LOST' } @$item_authorised_value_images; >+ $itm->{'lostimageurl'} = $lostimageinfo->{ 'imageurl' }; >+ $itm->{'lostimagelabel'} = $lostimageinfo->{ 'label' }; >+ } >+ >+ if( $itm->{'count_reserves'}){ >+ if( $itm->{'count_reserves'} eq "Waiting"){ $itm->{'waiting'} = 1; } >+ if( $itm->{'count_reserves'} eq "Reserved"){ $itm->{'onhold'} = 1; } >+ } >+ >+ my ( $transfertwhen, $transfertfrom, $transfertto ) = GetTransfers($itm->{itemnumber}); >+ if ( defined( $transfertwhen ) && $transfertwhen ne '' ) { > $itm->{transfertwhen} = format_date($transfertwhen); > $itm->{transfertfrom} = $branches->{$transfertfrom}{branchname}; > $itm->{transfertto} = $branches->{$transfertto}{branchname}; >- } >+ } > } > > ## get notes and subjects from MARC record >-my $dbh = C4::Context->dbh; >-my $marcnotesarray = GetMarcNotes ($record,$marcflavour); >-my $marcisbnsarray = GetMarcISBN ($record,$marcflavour); >-my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour); >-my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour); >-my $marcseriesarray = GetMarcSeries ($record,$marcflavour); >-my $marcurlsarray = GetMarcUrls ($record,$marcflavour); >-my $marchostsarray = GetMarcHosts($record,$marcflavour); >-my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); >+my $dbh = C4::Context->dbh; >+my $marcnotesarray = GetMarcNotes ($record,$marcflavour); >+my $marcisbnsarray = GetMarcISBN ($record,$marcflavour); >+my $marcauthorsarray = GetMarcAuthors ($record,$marcflavour); >+my $marcsubjctsarray = GetMarcSubjects($record,$marcflavour); >+my $marcseriesarray = GetMarcSeries ($record,$marcflavour); >+my $marcurlsarray = GetMarcUrls ($record,$marcflavour); >+my $marchostsarray = GetMarcHosts($record,$marcflavour); >+my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); > > $template->param( >- MARCNOTES => $marcnotesarray, >- MARCSUBJCTS => $marcsubjctsarray, >- MARCAUTHORS => $marcauthorsarray, >- MARCSERIES => $marcseriesarray, >- MARCURLS => $marcurlsarray, >- MARCHOSTS => $marchostsarray, >- norequests => $norequests, >- RequestOnOpac => C4::Context->preference("RequestOnOpac"), >- itemdata_ccode => $itemfields{ccode}, >- itemdata_enumchron => $itemfields{enumchron}, >- itemdata_uri => $itemfields{uri}, >- itemdata_copynumber => $itemfields{copynumber}, >- itemdata_itemnotes => $itemfields{itemnotes}, >- authorised_value_images => $biblio_authorised_value_images, >- subtitle => $subtitle, >+ MARCNOTES => $marcnotesarray, >+ MARCSUBJCTS => $marcsubjctsarray, >+ MARCAUTHORS => $marcauthorsarray, >+ MARCSERIES => $marcseriesarray, >+ MARCURLS => $marcurlsarray, >+ MARCHOSTS => $marchostsarray, >+ norequests => $norequests, >+ RequestOnOpac => C4::Context->preference("RequestOnOpac"), >+ itemdata_ccode => $itemfields{ccode}, >+ itemdata_enumchron => $itemfields{enumchron}, >+ itemdata_uri => $itemfields{uri}, >+ itemdata_copynumber => $itemfields{copynumber}, >+ itemdata_itemnotes => $itemfields{itemnotes}, >+ authorised_value_images => $biblio_authorised_value_images, >+ subtitle => $subtitle, > ); > > if (C4::Context->preference("AlternateHoldingsField") && scalar @items == 0) { >@@ -590,11 +594,11 @@ if ( $isbn or $ean or $oclc or $upc ) { > $content_identifier_exists = 1; > } > $template->param( >- normalized_upc => $upc, >- normalized_ean => $ean, >- normalized_oclc => $oclc, >- normalized_isbn => $isbn, >- content_identifier_exists => $content_identifier_exists, >+ normalized_upc => $upc, >+ normalized_ean => $ean, >+ normalized_oclc => $oclc, >+ normalized_isbn => $isbn, >+ content_identifier_exists => $content_identifier_exists, > ); > > # COinS format FIXME: for books Only >@@ -628,14 +632,14 @@ foreach ( @$reviews ) { > $_->{cardnumber} = $borrowerData->{'cardnumber'}; > $_->{datereviewed} = format_date($_->{datereviewed}); > if ($borrowerData->{'borrowernumber'} eq $borrowernumber) { >- $_->{your_comment} = 1; >- $loggedincommenter = 1; >- } >+ $_->{your_comment} = 1; >+ $loggedincommenter = 1; >+ } > } > > > if(C4::Context->preference("ISBD")) { >- $template->param(ISBD => 1); >+ $template->param(ISBD => 1); > } > > $template->param( >@@ -676,14 +680,14 @@ foreach my $sc_field (@sc_fields) { > $row_data{branch} = $sc_field->subfield('9'); > > if ($row_data{text} && $row_data{branch}) { >- push (@serialcollections, \%row_data); >+ push (@serialcollections, \%row_data); > } > } > > if (scalar(@serialcollections) > 0) { > $template->param( >- serialcollection => 1, >- serialcollections => \@serialcollections); >+ serialcollection => 1, >+ serialcollections => \@serialcollections); > } > > # Amazon.com Stuff >@@ -734,12 +738,12 @@ my $syndetics_elements; > if ( C4::Context->preference("SyndeticsEnabled") ) { > $template->param("SyndeticsEnabled" => 1); > $template->param("SyndeticsClientCode" => C4::Context->preference("SyndeticsClientCode")); >- eval { >- $syndetics_elements = &get_syndetics_index($isbn,$upc,$oclc); >- for my $element (values %$syndetics_elements) { >- $template->param("Syndetics$element"."Exists" => 1 ); >- #warn "Exists: "."Syndetics$element"."Exists"; >- } >+ eval { >+ $syndetics_elements = &get_syndetics_index($isbn,$upc,$oclc); >+ for my $element (values %$syndetics_elements) { >+ $template->param("Syndetics$element"."Exists" => 1 ); >+ #warn "Exists: "."Syndetics$element"."Exists"; >+ } > }; > warn $@ if $@; > } >@@ -747,22 +751,22 @@ if ( C4::Context->preference("SyndeticsEnabled") ) { > if ( C4::Context->preference("SyndeticsEnabled") > && C4::Context->preference("SyndeticsSummary") > && ( exists($syndetics_elements->{'SUMMARY'}) || exists($syndetics_elements->{'AVSUMMARY'}) ) ) { >- eval { >- my $syndetics_summary = &get_syndetics_summary($isbn,$upc,$oclc, $syndetics_elements); >- $template->param( SYNDETICS_SUMMARY => $syndetics_summary ); >- }; >- warn $@ if $@; >+ eval { >+ my $syndetics_summary = &get_syndetics_summary($isbn,$upc,$oclc, $syndetics_elements); >+ $template->param( SYNDETICS_SUMMARY => $syndetics_summary ); >+ }; >+ warn $@ if $@; > > } > > if ( C4::Context->preference("SyndeticsEnabled") > && C4::Context->preference("SyndeticsTOC") > && exists($syndetics_elements->{'TOC'}) ) { >- eval { >- my $syndetics_toc = &get_syndetics_toc($isbn,$upc,$oclc); >- $template->param( SYNDETICS_TOC => $syndetics_toc ); >- }; >- warn $@ if $@; >+ eval { >+ my $syndetics_toc = &get_syndetics_toc($isbn,$upc,$oclc); >+ $template->param( SYNDETICS_TOC => $syndetics_toc ); >+ }; >+ warn $@ if $@; > } > > if ( C4::Context->preference("SyndeticsEnabled") >@@ -772,7 +776,7 @@ if ( C4::Context->preference("SyndeticsEnabled") > my $syndetics_excerpt = &get_syndetics_excerpt($isbn,$upc,$oclc); > $template->param( SYNDETICS_EXCERPT => $syndetics_excerpt ); > }; >- warn $@ if $@; >+ warn $@ if $@; > } > > if ( C4::Context->preference("SyndeticsEnabled") >@@ -781,12 +785,12 @@ if ( C4::Context->preference("SyndeticsEnabled") > my $syndetics_reviews = &get_syndetics_reviews($isbn,$upc,$oclc,$syndetics_elements); > $template->param( SYNDETICS_REVIEWS => $syndetics_reviews ); > }; >- warn $@ if $@; >+ warn $@ if $@; > } > > if ( C4::Context->preference("SyndeticsEnabled") > && C4::Context->preference("SyndeticsAuthorNotes") >- && exists($syndetics_elements->{'ANOTES'}) ) { >+ && exists($syndetics_elements->{'ANOTES'}) ) { > eval { > my $syndetics_anotes = &get_syndetics_anotes($isbn,$upc,$oclc); > $template->param( SYNDETICS_ANOTES => $syndetics_anotes ); >@@ -843,34 +847,34 @@ if (C4::Context->preference("OPACShelfBrowser")) { > } > > if (C4::Context->preference("BakerTaylorEnabled")) { >- $template->param( >- BakerTaylorEnabled => 1, >- BakerTaylorImageURL => &image_url(), >- BakerTaylorLinkURL => &link_url(), >- BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'), >- ); >- my ($bt_user, $bt_pass); >- if ($isbn and >- $bt_user = C4::Context->preference('BakerTaylorUsername') and >- $bt_pass = C4::Context->preference('BakerTaylorPassword') ) >- { >- $template->param( >- BakerTaylorContentURL => >- sprintf("http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y", >- $bt_user,$bt_pass,$isbn) >- ); >- } >+ $template->param( >+ BakerTaylorEnabled => 1, >+ BakerTaylorImageURL => &image_url(), >+ BakerTaylorLinkURL => &link_url(), >+ BakerTaylorBookstoreURL => C4::Context->preference('BakerTaylorBookstoreURL'), >+ ); >+ my ($bt_user, $bt_pass); >+ if ($isbn and >+ $bt_user = C4::Context->preference('BakerTaylorUsername') and >+ $bt_pass = C4::Context->preference('BakerTaylorPassword') ) >+ { >+ $template->param( >+ BakerTaylorContentURL => >+ sprintf("http://contentcafe2.btol.com/ContentCafeClient/ContentCafe.aspx?UserID=%s&Password=%s&ItemKey=%s&Options=Y", >+ $bt_user,$bt_pass,$isbn) >+ ); >+ } > } > > my $tag_quantity; > if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnDetail')) { >- $template->param( >- TagsEnabled => 1, >- TagsShowOnDetail => $tag_quantity, >- TagsInputOnDetail => C4::Context->preference('TagsInputOnDetail') >- ); >- $template->param(TagLoop => get_tags({biblionumber=>$biblionumber, approved=>1, >- 'sort'=>'-weight', limit=>$tag_quantity})); >+ $template->param( >+ TagsEnabled => 1, >+ TagsShowOnDetail => $tag_quantity, >+ TagsInputOnDetail => C4::Context->preference('TagsInputOnDetail') >+ ); >+ $template->param(TagLoop => get_tags({biblionumber=>$biblionumber, approved=>1, >+ 'sort'=>'-weight', limit=>$tag_quantity})); > } > > if (C4::Context->preference("OPACURLOpenInNewWindow")) { >-- >1.7.4.1 >
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 7379
:
7025
|
7026
|
7029
|
7030
|
7977
|
10036
|
12954