Delivered-To: oleonard@myacpl.org
Received: by 10.220.87.77 with SMTP id v13cs177132vcl;
Sat, 18 Apr 2009 16:04:43 -0700 (PDT)
Received: by 10.210.144.3 with SMTP id r3mr2139973ebd.77.1240095882728;
Sat, 18 Apr 2009 16:04:42 -0700 (PDT)
Return-Path: <koha-patches-bounces@lists.koha.org>
Received: from koha.paulpoulain.com (paulpoulain.com [212.85.152.90])
by mx.google.com with ESMTP id 24si3304376ewy.49.2009.04.18.16.04.41;
Sat, 18 Apr 2009 16:04:42 -0700 (PDT)
Received-SPF: neutral (google.com: 212.85.152.90 is neither permitted nor denied by best guess record for domain of koha-patches-bounces@lists.koha.org) client-ip=212.85.152.90;
Authentication-Results: mx.google.com; spf=neutral (google.com: 212.85.152.90 is neither permitted nor denied by best guess record for domain of koha-patches-bounces@lists.koha.org) smtp.mail=koha-patches-bounces@lists.koha.org
Received: from localhost (localhost [127.0.0.1])
by koha.paulpoulain.com (Postfix) with ESMTP id A606632962;
Sun, 19 Apr 2009 01:04:41 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at koha
Received: from koha.paulpoulain.com ([127.0.0.1])
by localhost (listes.koha-fr.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Z3FbDSorWSVa; Sun, 19 Apr 2009 01:04:38 +0200 (CEST)
Received: from koha.paulpoulain.com (localhost [127.0.0.1])
by koha.paulpoulain.com (Postfix) with ESMTP id 51B3632959;
Sun, 19 Apr 2009 01:04:37 +0200 (CEST)
X-Original-To: koha-patches@lists.koha.org
Delivered-To: koha-patches@lists.koha.org
Received: from localhost (localhost [127.0.0.1])
by koha.paulpoulain.com (Postfix) with ESMTP id A44B132961
for <koha-patches@lists.koha.org>;
Sun, 19 Apr 2009 01:04:34 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at koha
Received: from koha.paulpoulain.com ([127.0.0.1])
by localhost (listes.koha-fr.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Oy+xVwu2cGCG for <koha-patches@lists.koha.org>;
Sun, 19 Apr 2009 01:04:34 +0200 (CEST)
Received: from mail-ew0-f158.google.com (mail-ew0-f158.google.com
[209.85.219.158])
by koha.paulpoulain.com (Postfix) with ESMTP id 665D63295D
for <koha-patches@lists.koha.org>;
Sun, 19 Apr 2009 01:04:34 +0200 (CEST)
Received: by ewy2 with SMTP id 2so1800527ewy.20
for <koha-patches@lists.koha.org>; Sat, 18 Apr 2009 16:04:33 -0700 (PDT)
Received: by 10.210.76.4 with SMTP id y4mr2165602eba.12.1240095873909;
Sat, 18 Apr 2009 16:04:33 -0700 (PDT)
X-Forwarded-To: koha-patches@lists.koha.org
X-Forwarded-For: patches@koha.org koha-patches@lists.koha.org
Delivered-To: patches@koha.org
Received: by 10.210.91.6 with SMTP id o6cs493377ebb;
Sat, 18 Apr 2009 16:04:33 -0700 (PDT)
Received: by 10.141.33.8 with SMTP id l8mr1802514rvj.187.1240095872553;
Sat, 18 Apr 2009 16:04:32 -0700 (PDT)
Received: from localhost (216-201-206-122.res.logixcom.net [216.201.206.122])
by mx.google.com with SMTP id f21si5068627rvb.13.2009.04.18.16.04.30;
Sat, 18 Apr 2009 16:04:32 -0700 (PDT)
Received-SPF: neutral (google.com: 216.201.206.122 is neither permitted nor
denied by best guess record for domain of
paul.poulain@biblibre.com) client-ip=216.201.206.122;
Authentication-Results: mx.google.com;
spf=neutral (google.com: 216.201.206.122 is neither
permitted nor denied by best guess record for domain of
paul.poulain@biblibre.com) smtp.mail=paul.poulain@biblibre.com
Received: from biblibre.com ([10.71.1.149])
by localhost 0.5.5 with ESMTP id 2AA049E9C93E0000
Sat Apr 18 16:36:14 2009
Received: by biblibre.com (Postfix, from userid 500)
id 514BF9E128; Sun, 19 Apr 2009 01:04:24 +0200 (CEST)
From: paul.poulain@biblibre.com
To: patches@koha.org
Date: Sun, 19 Apr 2009 01:04:23 +0200
Message-Id: <1240095864-18816-1-git-send-email-paul.poulain@biblibre.com>
X-Mailer: git-send-email 1.5.6.3
Subject: [Koha-patches] [PATCH] fix for #1731
X-BeenThere: koha-patches@lists.koha.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: <koha-patches.lists.koha.org>
List-Unsubscribe: <http://lists.koha.org/mailman/listinfo/koha-patches>,
<mailto:koha-patches-request@lists.koha.org?subject=unsubscribe>
List-Archive: <http://lists.koha.org/pipermail/koha-patches>
List-Post: <mailto:koha-patches@lists.koha.org>
List-Help: <mailto:koha-patches-request@lists.koha.org?subject=help>
List-Subscribe: <http://lists.koha.org/mailman/listinfo/koha-patches>,
<mailto:koha-patches-request@lists.koha.org?subject=subscribe>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: koha-patches-bounces@lists.koha.org
Errors-To: koha-patches-bounces@lists.koha.org
From: Paul Poulain <paul.poulain@biblibre.com>
The "place hold" button is hidden in detail.pl when there are no items or the
items are not for loan. MARC detail should do the same.
---
catalogue/MARCdetail.pl | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl
index 12c6544..d92410a 100755
--- a/catalogue/MARCdetail.pl
+++ b/catalogue/MARCdetail.pl
@@ -247,6 +247,7 @@ my @fields = $record->fields();
my %witness
; #---- stores the list of subfields used at least once, with the "meaning" of the code
my @big_array;
+my $norequests = 1;
foreach my $field (@fields) {
next if ( $field->tag() < 10 );
my @subf = $field->subfields;
@@ -260,11 +261,13 @@ foreach my $field (@fields) {
$tagslib->{ $field->tag() }->{ $subf[$i][0] }->{lib};
$this_row{ $subf[$i][0] } = GetAuthorisedValueDesc( $field->tag(),
$subf[$i][0], $subf[$i][1], '', $tagslib) || $subf[$i][1];
+ $norequests = 0 if $subf[$i][1] ==0 and $tagslib->{ $field->tag() }->{ $subf[$i][0] }->{kohafield} eq 'items.notforloan';
}
if (%this_row) {
push( @big_array, \%this_row );
}
}
+
my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField("items.holdingbranch",$frameworkcode);
@big_array = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}} @big_array;
@@ -306,6 +309,7 @@ if ($subscriptionscount) {
}
$template->param (
+ norequests => $norequests,
item_loop => \@item_value_loop,
item_header_loop => \@header_value_loop,
biblionumber => $biblionumber,
--
1.5.6.3
_______________________________________________
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches