From 46a03a944265a4acff65521742193de2a6537296 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Wed, 26 Aug 2009 01:44:29 +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: Galen Charlton --- 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 62b6ff4aad..cc86652084 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl @@ -374,9 +374,13 @@ $.tablesorter.addParser({ -
- " /> -
+ +
+ " /> +
+ +   + diff --git a/opac/opac-user.pl b/opac/opac-user.pl index b61ad37deb..007e57b498 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -239,6 +239,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.20.1