Bugzilla – Attachment 75395 Details for
Bug 18856
Cancel Waiting Hold in OPAC does not give useful message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18856: (QA follow-up) Rename method to avoid confusion
Bug-18856-QA-follow-up-Rename-method-to-avoid-conf.patch (text/plain), 4.37 KB, created by
Marcel de Rooy
on 2018-05-17 12:30:01 UTC
(
hide
)
Description:
Bug 18856: (QA follow-up) Rename method to avoid confusion
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2018-05-17 12:30:01 UTC
Size:
4.37 KB
patch
obsolete
>From 3ea6b60676c0955b092748b74e8e1bf3cc42bd04 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatetsolutions.com> >Date: Thu, 11 Jan 2018 09:44:08 -0500 >Subject: [PATCH] Bug 18856: (QA follow-up) Rename method to avoid confusion >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Hmm. I would have liked the opac parameter even better ;) >--- > Koha/Hold.pm | 6 +++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 +++--- > t/db_dependent/Hold.t | 8 ++++---- > 3 files changed, 10 insertions(+), 10 deletions(-) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index 4ddd8be..23d5d44 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -223,17 +223,17 @@ sub is_in_transit { > return $self->found() eq 'T'; > } > >-=head3 is_cancelable >+=head3 is_cancelable_from_opac > > Returns true if hold is a cancelable hold > >-Holds may be only canceled if they are found. >+Holds may be only canceled if they are not found. > > This is used from the OPAC. > > =cut > >-sub is_cancelable { >+sub is_cancelable_from_opac { > my ($self) = @_; > > return 1 unless $self->is_found(); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 6604cb6..ad048d0 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -685,7 +685,7 @@ > </td> > [% IF SuspendHoldsOpac %] > <td> >- [% IF ( RESERVE.is_cancelable ) %] >+ [% IF ( RESERVE.is_cancelable_from_opac ) %] > [% IF RESERVE.suspend %] > <form class="form-inline" action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post"> > <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" /> >@@ -726,11 +726,11 @@ > </form> > [% END # / IF AutoResumeSuspendedHolds %] > [% END # / IF RESERVE.suspend %] >- [% END # / IF ( RESERVE.is_cancelable )%] >+ [% END # / IF ( RESERVE.is_cancelable_from_opac )%] > </td> > [% END # / IF SuspendHoldsOpac %] > <td class="modify"> >- [% IF ( RESERVE.is_cancelable ) %] >+ [% IF ( RESERVE.is_cancelable_from_opac ) %] > <form action="/cgi-bin/koha/opac-modrequest.pl" method="post"> > <input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" /> > <input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" /> >diff --git a/t/db_dependent/Hold.t b/t/db_dependent/Hold.t >index 635b9b5..4258ba3 100755 >--- a/t/db_dependent/Hold.t >+++ b/t/db_dependent/Hold.t >@@ -124,13 +124,13 @@ isnt( $hold->is_waiting, 1, 'The hold is not waiting (W)' ); > is( $hold->is_found, 0, 'The hold is not found' ); > ok( !$hold->is_in_transit, 'The hold is not in transit' ); > >-# Test method is_cancelable >+# Test method is_cancelable_from_opac > $hold->found(undef); >-is( $hold->is_cancelable, 1, "Unfound hold is cancelable" ); >+is( $hold->is_cancelable_from_opac, 1, "Unfound hold is cancelable" ); > $hold->found('W'); >-is( $hold->is_cancelable, 0, "Waiting hold is not cancelable" ); >+is( $hold->is_cancelable_from_opac, 0, "Waiting hold is not cancelable" ); > $hold->found('T'); >-is( $hold->is_cancelable, 0, "In transit hold is not cancelable" ); >+is( $hold->is_cancelable_from_opac, 0, "In transit hold is not cancelable" ); > > # Test method is_at_destination > $hold->found(undef); >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18856
:
67480
|
67520
|
69077
|
70294
|
70398
|
70399
|
70419
|
70424
|
70425
|
75394
| 75395