From b91e3435accc5ebb093afe6c1b56bea978d9c5fc Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Fri, 24 Jul 2009 16:01:48 +0200 Subject: [PATCH] (bug #2812) fix holds cancel in OPAC This fix the user ability to cancel holds in OPAC. At the moment, a user can cancel all his holds, but in fact, only items that are not in transfert or waiting to be checked out can be cancelled by the user. Signed-off-by: Henri-Damien LAURENT --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl | 10 +++++++--- opac/opac-user.pl | 4 ++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl index 68a9140439..5a33cec2b4 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl @@ -355,9 +355,13 @@ $.tablesorter.addParser({ -
- " /> -
+ +
+ " /> +
+ +   + diff --git a/opac/opac-user.pl b/opac/opac-user.pl index d8f83178d4..0c43f528c1 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -246,6 +246,10 @@ foreach my $res (@reserves) { push @waiting, $res; $wcount++; } + # can be cancelled + #$res->{'cancelable'} = 1 if ($res->{'wait'} && $res->{'atdestination'} && $res->{'found'} ne "1"); + $res->{'cancelable'} = 1 if ($res->{wait} and not $res->{found}) or (not $res->{wait} and not $res->{intransit}); + } $template->param( WAITING => \@waiting ); -- 2.39.5