From 042ee96018b527f32b65724b5448779ba82aa96c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 13 Mar 2017 14:30:42 +0000 Subject: [PATCH] Bug 18251 - SCO alerts - need a trigger for successful checkouts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds simple text and a div to allow for sounds to be configured upon successful SCO checkout To test: 1 - Enable sco module 2 - Enable AudioAlerts 3 - Define alert with Selector: .sco-alert-success Sound:http://localhost:8081/intranet-tmpl/prog/sound/opening.ogg 4 - Checkout to patron using SCO 5 - Note only feedback is a addition of item to checkouts list 6 - Apply patch 7 - Checkout ot patron via SCO 8 - You should hear the sound specified above 9 - You should also see a note: Item checked out Followed test plan, works as expected. (Works with external sound only, see Bug 16732) Signed-off-by: Marc VĂ©ron Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 5 +++++ opac/sco/sco-main.pl | 1 + 2 files changed, 6 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index f7fae7b..d5969a1 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -160,6 +160,11 @@ [% END %] + [% IF ( issued ) %] + +

Item checked out

+ [% END %] + [% UNLESS ( hide_main ) %] diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index 4020e27..08bdc2f 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -228,6 +228,7 @@ elsif ( $borrower and $op eq "checkout" ) { if ( $hold_existed ) { my $dtf = Koha::Database->new->schema->storage->datetime_parser; $template->param( + issued => 1, # If the hold existed before the check in, let's confirm that the charge line exists # Note that this should not be needed but since we do not have proper exception handling here we do it this way patron_has_hold_fee => Koha::Account::Lines->search( -- 2.10.2