From 38b356da8b2a1121564d20e8aedadc3692496a86 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 29 Jul 2009 13:05:52 +0000 Subject: [PATCH] Bugfix 2339 - Place hold button display with AllowOnShelfHolds OFF Signed-off-by: Galen Charlton --- C4/Biblio.pm | 13 ++++++++++++- .../prog/en/modules/opac-ISBDdetail.tmpl | 17 ++++++++++++----- .../prog/en/modules/opac-MARCdetail.tmpl | 14 +++++++++++++- .../opac-tmpl/prog/en/modules/opac-detail.tmpl | 16 +++++++++++----- .../prog/en/modules/opac-results-grouped.tmpl | 16 +++++++++++++++- .../opac-tmpl/prog/en/modules/opac-results.tmpl | 14 +++++++++++++- opac/opac-MARCdetail.pl | 3 +++ opac/opac-detail.pl | 4 ++++ opac/opac-search.pl | 2 ++ 9 files changed, 85 insertions(+), 14 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index d20d7470d7..40ff797b2f 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -67,7 +67,7 @@ BEGIN { GetMarcUrls &GetUsedMarcStructure &GetXmlBiblio - &GetCOinSBiblio + &GetCOinSBiblio &GetAuthorisedValueDesc &GetMarcStructure @@ -75,6 +75,8 @@ BEGIN { &GetFrameworkCode &GetPublisherNameFromIsbn &TransformKohaToMarc + + &CountItemsIssued ); # To modify something @@ -2024,6 +2026,15 @@ more. =cut +sub CountItemsIssued { + my ( $biblionumber ) = @_; + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare('SELECT COUNT(*) as issuedCount FROM items, issues WHERE items.itemnumber = issues.itemnumber AND items.biblionumber = ?'); + $sth->execute( $biblionumber ); + my $row = $sth->fetchrow_hashref(); + return $row->{'issuedCount'}; +} + sub _disambiguate { my ($table, $column) = @_; if ($column eq "cn_sort" or $column eq "cn_source") { diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl index 3366198dbb..17acd3891a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-ISBDdetail.tmpl @@ -161,11 +161,18 @@ - -
  • "> - Place Hold -
  • - + + + +
  • ">Place Hold
  • + + +
  • ">Place Hold
  • + + + + +
  • " onclick="Dopop('opac-detailprint.pl?biblionumber='); return false;"> diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl index e210545bd5..63501ae7fd 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-MARCdetail.tmpl @@ -19,7 +19,19 @@