From 0393f053b08b316f4da174559b6f44f5a8b20e3b Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Wed, 20 Mar 2019 00:16:05 -0300 Subject: [PATCH] Bug 22538: Add a noticeable alert about waiting holds In SCO, bug 21772 introduced holds information, but it lacked the capability to attract atention when any of those holds was in waiting status. Because SCO and opac-user uses the same include file for holds table, this bug applies to both modules. To test: 1) Have a patron with holds in waiting status and pending status. 2) Enable SCO module. 3) Holds tab label contains holds count, but doesn't inform that there is something that requires attention. 5) Holds tab content has no visual aid to recognize without reading effort which holds are in waiting status. 6) Apply this patch => SUCCESS: Holds tab label has a visual aid to indicate that something requires attention, and in holds table it's easy to recognize waiting holds without reading effort. 7) Sign off Sponsored-by: Theke Solutions Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens --- .../bootstrap/en/includes/holds-table.inc | 1 + .../bootstrap/en/modules/sco/sco-main.tt | 15 +++++++++++++-- opac/sco/sco-main.pl | 6 ++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc index 9673d5b106..e96a73caa0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -104,6 +104,7 @@ Status: [% IF ( HOLD.is_waiting ) %] + [% IF ( HOLD.is_at_destination ) %] [% IF ( HOLD.found ) %] Item waiting at [% HOLD.branch.branchname | html %] 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 8f9e38d2e3..e147cdd6f8 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 @@ -9,7 +9,11 @@ [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %] › Self checkout - +[% IF ( Koha.Preference('OpacFavicon') ) %] + +[% ELSE %] + +[% END %] [% Asset.css("lib/bootstrap/css/bootstrap.min.css") | $raw %] [% Asset.css("lib/jquery/jquery-ui.css") | $raw %] [% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %] @@ -255,7 +259,14 @@
diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index bbaaf703ee..de7948917c 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -283,6 +283,11 @@ if ($borrower) { my $accountlines = $account->lines; my $holds = $patron->holds; + my $waiting_holds_count = 0; + + while(my $hold = $holds->next) { + $waiting_holds_count++ if $hold->is_waiting; + } $template->param( validuser => 1, @@ -294,6 +299,7 @@ if ($borrower) { patronid => $patronid, patronlogin => $patronlogin, patronpw => $patronpw, + waiting_holds_count => $waiting_holds_count, noitemlinks => 1 , borrowernumber => $borrower->{'borrowernumber'}, SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'), -- 2.39.5