From d6f56d87346e616d78152999abb86cae9be3d12d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi>
Date: Wed, 22 Jul 2020 15:44:31 +0000
Subject: [PATCH] Bug 12556: Simplify and correct logic in holds-table.inc
 template

The states is_waiting and is_found are already implied by
is_at_destination. Also we would never get the 'transfered' html class
since transfer's status is T (this might not have been true in the
past but now is).

Signed-off-by: John Doe <you@example.com>
---
 koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc | 14 ++++----------
 1 file changed, 4 insertions(+), 10 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 0c365b5fb2..332480072e 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc
@@ -37,16 +37,10 @@
                     [% UNLESS ( HOLD.is_waiting || HOLD.is_in_transit ) %]
                         [% SET all_holds_waiting = 0 %]
                     [% END %]
-                    [% IF ( HOLD.is_waiting ) %]
-                        [% IF ( HOLD.is_at_destination ) %]
-                            [% IF ( HOLD.is_found ) %]
-                                <tr class="reserved">
-                            [% ELSE %]
-                                <tr>
-                            [% END %]
-                        [% ELSE %]
-                            <tr class="transfered">
-                        [% END %]
+                    [% IF ( HOLD.is_at_destination ) %]
+                        <tr class="reserved">
+                    [% ELSIF HOLD.is_in_transit %]
+                        <tr class="transfered">
                     [% ELSE %]
                         <tr>
                     [% END %]
-- 
2.11.0