From cce047707f7bd92cefb000a8e4f02a08958dcfb8 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 | 15 ++++++++++++++- opac/opac-MARCdetail.pl | 3 +++ opac/opac-detail.pl | 4 ++++ opac/opac-search.pl | 2 ++ 9 files changed, 86 insertions(+), 14 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 822b5abfd1..550e34eb68 100755 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -69,7 +69,7 @@ BEGIN { GetMarcUrls &GetUsedMarcStructure &GetXmlBiblio - &GetCOinSBiblio + &GetCOinSBiblio &GetAuthorisedValueDesc &GetMarcStructure @@ -77,6 +77,8 @@ BEGIN { &GetFrameworkCode &GetPublisherNameFromIsbn &TransformKohaToMarc + + &CountItemsIssued ); # To modify something @@ -2013,6 +2015,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 5244ff3f35..7f40c2615c 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 @@